Cody Blog

Route notes

不同的目的IP走不同的 Interface

route change 10.1.0.0 mask 255.255.0.0 10.201.128.1 if  13 metric 150
route add 10.45.0.0 mask 255.255.0.0 10.1.247.254 if 10 metric 1
route add 10.1.0.0 mask 255.255.0.0 10.1.247.254 if 10 metric 1
route add 10.28.0.0 mask 255.255.0.0 10.1.247.254 if 10 metric 1
route add 211.76.0.0 mask 255.255.0.0 10.1.247.254 if 10 metric 1

Add Route Rule in Ubuntu

$ sudo route add -net 118.163.150.1 netmask 255.255.255.255 gw 192.168.1.1

post-up for start-up

放到 /etc/network/interfaces

post-up route add -net 118.163.150.1 netmask 255.255.255.255 gw 192.168.1.1

Delete route ruble

route del -net 118.163.150.1 netmask 255.255.255.255

Display Route table

1. $ ip route show

  1. $ /sbin/route -n

Add reoute table example

route add 10.22.0.0 mask 255.255.0.0 10.1.247.254 if 10 metric 1

OS

Related Posts

Comments