问题描述:route-eth1文件设置静态路由,重启服务器用route -n命令查看路由没有生效。
cat route-eth1
172.16.13.0/24 via 172.16.12.254 dev eth1
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 172.16.23.254 0.0.0.0 UG 102 0 0 eth2
172.16.8.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
172.16.12.0 0.0.0.0 255.255.255.0 U 101 0 0 eth1
172.16.23.0 0.0.0.0 255.255.255.0 U 102 0 0 eth2
解决方案:升级系统内核,再重启系统,再查看路由就生效了
yum update --skip-broken
reboot