2012年2月4日 星期六

[Linux Route] ip route && ip rule


Home IP: 4.3.2.1



Home gateway: 4.3.2.254,



Company network field : 192.168.1.0/24



#New routing path ADD into  routing table 100.

ip route add 192.168.1.0/24 via 4.3.2.254 table 100  ## ip route add destination via Source Table number ( /etc/iptable2/rt_tables )

#Add routing rule,According table 100

ip rule add from 4.3.2.1 to 192.168.1.0/24 table 100  ## ip rule add from Source to destination Table number


 


ip route like   define the destination of packet where to go



ip rule like    define the source of packet where to go

0 意見:

張貼留言