首页 > 其他 > 详细

centos 7 添加永久静态路由

时间:2017-03-22 23:58:17      阅读:365      评论:0      收藏:0      [点我收藏+]

cat /etc/sysconfig/static-route 

any net 10.0.0.0/24 gw 192.168.1.2


注:默认情况下主机中并没有该文件,之所以可以是因为/etc/init.d/network启动脚本会调用该文件,具体调用部分代码如下:

# Add non interface-specific static-routes.
if [ -f /etc/sysconfig/static-routes ]; then
grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do
/sbin/route add -$args
done
fi


centos 7 添加永久静态路由

原文:http://tianshili.blog.51cto.com/5050423/1909265

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!