subota, 16. lipnja 2012.

Add routes in ubuntu

add routes

$ sudo route add [-net|-host] netmask gw dev X

example:
$ sudo route add -host 192.20.0.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth0
$ sudo route add -net 192.20.0.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth0
or
$ sudo route add -host 192.20.0.0 gw 192.168.1.1 dev eth0
$ sudo route add -net 192.20.0.0 gw 192.168.1.1 dev eth0

$ sudo /etc/init.d/networking restart
or
$ sudo /etc/init.d/networking start
$ sudo /etc/init.d/networking stop

$ route -n

Nema komentara:

Objavi komentar