尝试在 Ubuntu 12.04 上执行以下操作。
尝试配置 eth0 和 eth1,eth0 工作正常,但无法带 eth1。
以下是设置/etc/network/interfaces:
auto eth0 eth1
iface eth0 inet static
address 172.19.20.186
netmask 255.255.255.252
network 172.19.20.184
broadcast 172.19.20.187
gateway 172.19.20.185
iface eth1 inet static
address 172.18.182.55
netmask 255.255.254.0
gateway 172.18.182.1
up route add -net 172.19.26.0/23 gw 172.19.20.185 dev eth0
up route add -net 172.19.24.0/23 gw 172.19.20.185 dev eth0
up route add default gw 172.18.182.1 dev eth1
Run Code Online (Sandbox Code Playgroud)
当/etc/init.d/networking restart完成后,得到下述错误:
$ /etc/init.d/networking restart
RTNETLINK answers: File exists
Failed to bring …Run Code Online (Sandbox Code Playgroud)