To add static routes on a Solaris UNIX system, you can use the route
command.
route add -net NETWORK_ADDRESS GATEWAY_ADDRESS
For example, to add a route to the network 192.168.1.0
with a gateway of 192.168.1.1
, you would run:
route add -net 192.168.1.0 192.168.1.1
route add -host HOST_ADDRESS GATEWAY_ADDRESS
For example, to add a route to the host 192.168.1.10
with a gateway of 192.168.1.1
, you would run:
route add -host 192.168.1.10 192.168.1.1
/etc/defaultrouter
file. For example, to add the routes from the previous examples, you would add the following lines to the file:192.168.1.1 192.168.1.1
route -n
command. This will show you the destination, gateway, and flags for each route.