route add如何添加静态路由


当前第2页 返回上一页

static-routes文件又是什么呢,这个是network脚本执行时调用的一个文件,这个文件的放置在/etc/sysconfig目录下,在network脚本中的位置是:

1

2

3

4

5

6

# 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

从这段脚本可以看到,这个就是添加静态路由的方法,static-routes的写法是

1

any net 192.168.0.0/16 gw 网关ip。

(推荐学习:linux教程)

以上就是route add如何添加静态路由的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

Route add如何添加静态路由

Route命令详解

Route命令详解

linux系统如何添加静态路由

linux系统如何添加静态路由

Route add命令如何使用

Route add如何添加静态路由

Route add命令如何使用

更多相关阅读请进入《Route》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...