|
我系统默认的设置是这样的
-bash-3.00# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 192.168.0.9 0.0.0.0 UG 0 0 0 eth0
我后来加了一条规则
route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.9 dev eth0
更改后,如下
-bash-3.00# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 192.168.0.9 255.255.255.0 UG 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 192.168.0.9 0.0.0.0 UG 0 0 0 eth0
为什么这样,就ping不通其他的机器了?? |
|