HP-UX Internet Services Administrator's Guide (May 2010)

1. If you use only one gateway to reach all systems on other parts of the network,
configure a default gateway.
You can use SAM to configure a default gateway, or if you are not using SAM,
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.
Then, create a new set of routing variables in the /etc/rc.config.d/netconf
file for each network interface. Whenever you create a new set of variables,
increment the number in square brackets, as in the following example:
ROUTE_DESTINATION[1]="15.13.131.0"
ROUTE_GATEWAY[1]="15.13.131.213"
ROUTE_COUNT[1]="0"
3. If you will not be using gated, configure routes to all the networks you need to
reach. Type the following command for each network you need to reach from your
host:
/usr/sbin/route add net network_address gateway_address
Then, create a new set of routing variables in the /etc/rc.config.d/netconf
file for each new route. Whenever you create a new set of variables, increment the
number in square brackets.
ROUTE_DESTINATION[n]="network_address"
ROUTE_GATEWAY[n]="gateway_address"
ROUTE_COUNT[n]="1"
If ROUTE_GATEWAY[n] is your own host, set ROUTE_COUNT[n] to 0. Otherwise,
set it to 1.
4. Type the following command to verify the routes you have configured:
/usr/bin/netstat -r
30 Installing and Configuring Internet Services