歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 重裝CentOS後配置網卡報錯提示Bringing uo interface eth0:bnx2 0000:02:

重裝CentOS後配置網卡報錯提示Bringing uo interface eth0:bnx2 0000:02:

日期:2017/2/28 13:49:22   编辑:Linux教程

故障:在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地址格式是不一樣的,這樣可以很快的分辨出你配置的是哪個網卡,紅色的是集成網卡的,減少排查步驟。

更多CentOS相關信息見CentOS 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=14

Copyright © Linux教程網 All Rights Reserved