免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2207 | 回复: 6
打印 上一主题 下一主题

[网络管理] 用route增加的路由,为什么重启后就没有了!? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-02-18 08:54 |只看该作者 |倒序浏览
如题

论坛徽章:
0
2 [报告]
发表于 2004-02-18 08:57 |只看该作者

用route增加的路由,为什么重启后就没有了!?

是啊,所以你要在/etc/rc.d/rc.local里将路由写上,这样每次开机就会自动加上路由的

论坛徽章:
0
3 [报告]
发表于 2004-02-18 08:59 |只看该作者

用route增加的路由,为什么重启后就没有了!?

其实可以在rc3.d中添加一个可执行程序,将写在rc.local中的内容写入,加x权限,否则,rc.local太多内容,不好管理。

论坛徽章:
0
4 [报告]
发表于 2004-02-18 09:02 |只看该作者

用route增加的路由,为什么重启后就没有了!?

现在又不知道他是启动到那个TTY下的,如果是图形端就要在rc5.d里了

论坛徽章:
0
5 [报告]
发表于 2004-02-18 09:29 |只看该作者

用route增加的路由,为什么重启后就没有了!?

usr/share/doc/initscripts-<version>;/sysconfig.txt可以找到static-routes的说明:
/etc/sysconfig/static-routes:

  Contains lines of the form:
     
    <device>; host|net <arguments to route command>;
   
  <device>; may be a device name to have the route brought up and
  down with the device, or "any" to have the correct devices calculated
  at run time.

  For example:
   
  eth0 host 192.168.2.2 eth0
   
  adds a host route through eth0 to 192.168.2.2, while

  any net 192.168.2.0 netmask 255.255.255.0 ppp0
   
  adds a network route to the 192.168.2.0 network through ppp0.

在这个文件里加路由,重启也不会丢

(我个人喜欢在rc.local最后加路由)

论坛徽章:
0
6 [报告]
发表于 2004-02-18 09:38 |只看该作者

用route增加的路由,为什么重启后就没有了!?

agree complete add the route into rc.local file

论坛徽章:
0
7 [报告]
发表于 2004-02-19 19:01 |只看该作者

用route增加的路由,为什么重启后就没有了!?

可是以前就没有出现过这样的问题呀!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP