最近项目上,遇到一个问题,让我们很是没办法,就是Dell R920 安装上CentOS7的系统,做完Bonding后,发现端口重启系统后会紊乱,过程如下:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="78:2b:cb:xx:xx:01", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="78:2b:cb:xx:xx:02", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="78:2b:cb:xx:xx:03", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="78:2b:cb:xx:xx:04", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:xx:xx:a1", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:xx:xx:a0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth5"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:60:6e:xx:xx:f6", ATTR{type}=="1", KERNEL=="eth*", NAME="eth6"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:60:6e:xx:xx:f7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth7" “以上MAC地址与网卡端口对应”
总结:以上方法并不能解决网口紊乱问题,因为官方文档都要求bond的网卡都不需要写MAC地址,所以最后我们尝试使在每个/etc/sysconfig/network-scripts/ifcfg-eth*网卡配置文件上写上HWADDR,重启有7-8遍,做ethtool检查几次,发现在没有问题,所以建议遇到同样问题同学,可以尝试一下这种方法 |