首页 > 其他 > 详细

centos5.5添加静态路由

时间:2015-03-18 18:24:51      阅读:287      评论:0      收藏:0      [点我收藏+]


[root@db2 ~]#route -n   //查看路由表(ip route也可以查看)

技术分享

[root@db2 ~]#route add default gw 10.77.50.1   //添加默认路由网关

[root@db2 ~]#route add -net 10.77.78.0 netmask 255.255.255.0 gw 10.77.50.1

        //添加其他网段


检查防火墙的状态

[root@db2 ~]#/etc/init.d/iptables status

关闭/开启防火墙(即时生效)各2种方法

[root@db2 ~]#service iptables stop

[root@db2 ~]#/etc/init.d/iptables stop

[root@db2 ~]#service iptables start

[root@db2 ~]#/etc/init.d/iptables start

关闭/开启防火墙(永久关闭)重启后生效

[root@db2 ~]#chkconfig iptables off

[root@db2 ~]#chkconfig iptables on

技术分享





本文出自 “点滴记录与你分享” 博客,请务必保留此出处http://xkai20.blog.51cto.com/854040/1621840

centos5.5添加静态路由

原文:http://xkai20.blog.51cto.com/854040/1621840

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