System Administration Guide, Volume 3

IPv6 Extensions to Solaris Name Services

This section describes naming changes resulting from the implementation of IPv6 introduced in the Solaris 8 release. You can store IPv6 addresses in any of the Solaris naming services (NIS, NIS+, DNS, and files), and also use NIS and NIS+ over IPv6 RPC transports to retrieve any NIS or NIS+ data.

/etc/inet/ipnodes File

The /etc/inet/ipnodes file stores both IPv4 and IPv6 addresses. It serves as a local database that associates the names of hosts with their IPv4 and IPv6 addresses. You should not store host names and their addressess in static files, such as /etc/inet/ipnodes. However, for testing purposes, it might be useful to store IPv6 addresses in a file in the same way that IPv4 addresses are stored in /etc/inet/hosts. The ipnodes file uses the same format convention as the hosts file. See "Network Databases" for a description of the hosts file. See ipnodes(4) man page for a description of the ipnodes file.

IPv6-aware utilities use the new /etc/inet/ipnodes database. The existing /etc/hosts database, which contains only IPv4 addresses, remains as it is to facilitate existing applications. If the ipnodes database does not exist, IPv6-aware utilities use the existing hosts database.


Note -

If you need to add addresses, you must add IPv4 addresses to both the hosts and ipnodes files. You add only IPv6 addresses to the ipnodes file.


Example--/etc/inet/ipnodes File


#
# Internet IPv6 host table
# with both IPv4 and IPv6 addresses
#
::1     localhost
2::9255:a00:20ff:fe78:f37c      fripp.guitars.com fripp fripp-v6
fe80::a00:20ff:fe78:f37c        fripp-11.guitars.com frippll
120.46.85.87   						fripp.guitars.com fripp fripp-v4
2::9255:a00:20ff:fe87:9aba      strat.guitars.com strat strat-v6
fe80::a00:20ff:fe87:9aba        strat-11.guitars.com stratll
120.46.85.177  						strat.guitars.com strat strat-v4 loghost

Note -

You must group host name addresses by the host name as shown in the above example.


NIS Extensions for IPv6

Two new maps have been added for NIS: ipnodes.byname and ipnodes.byaddr. Similar to /etc/inet/ipnodes, these maps contain both IPv4 and IPv6 information. The existing hosts.byname and hosts.byaddr maps, which contain only IPv4 information, remain as they are to facilitate existing applications.

NIS+ Extensions for IPv6

A new table has been added for NIS+ named ipnodes.org_dir. It contains both IPv4 and IPv6 addresses for a host. The existing hosts.org_dir table, which contains only IPv4 addresses for a host, remains as it is to facilitate existing applications.

DNS Extensions for IPv6

A new resource record defined as an AAAA record has been specified by RFC 1886. This AAAA record maps a host name into an 128-bit IPv6 address. The existing PTR record is still used with IPv6 to map IP addresses into host names. The 32 4-bit nibbles of the 128-bit address are reversed for an IPv6 address. Each nibble is converted to its corresponding hexadecimal ASCII value with ip6.int appended to it.

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.

Changes to Name Service Commands

To support IPv6, you can look up IPv6 addresses with the existing name service commands. For example, the ypmatch command works with the new NIS maps. The nismatch command works with the new NIS+ tables. The nslookup command can look up the new AAAA records in DNS. For a description of the changes to the name services see "NIS Extensions for IPv6", "NIS+ Extensions for IPv6", and "DNS Extensions for IPv6".

For a description of procedures using these commands, see "Displaying IPv6 Name Service Information".