小编Zoo*_*oon的帖子

Linux 添加了错误的默认路由

出于某种原因,我的 Centos 5.9 Linux 2.6.18 x86_64 希望我有两个默认路由。

每当我重新启动服务器时,我的路由表如下所示:

[root@server1 ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
255.255.255.255 0.0.0.0         255.255.255.255 UH    0      0        0 bond0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 bond1
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 bond0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 bond1
0.0.0.0         192.168.10.1    0.0.0.0         UG    0      0        0 bond0
0.0.0.0         192.168.0.254   0.0.0.0         UG    0      0        0 bond1
Run Code Online (Sandbox Code Playgroud)

bond1 是一个本地网络,因此最后一条默认路由指向该网络会使所有 Internet 请求失败。

通过执行很容易修复它route del default …

networking linux static-routes route linux-networking

6
推荐指数
1
解决办法
2万
查看次数