xen+debian 网络升级后 squeeze 到 wheeze

xen+debian 网络升级后 squeeze 到 wheeze

我有一台 Debian + Xen 服务器。系统升级到稳定版本后,启动后网络无法启动。每次重启后我都需要手动启动它。升级期间网络配置没有更改。

这是 /etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 11.22.33.44
    netmask 255.255.255.0
    gateway 11.22.33.1
    nameserver 8.8.8.8

启动后ip r显示无路由且eth0无 IP 地址。手动 IP 和路由设置正常,网络开始工作。

我发现的关于网络的消息dmesg(看起来没什么有趣的)

[    3.894401] ACPI: Fan [FAN3] (off)
[    3.894444] ACPI: Fan [FAN4] (off)
[    4.178348] e1000e 0000:00:19.0: eth0: (PCI Express:2.5GT/s:Width x1) 00:1e:67:14:66:c9
[    4.178351] e1000e 0000:00:19.0: eth0: Intel(R) PRO/1000 Network Connection
[    4.178392] e1000e 0000:00:19.0: eth0: MAC: 10, PHY: 11, PBA No: 0100FF-0FF
[    4.178413] e1000e 0000:02:00.0: Disabling ASPM L0s L1
[    4.178432] xen: registering gsi 16 triggering 0 polarity 1
--
[    4.223667] ata5: DUMMY
[    4.223668] ata6: DUMMY
[    4.289153] e1000e 0000:02:00.0: eth1: (PCI Express:2.5GT/s:Width x1) 00:1e:67:14:66:c8
[    4.289155] e1000e 0000:02:00.0: eth1: Intel(R) PRO/1000 Network Connection
[    4.289245] e1000e 0000:02:00.0: eth1: MAC: 3, PHY: 8, PBA No: 1000FF-0FF
[    4.506908] usb 1-1: new high-speed USB device number 2 using ehci_hcd
[    4.542920] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
--
[   10.362999] EXT4-fs (dm-23): mounted filesystem with ordered data mode. Opts: (null)
[   10.419103] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: (null)
[   10.988255] ADDRCONF(NETDEV_UP): eth1: link is not ready
[   13.175533] Event-channel device installed.
[   13.287555] XENBUS: Unable to read cpu state
--
[   13.288670] XENBUS: Unable to read cpu state
[   13.965939] Bridge firewalling registered
[   14.134048] e1000e: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[   14.283862] ADDRCONF(NETDEV_UP): peth0: link is not ready
[   14.284543] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   17.800627] e1000e: peth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[   17.801377] ADDRCONF(NETDEV_CHANGE): peth0: link becomes ready
[   18.307278] device peth0 entered promiscuous mode
[   24.538899] eth1: no IPv6 routers present
[   28.570902] peth0: no IPv6 routers present

我升级了两台服务器,其中两台都出现了这种情况。如何修复这个问题并让网络在启动时自动启动?

答案1

您需要将 etnernet 电缆切换到另一个以太网端口,或者在配置中将 eth0 更改为 eth1。原因是您有两个以太网接口,而现在您正在配置没有电缆的接口。

注意

e1000e:eth1 NIC 链路处于 1000 Mbps 全双工状态,流量控制:Rx/Tx

您也可以尝试删除/etc/udev/rules.d/70-persistent-net.rules和/或更改内容以反映您想要的内容。该文件决定哪个网络接口获得什么名称。重新启动以使更改或删除生效。删除没问题,它将重新生成。

顺便说一下,dmesg 消息还显示peth0因此可能只是 udev 将 eth0 重命名为 peth0。删除或更改/etc/udev/rules.d/70-persistent-net.rules也会处理这个问题。或者改变eth0peth0在您的配置中。

[ 17.801377] ADDRCONF(NETDEV_CHANGE):peth0:链接已准备就绪

相关内容