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

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 at the HP-UX prompt 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.
5. Add any other hosts to the /etc/hosts file that you need to reach. If you use a
BIND or NIS server on a different host, add that host to your /etc/hosts file.
If you have no default gateway configured, and you add a host that is not on your
subnet, HP SMH will prompt you for the gateway. To stop the prompting, configure
a default gateway.
6. If you are not using HP SMH, you must configure a gateway for each host that is
not on your subnet. See “Configuring a Route” (page 29).
7. Make sure the /etc/hosts file is owned by user root and group other, and
make sure the permissions are set to 0444 (-r--r--r--).
Configuring a Route
To configure a route from your system to other networks, complete the following steps:
1. If you use only one gateway to reach all systems on other parts of the network,
configure a default gateway.
You can use HP SMH to configure a default gateway, or if you are not using HP
SMH, issue the following command:
/usr/sbin/route add default gateway_address 1
where gateway_address is the IP address of the gateway host.
Then, set the following environment variables in the
/etc/rc.config.d/netconf file:
ROUTE_DESTINATION[0]="default" ROUTE_GATEWAY[0]="gateway_address" ROUTE_COUNT[0]="1"
If the default gateway is your own host, set the ROUTE_COUNT variable to 0.
Otherwise, set it to 1.
2. If your host is a gateway, configure the destination networks that can be reached
from its network interfaces. Issue the following command for each network interface
on your host:
/usr/sbin/route add net destination IP_address
where destination is a network address reachable by your host, and
IP_address is the address of the network interface.
Configuring the Internet Services Software 29