我在运行Ubuntu12.04的eth1和eth0上遇到问题,我有2桥和1 1NAT,这里是我的ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:7f:05:19
inet addr:10.10.10.51 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe7f:519/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:583 errors:0 dropped:0 overruns:0 frame:0
TX packets:117 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:76518 (76.5 KB) TX bytes:18000 (18.0 KB)
Interrupt:19 Base address:0x2024
eth1 Link encap:Ethernet HWaddr 00:0c:29:7f:05:23
inet addr:192.168.2.60 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe7f:523/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:631 errors:0 dropped:0 overruns:0 frame:0
TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:85875 (85.8 KB) TX bytes:8921 (8.9 KB)
Interrupt:19 Base address:0x20a4
eth2 Link encap:Ethernet HWaddr 00:0c:29:7f:05:2d
inet addr:192.168.112.205 Bcast:192.168.112.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe7f:52d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:147 errors:0 dropped:0 overruns:0 frame:0
TX packets:283 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:42615 (42.6 KB) TX bytes:42952 (42.9 KB)
Interrupt:16 Base address:0x2424
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:103 errors:0 dropped:0 overruns:0 frame:0
TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8632 (8.6 KB) TX bytes:8632 (8.6 KB)
这是我的界面
auto lo
iface lo inet loopback
auto eth2
iface eth2 inet dhcp
auto eth0
iface eth0 inet static
address 10.10.10.51
netmask 255.255.255.0
gateway 10.10.10.1
auto eth1
iface eth1 inet static
address 192.168.2.60
netmask 255.255.255.0
gateway 192.168.2.1
这里是我在运行/etc/init.d/网络重新启动时遇到的错误。
root@ubuntu:/home/advitor# /etc/init.d/networking restart
* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces... * Disconnecting iSCSI targets
...done.
* Stopping iSCSI initiator service
...done.
* Starting iSCSI initiator service iscsid
...done.
* Setting up iSCSI targets
...done.
ssh stop/waiting
ssh start/running, process 4394
RTNETLINK answers: File exists
Failed to bring up eth0.
RTNETLINK answers: File exists
Failed to bring up eth1.
我试着运行ifup -v来提供更多关于eth0和eth1的信息,它给了我这个信息。
root@ubuntu:/home/advitor# ifup -v eth1
Configuring interface eth1=eth1 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/vlan
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
ip addr add 192.168.2.60/255.255.255.0 broadcast + dev eth1 label eth1
RTNETLINK answers: File exists
Failed to bring up eth1.
root@ubuntu:/home/advitor# ifup -v eth0
Configuring interface eth0=eth0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/vlan
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
ip addr add 10.10.10.51/255.255.255.0 broadcast + dev eth0 label eth0
RTNETLINK answers: File exists
Failed to bring up eth0.
我希望你能指导我如何解决这个问题。
发布于 2013-08-02 04:27:05
显然,不建议再使用/etc/init.d/networking (正如您的输出所指出的)。正如解释过的这里一样,首选的方法是手动关闭和提升接口。
你能试试这个看看是否有用吗?
ifdown eth0
ifup eth0
ifdown eth1
ifup eth1
https://askubuntu.com/questions/327668
复制相似问题