Comment 42 for bug 80900

Revision history for this message
Thomas Hood (jdthood) wrote : Re: problems resolving fully qualified domain names in environments where .local is used as a TLD

Will wrote:
> hosts: files dns mdns4_minimal [NOTFOUND=return] mdns4

I don't see the point of putting "mdns4_minimal" before "mdns4". Just "mdns4" should be equivalent and faster, but maybe I'm missing something.

Jeremy wrote:
> The nsswitch.conf edit fixed it for me.
> Can we please get this as default configuration?

1. Jeremy, does the following also work?

    hosts: files mdns4_minimal dns mdns4

(I.e., *without* the "[NOTFOUND=return]".)

2. Upstream's documentation

    http://avahi.org/wiki/AvahiAndUnicastDotLocal

says

    If you come across a network where .local is a unicast
    DNS domain, please contact the local administrator
    and ask him to move his DNS zone to a different domain.
    If this is not possible, we recommend not to use Avahi
    in such a network at all.

So editing nsswitch.conf is not the recommended solution. Removing avahi is the recommended solution. Obviously we shouldn't require the user to do this by hand. Avahi should be disabled automatically on such a network. Now, apparently avahi tries to do this (if AVAHI_DAEMON_DETECT_LOCAL=1 in /etc/default/avahi-daemon) but this doesn't always work properly; see, e.g., bug #327362.

Here's what Mac OS X 10.6 does (http://support.apple.com/kb/HT3473). (Bonjour plays the same role as avahi.)

«Host names that contain only one label in addition to local, for example "My-Computer.local", are resolved using Multicast DNS (Bonjour) by default. Host names that contain two or more labels in addition to local, for example "server.domain.local", are resolved using a DNS server by default.

Additionally, Mac OS X v10.6 automatically detects when the local network operator has set up a name server that will answer name requests for a domain ending in ".local". It does this by checking to see if there is a Start Of Authority (SOA) record for the top level domain "local", which is how a DNS server indicates that it claims to have authority over a part of the DNS namespace. As long as the DNS server is properly configured with the required SOA record, Mac OS X v10.6 will detect this SOA record and automatically use this server to look up all host names in the domain.»