Chinaunix

标题: 用route增加的路由,为什么重启后就没有了!? [打印本页]

作者: hzxrh    时间: 2004-02-18 08:54
标题: 用route增加的路由,为什么重启后就没有了!?
如题
作者: lichin    时间: 2004-02-18 08:57
标题: 用route增加的路由,为什么重启后就没有了!?
是啊,所以你要在/etc/rc.d/rc.local里将路由写上,这样每次开机就会自动加上路由的
作者: mayazhang    时间: 2004-02-18 08:59
标题: 用route增加的路由,为什么重启后就没有了!?
其实可以在rc3.d中添加一个可执行程序,将写在rc.local中的内容写入,加x权限,否则,rc.local太多内容,不好管理。
作者: lichin    时间: 2004-02-18 09:02
标题: 用route增加的路由,为什么重启后就没有了!?
现在又不知道他是启动到那个TTY下的,如果是图形端就要在rc5.d里了
作者: bird123    时间: 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最后加路由)
作者: exper    时间: 2004-02-18 09:38
标题: 用route增加的路由,为什么重启后就没有了!?
agree complete add the route into rc.local file
作者: hzxrh    时间: 2004-02-19 19:01
标题: 用route增加的路由,为什么重启后就没有了!?
可是以前就没有出现过这样的问题呀!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2