静态路由表的配置文件为:/etc/sysconfig/network-scripts/route-网卡名
。
以网卡eth0
为例,如果要针对eth0
添加一条静态路由,可以在配置文件/etc/sysconfig/network-scripts/route-eth0
中添加以下配置:
1 2 |
200.200.0.0/16 via 10.66.255.254 200.200.24.0/22 via 10.66.255.254 |
然后重启network
服务即可生效!
评论