######################################################### # Searchable Keywords: route router netmask The route cmd can be used to view the current routing tables as well as add a new route to a network or delete a route. View current routes: # route -e Add a default router: # route add default gw 192.168.100.1 Add route to a differnent subnet: # route add -net 192.168.200.0 netmask 255.255.255.0 dev eth0 NOTE: - no dash in front of the netmask or add - - you can use this to add routes to different physical interfaces ie eth1, eth2...etc it does NOT work well with virtual dual home intefaces(eth0:1) it defaults to the eth0 interface default route. Delete a route(this is a long string): # route del -net 192.168.200.0 netmask 255.255.255.0 gw 192.168.200.1 dev eth0 Rejecting route(I think this means refuse connections from this network): # route add -net 10.10.0.0 netmask 255.255.0.0 reject Alternatively in Redhat(and probably other linux distros) Linux, you can add the following two lines to the file "/etc/sysconfig/static-routes": eth0 net 192.168.200.0 netmask 255.255.255.0 gw 192.168.200.1 eth1 net 192.168.100.0 netmask 255.255.255.0 gw 192.168.100.2 The commands to delete the above routes with route are: route del -net 192.168.200.0 netmask 255.255.255.0 gw 192.168.200.1 dev eth0 route del -net 192.168.100.0 netmask 255.255.255.0 gw 192.168.100.2 dev eth1