On Wed, Aug 17, 2011 at 10:42 PM, Dazed_75 <lthielster@gmail.com> wrote:
Josh, the first problem I have with that solution is that it is 2 years and 4 ubuntu releases ago.  But a good explanation of the issues is buried in https://help.ubuntu.com/10.04/serverguide/C/network-configuration.html

The section I refer to says:

Name Service Switch Configuration

The order in which your system selects a method of resolving hostnames to IP addresses is controlled by the Name Service Switch (NSS) configuration file /etc/nsswitch.conf. As mentioned in the previous section, typically static hostnames defined in the systems /etc/hosts file have precedence over names resolved from DNS. The following is an example of the line responsible for this order of hostname lookups in the file /etc/nsswitch.conf.

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
  • files first tries to resolve static hostnames located in /etc/hosts.

  • mdns4_minimal attempts to resolve the name using Multicast DNS.

  • [NOTFOUND=return] means that any response of notfound by the preceeding mdns4_minimal process should be treated as authoritative and that the system should not try to continue hunting for an answer.

  • dns represents a legacy unicast DNS query.

  • mdns4 represents a Multicast DNS query.

To modify the order of the above mentioned name resolution methods, you can simply change the hosts: string to the value of your choosing. For example, if you prefer to use legacy Unicast DNS versus Multicast DNS, you can change the string in /etc/nsswitch.conf as shown below.

hosts:          files dns [NOTFOUND=return] mdns4_minimal mdns4
Personally, though, I just turn on dnsmasq in my router so that all machines on the LAN are known by the router and it caches them so a dns resolution workd both for LAN and WAN name resolution.


Interesting. I was guessing incorrectly as to why it worked. Regardless it's solved my problem; we'll see if I run into side-affects.

Simply turning on dnsmasq isn't an option in my environment. We have a complicated setup of hardware vpn's and some static routes to other offices. Also, I'm not the network guy; just a developer.

So.. Happy it's working now but I may have to come back to this topic later.