Solaris 10 ipnodes caveat

On Solaris 10, IPv4 addresses are looked up in /etc/inet/ipnodes before /etc/inet/hosts.

From /etc/nsswitch.dns:

# Note that IPv4 addresses are searched for in all of the ipnodes databases
# before searching the hosts databases.

This means that if you have the following in /etc/nsswitch.conf (which is the default from /etc/nsswitch.dns)

ipnodes:    files dns
hosts:      files dns

the IPv4 resolution order will be:

1. /etc/inet/ipnodes
2. DNS (name servers in /etc/resolv.conf)
3. /etc/hosts
4. DNS (name servers in /etc/resolv.conf)

This may confuse administrators accustomed to placing IPv4 addresses in /etc/hosts to override resource records in DNS.

The easiest way to check /etc/inet/ipnodes and /etc/hosts before DNS is to remove dns from the /etc/nsswitch.conf ipnodes: entry.

ipnodes:    files
hosts:      files dns

The IPv4 resolution order will be:

1. /etc/inet/ipnodes
2. /etc/hosts
3. DNS (name servers in /etc/resolv.conf)

Back to
Last modified: 2007/12/18