Routing Table

 

要確定 正確的routing table:
root@wayne21205-BM6630-BM6330-BP6230-8:/wayne_code# route -n                                       

     Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         140.115.156.254 0.0.0.0         UG    0      0        0 eth0
140.115.156.0   0.0.0.0         255.255.255.0   U     1      0        0 eth0
192.168.15.0    0.0.0.0         255.255.255.0   U     1      0        0 eth1

若有異常的routing,用下列指令將其刪除
route del -net 169.254.0.0 netmask 255.255.0.0 gw 0.0.0.0 dev eth0
route del -net 192.168.15.0 netmask 255.255.255.0 gw 0.0.0.0 dev eth0


另外也可以使用 route 來加入你的路由表,假如你要將一個網路為 192.56.76.XXX 且子網路為 255.255.255.0 的位
置加入你的 eth0 這個網路卡的連線處理中,就可以使用如下的語法:
[root@tsai /root]# route add -net 192.56.76.0 netmask 255.255.255.0 dev eth0

文章標籤
全站熱搜
創作者介紹
創作者 Wayne 的頭像
Wayne

Wayne Technique Study

Wayne 發表在 痞客邦 留言(0) 人氣(32)