static route

On Linux:

To add:

route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1 dev eth0
route add -host 192.168.2.1 gw 192.168.2.254 dev eth0
route add default gw 192.168.2.254

To delete:

route del -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1 dev eth0
route del -host 192.168.2.1 gw 192.168.2.254 dev eth0
route del default gw 192.168.2.254
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License