故障:在HP 785G6(服务器有2个集成网卡,4个独立网卡)上装centos6.5后配置网卡信息后,重启网卡报错,提示Bringing uo interface eth0:bnx2 0000:02:03.0:etho:register_cnicFailed Determining if ip address isalready in use for device eth0,网络不通,截图如下
排查经过:查看配置文件,
[root@HGJ0205 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0没有问题,
查看网卡
[root@HGJ0205 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:55:DF:DD:9E
inet addr:10.12.5.103 Bcast:10.12.5.255 Mask:255.255.255.0
inet6 addr: fe80::226:55ff:fedf:dd9e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4885599 errors:0 dropped:0 overruns:0 frame:0
TX packets:5632499 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1460799376 (1.3 GiB) TX bytes:2154273766 (2.0 GiB)
Interrupt:30 Memory:fdce0000-fdd00000
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:7752962 errors:0 dropped:0 overruns:0 frame:0
TX packets:7752962 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3827246039 (3.5 GiB) TX bytes:3827246039 (3.5 GiB)
网卡启动,已经配置了ip,没有问题,检查网关
[root@HGJ0205 ~]# ping 10.12.5.1
发现自己的网关也ping不同。
检查网线状况,发现网线不在集成网卡eth0上,而是在独立配置的网卡上,从而导致配置好网卡信息不是插网线的网卡,也就是说插网线的网卡没有网卡信息,所以不通。
[root@HGJ0205 ~]#cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated bythe /lib/udev/write_net_rules
# program,run by thepersistent-net-generator.rules rules file.
#
# You can modify it,as long as you keepeach rule on a single
# line,and change only the value of theNAME= key.
# PCI device 0x8086:0x105e (e1000e) (customname provided by external tool)
SUBSYSTEM=="net",ACTION=="add",DRIVERS=="?*",ATTR{address}=="00:26:55:df:dd:9f",ATTR{type}=="1",KERNEL=="eth*",NAME="eth3"
# PCI device 0x8086:0x105e (e1000e) (customname provided by external tool)
SUBSYSTEM=="net",ATTR{address}=="00:26:55:e0:35:ef",NAME="eth5"
# PCI device 0x14e4:0x164a (bnx2)
SUBSYSTEM=="net",ATTR{address}=="78:e7:d1:fb:6e:38",NAME="eth1"
# PCI device 0x8086:0x105e (e1000e) (customname provided by external tool)
SUBSYSTEM=="net",ATTR{address}=="00:26:55:df:dd:9e",NAME="eth2"
# PCI device 0x14e4:0x164a (bnx2) (customname provided by external tool)
SUBSYSTEM=="net",0);">78:e7:d1:fb:6e:3a",ATTR{address}=="00:26:55:e0:35:ee",NAME="eth4"
6个网卡,看着都头晕。
解决方案:既然找到问题解决它。只要把网线接口对应的配置文件配置好久可以,两个解决方案
一、配置好一个网络配置文件,然后把网线一个网口一个网口的测试,通了就说明是这个网卡的。
二、网线不动,一个一个配置所有的网卡,哪个通了也说明是对了
注意:1、千万不要把所有的网卡都配置了测试,ip会冲突。
2、集成网卡和独立网卡的mac地址格式是不一样的,这样可以很快的分辨出你配置的是哪个网卡,红色的是集成网卡的,减少排查步骤。
原文链接:https://www.f2er.com/centos/380900.html