Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX IPv6 Transport Administrator's Guide for TOUR 2.0: HP-UX 11i v1 > Chapter 3 Configuration

Host Names and IPv6 Addresses

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

The following section provides additional information on how addressing works on HP-UX 11i v1 IPv6 bundled as part of TOUR 2.0.

Creating the /etc/hosts File

It is generally recommended to add IPv6 addresses (known as AAAA records) to a DNS Name Server only when the following conditions are true:

  • The IPv6 address is assigned to the interface on the node

  • The address is configured on the interface

  • The interface is on a link which connects to the IPv6 infrastructure

HP recommends beginning with IPv6 addresses and host names in the
/etc/hosts file on a development network; then adding IPv6 addresses and hosts to a Domain Name Service when moving IPv6 to a production backbone network.

This subsection describes how to edit the /etc/hosts file to add an IPv6 address and host name for the network interface you are configuring.

NOTE: If using the name service DNS over IPv6, add the IP address and host name to the appropriate databases on the name server system. Refer to BIND v9.2.0 (or later) documentation on docs.hp.com for more information on DNS over IPv6.

The /etc/hosts file associates IP host addresses with mnemonic host names and alias names. It contains the names of other nodes in the network with which your system can communicate.

Example Host Name Entry

The example below shows how a system with the name, host3, might be referenced in the /etc/hosts file:

System name in swinstall screen: host3

/etc/hosts file:

3ffe:ffff:101::230:6eff:fe04:d9ff  host3  host3.site2.region4
192.1.2.34 hpfcrm loghost
NOTE: HP-UX 11i v1 IPv6 bundled as part of TOUR 2.0 is a dual stack implementation. A single host name can have entries for both an IPv6 address and an IPv4 address in /etc/hosts.

Name and Address Lookup for IPv6

/etc/nsswitch.conf (nsswitch.conf(4)) is a configuration file for the name service switch. The ipnodes entity specifies which name services resolve IPv4 and IPv6 addresses and host names on HP-UX 11i IPv6 bundled as part of TOUR 2.0.

More specifically, the ipnodes keyword specifies the resolver policy for the library functions getnameinfo(3N), getaddrinfo(3N), getipnodebyname(3N) and getipnodebyaddr(3N) for both IPv4 and IPv6 addresses. The existing keyword “hosts” specifies the resolver policy for the library functions gethostbyname() and gethostbyaddr() for IPv4 addresses.

NOTE: Internet Services applications (such as telnet, r-commands, etc.) use these library functions to resolve IPv4 and IPv6 addresses.

By default, the /etc/nsswitch.conf is not on the system. The default ipnodes policy (same as default hosts policy) is as follows:

dns [NOTFOUND=return] files

This policy implies that dns is the authoritative resolver and will only try files if dns is down. If dns is available but returns NOTFOUND, the search stops.

Thus, if DNS has not been set up as the definitive source, and files (/etc/hosts) may need to be used for address and host name resolution, HP recommends adding the following entry to /etc/nsswitch.conf:

ipnodes: dns [NOTFOUND=continue] files

Or if /etc/hosts is to be the primary Name Service, the entry must be set as follows:

ipnodes: files [NOTFOUND=continue] dns
NOTE: You can not specify NIS or NIS+ on the ipnodes entry.

Manually editing nsswitch.conf

If the current system has no nsswitch.conf file, use a text editor to create an /etc/nsswitch.conf file containing one of the following lines, or copy the /etc/nsswitch.defaults file and modify as needed.

If DNS is the primary Name Service, but not necessarily the definitive source, and files (/etc/hosts) may need to be used for address and host name resolution, add:

ipnodes: dns [NOTFOUND=continue] files

Or if /etc/hosts is to be the primary Name Service, add:

ipnodes: files [NOTFOUND=continue] dns

Refer to the nsswitch.conf(4) man page for more information.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2004 Hewlett-Packard Development Company, L.P.