文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>linux静态路由添加删除

linux静态路由添加删除

时间:2009-08-14  来源:waysnow

linux静态路由添加删除

第一种:

添加:

route add -net 192.168.13.0/24 gw 192.168.28.1 dev eth0

删除:

route del -net 192.168.13.0/24

 

永久添加:

(1). 编辑文件:/etc/sysconfig/static-routes

添加内容:“eth0 net 192.168.13.0/24 gw 192.168.0.1”

(2). 把命令写入/etc/rc.local

 

第二种:

添加:

ip route add 192.168.13.0/24 via 192.168.28.1 dev eth0

删除:

ip route del 192.168.13.0/24

永久添加:

(1). 编辑文件:/etc/sysconfig/network-scripts/route-eth0

添加内容:“192.168.13.0/24 via 192.168.28.1”

(2). 把命令写入/etc/rc.local

 

 

Ex.

/sbin/ip route add broadcast 255.255.255.255 dev eth0

echo "broadcast 255.255.255.255 dev eth0" > /etc/sysconfig/network-scripts/route-eth0

相关阅读 更多 +
排行榜 更多 +
超级摩托车特技3D

超级摩托车特技3D

赛车竞速 下载
超级汽车大乱斗

超级汽车大乱斗

赛车竞速 下载
沙漠越野车

沙漠越野车

赛车竞速 下载