HP-UX Internet Services Administrator's Guide (February 2007)

By configuring the name service switch, you can use these name services in any order
you choose. See “Configuring the Name Service Switch” (page 25).
If you have a large network, or if you need to connect to Internet hosts outside your
local network, use BIND as your primary name service. When you use BIND, you
administer a central database containing only the hosts on your local network, and you
have access to the databases on all the other hosts on the Internet. See “Configuring
and Administering the BIND Name Service” in the HP-UX IP Address and Client
Management Administrator’s Guide at the URL
http://www.docs.hp.com/hpux/netcom/index.html#Internet%20Services,
for instructions on configuring BIND.
If you have a large network and little need for Internet connectivity, you can use NIS
as your primary name service. The NIS hosts database is administered centrally on one
of your hosts. However, this database must contain the names and IP addresses of all
the other hosts in your network.
Alternatively, you can use the /etc/hosts file as your primary name service. Each
host in your network needs a copy of the /etc/hosts file containing the names and
addresses of all the other hosts in your network. For information on the /etc/hosts
file, see “Editing the /etc/hosts File” (page 28).
NOTE: If you choose to use BIND or NIS as your primary name service, you still need
to configure a minimal /etc/hosts file so that your host can boot if BIND or NIS is
not available.
Editing the /etc/hosts File
You can use any text editor to edit the /etc/hosts file, or you can use the HP System
Management Homepage (HP SMH).
Follow these steps to edit the /etc/hosts file:
1. If no /etc/hosts file exists on your host, copy /usr/newconfig/etc/hosts
to /etc/hosts, or use ftp to copy the /etc/hosts file to your host from another
host on your network. Type man 1 ftp at the HP-UX prompt for more
information.
2. Make sure your /etc/hosts file contains the following line:
127.0.0.1 localhost loopback
3. Add your own host’s IP address, name, and aliases to the /etc/hosts file, as in
the following example:
15.13.131.213 hpindlpk romney
28 Installing and Configuring Internet Services