Solaris Troubleshooting : Define a Static Route using routed
In order to do this you must create entries in the /etc/gateways file. The /etc/gateways file has the format of
net < remote-network-ip> gateway < gateway-ip> metric <hop-count> passive
or
net <remote-network-ip> gateway < gateway-ip> metric <hop-count> active
The keyword ‘passive’ should be used if you want the entry to be permanent. The keyword ‘active’ should be used if you want in.routed to occasionally query the gateway host, and delete the route if it becomes inactive.
An example of a gateway file follow:
# cat /etc/gateways
net 150.101.17.0 gateway 150.101.16.1 metric 1 passive
net 0.0.0.0 gateway 150.101.16.2 metric 1 passive
The first line is identical to the ‘route add’ command. It creates a route for the network 150.101.17.0 through the gateway machine 150. 101.16.1.
The second entry creates a default route through gateway machine 150.101.16.2.
You can also add routes to specific hosts in the gateways file by using the keyword ‘host’ rather than ‘net’ and specifying a host address rather than a network address






