添加静态路由
在 网卡配置目录(类似/etc/sysconfig/network-script/)下,新建名为routes-ethX 文件(为哪张网卡添加路由,名字就是哪个),在其添加类似如下内容:
[root@web02 network-scripts]# cat route-eth1
192.168.1.0/28(目标网络) via 192.168.1.249(网关) dev eth1(网卡名)
再重启网络服务,然后 route -n 可看到添加的路由