一开始使用如下命令:
[root@UnixHost ]# route delete default gw 192.168.137.255 eth0
route: SIOCDELRT: No such process
之后使用
route del -net 192.168.137.9 netmask 255.255.255.0 dev eth0
发现提示route: netmask and route address conflict
可能是命令参数有误,匹配不到路由,于是输入route命令,查看本机路由
[root@UnixHost ]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.137.1 0.0.0.0 UG 0 0 0 eth0
192.168.137.0 * 255.255.255.0 U 0 0 0 eth0
难怪Linux主机无法上网,这路由表怎么这么奇怪!然后执行下面的命令
route del -net 192.168.137.0 netmask 255.255.255.0 dev eth0
成功删除!