Name Resolution Problems with ".local" Domains

  • 3794674
  • 22-May-2007
  • 23-Apr-2014

Environment

Novell Open Enterprise Server (Linux based)
Novell SUSE Linux Enterprise Server 11
Novell SUSE Linux Enterprise Desktop 10
Novell SUSE Linux Enterprise Server 10
Novell SUSE Linux Enterprise Server 9
Novell Linux Desktop 9

Situation

Applications or system programs like ping have problems with the resolution of names in a DNS domain ending with .local.

For example, when you try to test the connection to a machine called runner in your organisation's acme.local domain with the command ping runner or ping runner.acme.local, you get an error:

ERROR: unknown host runner.acme.local

even though you can look up that host name with dig runner.acme.local, or it takes longer than expected for the pinging to start.

Resolution

On SLES 11 or later:

edit /etc/nsswitch.conf

modify the following line:

hosts:     files mdns4_minimal [NOTFOUND=return] dns

and remove "mdns4_minimal [NOTFOUND=return]" so it reads:

hosts: files dns

On Pre SLES 11 machines:

Set

mdns off

in the resolver configuration file /etc/host.conf. This option, introduced in SLES9 Service Pack 1, disables the special handling of the top-level domain .local by the resolver: it instructs the resolver not to use multicast DNS, but to use the more common unicast DNS instead.

This solution addresses this specific problem. To prevent similar problems in the future, we recommend using official DNS names for your network, as top-level domains that are currently unassigned may be assigned for special purposes in the future, as has happened with .local.

Additional Information

Background

For background information about the concepts of multicast and DNS, see the Wikipedia entries: multicast and Domain Name System.

With regular unicast DNS, systems that are connected to the network need to be told the IP address(es) of the nameserver(s) they can use (on Linux systems, this information is stored in the /etc/resolv.conf file). When multicast DNS is used, this is not necessary: DNS queries are made through multicast packets and answered by a multicast-aware DNS server, without the DNS client needing to know the server's address beforehand. Thus, using name servers that support multicast DNS makes it easier to hook up new systems to the network; this is a part of what is known as Zeroconf, Zero Configuration Networking.

However, many existing networks do not have multicast-aware DNS servers. In such networks, a DNS query for a name in .local will fall on deaf ears and such a name will not get resolved, or will only be resolved when name resolution falls back to unicast DNS.