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

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
zgmming
帖子: 2
注册时间: 2007-05-18 14:39

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

#1

帖子 zgmming » 2007-06-11 23:06

手动添加静态路由后重启电脑就没有了,必须重新添加。
如何添加永久路由呢?
zgmming
帖子: 2
注册时间: 2007-05-18 14:39

#2

帖子 zgmming » 2007-06-12 11:51

没人知道么???
tcl911
帖子: 3
注册时间: 2008-04-10 20:24

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

#3

帖子 tcl911 » 2009-05-10 13:24

我也于到了这个问题啊
chaosriver
帖子: 43
注册时间: 2008-10-13 8:52
联系:

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

#4

帖子 chaosriver » 2009-10-09 12:31

改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
回复