您的位置:首页 > 运维架构 > Linux

从装centos后配置网卡报错提示Bringing uo interface eth0:bnx2 0000:02: 推荐

2016-09-02 11:09 423 查看
故障:在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",ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:26:55:e0:35:ef",ATTR{type}=="1", KERNEL=="eth*", NAME="eth5"

# PCI device 0x14e4:0x164a (bnx2)
SUBSYSTEM=="net",ACTION=="add", DRIVERS=="?*", ATTR{address}=="78:e7:d1:fb:6e:38", ATTR{type}=="1",KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x105e (e1000e) (customname provided by external tool)
SUBSYSTEM=="net",ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:26:55:df:dd:9e",ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x14e4:0x164a (bnx2) (customname provided by external tool)
SUBSYSTEM=="net",ACTION=="add", DRIVERS=="?*", ATTR{address}=="78:e7:d1:fb:6e:3a", ATTR{type}=="1",KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x105e (e1000e) (customname provided by external tool)
SUBSYSTEM=="net",ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:26:55:e0:35:ee",ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
6个网卡,看着都头晕。

解决方案:既然找到问题解决它。只要把网线接口对应的配置文件配置好久可以,两个解决方案
一、配置好一个网络配置文件,然后把网线一个网口一个网口的测试,通了就说明是这个网卡的。
二、网线不动,一个一个配置所有的网卡,哪个通了也说明是对了
注意:1、千万不要把所有的网卡都配置了测试,ip会冲突。
2、集成网卡和独立网卡的mac地址格式是不一样的,这样可以很快的分辨出你配置的是哪个网卡,红色的是集成网卡的,减少排查步骤。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息