ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

Linux静态的临时路由/永久路由的一些实用命令

2014-4-11 03:51| 发布者: admin| 查看: 556| 评论: 0

摘要: 临时路由,机器重启后消失: route add host 192.168.4.2 dev eth0:1 route add net 192.168.4.0/24 gw 192.168.4.250 route add net 192.168.4.0 netmask 255.255.255.0 gw 192.168.4.250 route del host 192. ...

临时路由,机器重启后消失:

 route add –host 192.168.4.2 dev eth0:1
 route add –net 192.168.4.0/24 gw 192.168.4.250

 route add –net 192.168.4.0 netmask 255.255.255.0 gw 192.168.4.250

 route del –host 192.168.4.2 dev eth0:1
 route del  –net 192.168.4.0/24 192.168.4.250

route del–net 192.168.4.0 netmask 255.255.255.0 gw 192.168.4.250


永久路由,编辑或增加、配置文件:

/etc/sysconfig/static-routes

any net 172.22.0.0/16 gw 172.22.4.254
any net 192.168.0.0/16 gw 172.22.4.254

不良信息举报Q:2000617
新用户7天后可回帖!

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2025-11-7 06:29 , Processed in 0.029593 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部