Installing and Administering Internet Services

36 Chapter 2
Installing and Configuring Internet Services
Configuring Internet Addresses
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, but it must contain the
names and IP addresses of all the other hosts in your network. For
information on NIS, see Installing and Administering NFS Services.
If you have a small network and little need for Internet connectivity, 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 “To Edit the /etc/hosts File” on page 36.
If you choose to use BIND, NIS, 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, NIS, or NIS+ is not available.
To Edit the /etc/hosts File
You can use any text editor to edit the /etc/hosts file, or you can use
SAM. SAM (System Administration Manager) is Hewlett-Packard’s
windows-based user interface for performing system administration
tasks. To run SAM, type sam at the HP-UX prompt. SAM has an
extensive online help facility.
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 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
The first field is the IP address, the second is the official host name
(as returned by the hostname command), and any remaining fields
are aliases. Type man 4 hosts for more information.
4. If your host has more than one network interface installed, add a line
to /etc/hosts for each interface. The /etc/hosts entries for your
host will have the same official host name but different aliases and
different IP addresses.