|
[root@localhost root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.161 192.168.0.238 255.255.255.255 UGH 0 0 0 eth1
这个是我的路由表。
192。168。1。161是一个主机。
我用route add -host 192.168.1.161 netmask 255。255。255。0 gw 192.168.0.238 dev eth1 添加。提示出错
route: netmask 000000ff doesn't make sense with host route
可是将netmask指定为0。0。0。0,即
route add -host 192.168.1.161 netmask 0.0.0.0 gw 192.168.0.238 dev eth1
就可以成功添加,并且可以ping同192.168.1.161
这个是为什么?难道-host时,不指定netmask么?谢谢 |
|