我正在使用 Ubuntu 12.04,在 VMWare 中运行。我的/etc/network/interfaces
文件包括:
# The loopback network interface
auto lo
iface lo inet loopback
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.3.15
netmask 255.255.255.0
network 192.168.3.0
broadcast 192.168.3.255
gateway 192.168.3.254
dns-nameservers 8.8.8.8
auto eth1
iface eth1 inet static
address 192.168.3.40
netmask 255.255.255.0
network 192.168.3.0
broadcast 192.168.3.255
gateway 192.168.3.15
dns-nameservers 192.168.1.15
我运行了该命令/etc/init.d/networking restart
,它返回了以下内容:
*Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
*Reconfiguring network interfaces...
RTNETLINK answers: File exists
Failed to bring up eth1
[ OK ]