- 论坛徽章:
- 0
|
用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最后加路由) |
|