IP Link保持重置为closures状态

最近我把一台服务器(Linux centos 6.5)移到了一台新的服务器上。 我不知道硬件我不拥有服务器。 但是,当我这样做的时候(我已经注意到了这个问题,最近在linux上和虚拟机有关), eth0ip link show将会变成更高的数字。

我在/etc/sysconfig/network-scripts/ifcfg-eth0中将eth0命名为ifcfg-eth2 。 我有问题与IP链路集eth0名称eth2和连接将仍然下降。

刚刚我不得不去做一个链接集eth2,因为链接失败了。

如何防止链接断开? 这是什么原因造成的? 我如何正确解决这个问题。

我注意到在ifconfig时候,我提出了超过400000000000错误。

编辑:

 cat /etc/sysconfig/network-scripts/ifcfg-eth2 DEVICE="eth2" BOOTPROTO=none #BROADCAST="108.xx135" DNS1="208.xx22" GATEWAY="108.xx129" IPADDR="108.xx130" NETMASK="255.255.255.248" NM_CONTROLLED="no" ONBOOT="yes" DNS2=64.xx82 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no cat /etc/udev/rules.d/70-persistent-net.rules # This file was automatically generated by the /lib/udev/write_net_rules # program, run by the persistent-net-generator.rules rules file. # # You can modify it, as long as you keep each rule on a single # line, and change only the value of the NAME= key. # PCI device 0x8086:0x10d3 (e1000e) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:4c:e0:ad", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" # PCI device 0x8086:0x10d3 (e1000e) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:4c:e0:ac", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" # PCI device 0x8086:0x10d3 (e1000e) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:75:ad:69", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2" # PCI device 0x8086:0x10d3 (e1000e) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:75:ad:68", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3" 

我w了.rules文件。 我已经把所有东西都设置为eth0,ip link show会显示UP,而ifconfig会显示eth0设备,但是它仍然会随机地将连接断开。

我不认为你可以用这种方式重命名networking接口

 from http://lxr.free-electrons.com/source/include/linux/netdevice.h#L1143 

linux内核使用struct net_device来定义networking接口,如果接口被引用了,那么接口被使用和重命名而不把接口放下就不是好主意

尝试这个:

  • 擦除/etc/udev/rules.d/70-persistent-net.rules(删除所有内容)
  • 确保只有一个/ etc / sysconfig / network-scripts / ifcfg-eth *文件,并将其命名为/ etc / sysconfig / network-scripts / ifcfg-eth0
  • 重启

我怀疑你已经在这里迁移机器,同时保存你的旧的persistent-net文件。 这似乎造成了一些重大的混乱。