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
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 18.104.22.168 gateway 22.214.171.124 metric 1 passive
net 0.0.0.0 gateway 126.96.36.199 metric 1 passive
The first line is identical to the ‘route add’ command. It creates a route for the network 188.8.131.52 through the gateway machine 150. 101.16.1.
The second entry creates a default route through gateway machine 184.108.40.206.
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