分页: 1 / 1

[问题]请问如何添加永久路由?

发表于 : 2007-06-11 23:06
zgmming
手动添加静态路由后重启电脑就没有了,必须重新添加。
如何添加永久路由呢?

发表于 : 2007-06-12 11:51
zgmming
没人知道么???

Re: [问题]请问如何添加永久路由?

发表于 : 2009-05-10 13:24
tcl911
我也于到了这个问题啊

Re: [问题]请问如何添加永久路由?

发表于 : 2009-10-09 12:31
chaosriver
改interfaces文件,可以参考wiki上的说明,应该算很详细的了。
http://wiki.ubuntu.org.cn/index.php?tit ... F.E7.94.B1
下面是我的设置

#
# Debian / Ubuntu
#

#
# File: /etc/network/interfaces
#

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0 eth0
map eth1 eth1

# The primary network interface
auto eth1
iface eth1 inet static
address 192.168.1.88
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 202.112.20.131


#up route add -net 10.0.0.0 netmask 255.0.0.0 gw 216.10.119.225 eth1

#auto eth1:1
#iface eth1:1 inet static
# address 216.10.119.239
# netmask 255.255.255.224

# The secondary network interface
auto eth0
iface eth0 inet static
address 192.168.72.204
netmask 255.255.255.0
network 192.168.72.0
broadcast 192.168.72.255
#gateway 192.168.72.1
# dns-* options are implemented by the resolvconf package, if installed
#dns-nameservers 202.112.20.131


up route add -net 192.168.72.0 netmask 255.255.255.0 gw 192.168.72.1 eth0