问题表现
10.10.1.109这台云主机(centos 2.6.32内核), 无法ping通另一台云主机:10.19.255.192
问题分析
1. route命令看路由表信息:
[root@10-10-1-109 uddb1001]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.0.0 10.10.46.198 255.255.0.0 UG 0 0 0 eth0
10.10.0.0 * 255.255.0.0 U 0 0 0 eth0
该路由表有两个问题:
1. 将目的为10.10.0.0网段的包,路由到了10.10.46.198,如果10.10.46.198宕机, 则该机器无法访问
2. 无法路由非10.10 网段的包
问题处理
1. 删除10.10.46.198这条路由规则
route del -net 10.10.0.0/16 gw 10.10.46.198 dev eth0
2. 增加defalut路由规则
route add default gw 10.10.0.1
问题解决。