手动添加静态路由后重启电脑就没有了,必须重新添加。
如何添加永久路由呢?
[问题]请问如何添加永久路由?
-
- 帖子: 2
- 注册时间: 2007-05-18 14:39
-
- 帖子: 3
- 注册时间: 2008-04-10 20:24
Re: [问题]请问如何添加永久路由?
我也于到了这个问题啊
-
- 帖子: 43
- 注册时间: 2008-10-13 8:52
- 联系:
Re: [问题]请问如何添加永久路由?
改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
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
benry
tojingpeng@gmail.com
tojingpeng@gmail.com