System Administration Guide, Volume 3

Changes to the nsswitch.conf File

In addition to the capability of looking up IPv6 addresses through /etc/inet/ipnodes, IPv6 support has been added to the NIS, NIS+, and DNS name services. Consequently, the nsswitch.conf(4) file has been modified to support IPv6 lookups. The addition of an ipnodes line to the /etc/nsswitch.conf file enables you to perform lookups in the new databases for each of the Solaris Name Services (NIS, NIS+, DNS, and files). For example:


hosts:  files dns nisplus [NOTFOUND=return]
ipnodes: files dns nisplus [NOTFOUND=return]

Note -

Before changing the /etc/nsswitch.conf file to search ipnodes in multiple name services, populate these ipnodes databases with IPv4 and IPv6 addresses. Otherwise, unnecessary delays can result in the resolution of host addresses (including possible boot timing delays).


The following diagram shows the new relationship between the nsswitch.conf file and the new name services databases for applications using the gethostbyname() and getipnodebyname() commands. Items in italics are new. The gethostbyname() command looks only for IPv4 addresses stored in /etc/inet/hosts. The getipnodebyname() command consults the database specified in the ipnodes entry in the nsswitch.conf file. If the lookup fails, then it consults the database specified in the hosts entry in the nsswitch.conf file.

Figure 16-1 Relationship Between nsswitch.conf and Name Services

Graphic

For more information on Naming Services, see Solaris Naming Setup and Configuration Guide.