改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