HP-UX LAN Administrator's Guide (Feburary 2007)

Table Of Contents
Manually Installing and Configuring HP-UX LANDRAFT COPY
Creating the /etc/hosts File
Chapter 428
Creating the /etc/hosts File
You must edit the /etc/hosts file to add an IP address and hostname for the LAN card that
you are installing.
NOTE If you are using a naming service (DNS or NIS), you will need to modify the
/etc/hosts file to add the IP address and host name to the appropriate
databases on the name server system. Refer to Internet Services
Administrator’s Guide and NFS Services Administrator’s Guide for more
information on naming services.
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. HP-UX LAN diagnostics netstat and ping use /etc/hosts. If you install
HP-UX Internet Services or HP-UX NFS, those products also use the /etc/hosts file.
You can create an /etc/hosts file three ways:
From scratch, entering the known nodes in the format shown below.
By copying the file from another node.
By copying the official host database maintained at the Network Information Control
Center (NIC) for ARPA Internet networks, if you are installing HP-UX Internet Services.
If you copy an /etc/hosts file from another host, you may need to update the file by adding
unofficial aliases or unknown hosts, including your own host.
Network and System Names
A system is known by several names, each with its own purpose:
System name: Used for cluster configuration and UUCP communication.
Host name and aliases: Used for most network communication. This might be a fully qualified
domain name including the DNS domain. For example: turtle.bnio.nmt.edu
HP recommends that you try to keep these names as consistent as possible, within their
limitations. This will help to minimize confusion.
The examples below show how a system with the name, host3, might be referenced in the
/etc/hosts and other system and networking files and commands:
System name in Install screen: