我在让 CentOS 识别英特尔以太网卡时遇到了问题。有什么建议吗?

我在让 CentOS 识别英特尔以太网卡时遇到了问题。有什么建议吗?

我有一张双端口 Intel Pro/1000 (82571EB) PCIe 卡。我已将其安装到运行 CentOS 6.2 x64 的 Dell PowerEdge 1950 中。检测到了卡并加载了内核模块,但没有创建启动脚本/etc/sysconfig/network-scripts。手动创建启动脚本没有帮助;我收到有关未检测到设备的错误。

我觉得可能是卡坏了,于是尝试了另一张卡(相同型号),甚至将其放在不同的插槽中。但毫无效果。然而,奇怪的是,这张卡在 PowerEdge 2950 中运行正常。有人有什么建议吗?谢谢!

dmesg输出:

[root@rbn1 ~]# dmesg | grep e1000
e1000e: Intel(R) PRO/1000 Network Driver - 1.9.5-NAPI
e1000e: Copyright(c) 1999 - 2011 Intel Corporation.
e1000e 0000:0e:00.0: Disabling ASPM  L1
e1000e 0000:0e:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
e1000e 0000:0e:00.0: setting latency timer to 64
e1000e 0000:0e:00.0: irq 95 for MSI/MSI-X
e1000e 0000:0e:00.0: eth0: (PCI Express:2.5GT/s:Width x4) 00:15:17:3d:19:0c
e1000e 0000:0e:00.0: eth0: Intel(R) PRO/1000 Network Connection
e1000e 0000:0e:00.0: eth0: MAC: 1, PHY: 4, PBA No: C57721-005
e1000e 0000:0e:00.1: Disabling ASPM  L1
e1000e 0000:0e:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
e1000e 0000:0e:00.1: setting latency timer to 64
e1000e 0000:0e:00.1: irq 96 for MSI/MSI-X
e1000e 0000:0e:00.1: eth1: (PCI Express:2.5GT/s:Width x4) 00:15:17:3d:19:0d
e1000e 0000:0e:00.1: eth1: Intel(R) PRO/1000 Network Connection
e1000e 0000:0e:00.1: eth1: MAC: 1, PHY: 4, PBA No: C57721-005

lspci输出:

[root@rbn1 ~]# lspci -vv -s 0e:00.0  
0e:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)
        Subsystem: Intel Corporation PRO/1000 PT Dual Port Server Adapter
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 95
        Region 0: Memory at fc3e0000 (32-bit, non-prefetchable) [size=128K]
        Region 1: Memory at fc3c0000 (32-bit, non-prefetchable) [size=128K]
        Region 2: I/O ports at ece0 [size=32]
        Capabilities: [c8] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=1 PME-
        Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000feeff00c  Data: 41a9
        Capabilities: [e0] Express (v1) Endpoint, MSI 00
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal+ Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 256 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr+ TransPend-
                LnkCap: Port #6, Speed 2.5GT/s, Width x4, ASPM L0s L1, Latency L0 <4us, L1 <64us
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x4, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [100] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO+ CmpltAbrt+ UnxCmplt+ RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UESvrt: DLP+ SDES- TLP+ FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr+ BadTLP+ BadDLLP+ Rollover+ Timeout+ NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap- CGenEn- ChkCap- ChkEn-
        Capabilities: [140] Device Serial Number 00-15-17-ff-ff-3d-19-0c
        Kernel driver in use: e1000e
        Kernel modules: e1000e

modinfo输出:

[root@rbn1 ~]# modinfo e1000
filename:       /lib/modules/2.6.32-220.4.2.el6.x86_64/kernel/drivers/net/e1000/e1000.ko
version:        7.3.21-k6-1-NAPI
license:        GPL
description:    Intel(R) PRO/1000 Network Driver
author:         Intel Corporation, <[email protected]>
srcversion:     1E2D367750FBA71152AA4A7
alias:          pci:v00008086d00002E6Esv*sd*bc*sc*i*
alias:          pci:v00008086d000010B5sv*sd*bc*sc*i*
alias:          pci:v00008086d00001099sv*sd*bc*sc*i*
alias:          pci:v00008086d0000108Asv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Csv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Asv*sd*bc*sc*i*
alias:          pci:v00008086d00001079sv*sd*bc*sc*i*
alias:          pci:v00008086d00001078sv*sd*bc*sc*i*
alias:          pci:v00008086d00001077sv*sd*bc*sc*i*
alias:          pci:v00008086d00001076sv*sd*bc*sc*i*
alias:          pci:v00008086d00001075sv*sd*bc*sc*i*
alias:          pci:v00008086d00001028sv*sd*bc*sc*i*
alias:          pci:v00008086d00001027sv*sd*bc*sc*i*
alias:          pci:v00008086d00001026sv*sd*bc*sc*i*
alias:          pci:v00008086d0000101Esv*sd*bc*sc*i*
alias:          pci:v00008086d0000101Dsv*sd*bc*sc*i*
alias:          pci:v00008086d0000101Asv*sd*bc*sc*i*
alias:          pci:v00008086d00001019sv*sd*bc*sc*i*
alias:          pci:v00008086d00001018sv*sd*bc*sc*i*
alias:          pci:v00008086d00001017sv*sd*bc*sc*i*
alias:          pci:v00008086d00001016sv*sd*bc*sc*i*
alias:          pci:v00008086d00001015sv*sd*bc*sc*i*
alias:          pci:v00008086d00001014sv*sd*bc*sc*i*
alias:          pci:v00008086d00001013sv*sd*bc*sc*i*
alias:          pci:v00008086d00001012sv*sd*bc*sc*i*
alias:          pci:v00008086d00001011sv*sd*bc*sc*i*
alias:          pci:v00008086d00001010sv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Fsv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Esv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Dsv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Csv*sd*bc*sc*i*
alias:          pci:v00008086d00001009sv*sd*bc*sc*i*
alias:          pci:v00008086d00001008sv*sd*bc*sc*i*
alias:          pci:v00008086d00001004sv*sd*bc*sc*i*
alias:          pci:v00008086d00001001sv*sd*bc*sc*i*
alias:          pci:v00008086d00001000sv*sd*bc*sc*i*
depends:        
vermagic:       2.6.32-220.4.2.el6.x86_64 SMP mod_unload modversions 
parm:           TxDescriptors:Number of transmit descriptors (array of int)
parm:           RxDescriptors:Number of receive descriptors (array of int)
parm:           Speed:Speed setting (array of int)
parm:           Duplex:Duplex setting (array of int)
parm:           AutoNeg:Advertised auto-negotiation setting (array of int)
parm:           FlowControl:Flow Control setting (array of int)
parm:           XsumRX:Disable or enable Receive Checksum offload (array of int)
parm:           TxIntDelay:Transmit Interrupt Delay (array of int)
parm:           TxAbsIntDelay:Transmit Absolute Interrupt Delay (array of int)
parm:           RxIntDelay:Receive Interrupt Delay (array of int)
parm:           RxAbsIntDelay:Receive Absolute Interrupt Delay (array of int)
parm:           InterruptThrottleRate:Interrupt Throttling Rate (array of int)
parm:           SmartPowerDownEnable:Enable PHY smart power down (array of int)
parm:           KumeranLockLoss:Enable Kumeran lock loss workaround (array of int)
parm:           copybreak:Maximum size of packet that is copied to a new buffer on receive (uint)
parm:           debug:Debug level (0=none,...,16=all) (int)

手动创建的初始化脚本:

[root@rbn1 network-scripts]# cat ifcfg-p1p1 
DEVICE="p1p1"
HWADDR="00:15:17:3d:19:0c"
ONBOOT=yes
USERCTL=no
NM_CONTROLLED="no"
BOOTPROTO=none
TYPE=Ethernet
IPADDR=192.168.200.2
NETMASK=255.255.255.0

[root@rbn1 network-scripts]# ifup p1p1 
Device p1p1 does not seem to be present, delaying initialization.

ip link输出:

[root@rbn1 network-scripts]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: p2p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:15:17:3d:19:0c brd ff:ff:ff:ff:ff:ff
3: p2p2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:15:17:3d:19:0d brd ff:ff:ff:ff:ff:ff
4: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
    link/ether 00:1d:09:69:1a:26 brd ff:ff:ff:ff:ff:ff
5: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
    link/ether 00:1d:09:69:1a:26 brd ff:ff:ff:ff:ff:ff
6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP 
    link/ether 00:1d:09:69:1a:26 brd ff:ff:ff:ff:ff:ff
7: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 00:1d:09:69:1a:26 brd ff:ff:ff:ff:ff:ff
8: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 52:54:00:7b:e9:cb brd ff:ff:ff:ff:ff:ff
9: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 500
    link/ether 52:54:00:7b:e9:cb brd ff:ff:ff:ff:ff:ff
10: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/ether fe:54:00:c5:40:3f brd ff:ff:ff:ff:ff:ff
11: vnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/ether fe:54:00:4f:2d:4c brd ff:ff:ff:ff:ff:ff
12: vnet2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/ether fe:54:00:fc:5e:7f brd ff:ff:ff:ff:ff:ff
14: vnet3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/ether fe:54:00:56:4b:33 brd ff:ff:ff:ff:ff:ff

编辑:我看到设备在中显示为“p2p1” ip link。我修改了手动创建的初始化脚本,现在界面可以通过命令联机ifup。我也可以 ping 我自己。现在正在努力让它在正确的 VLAN 中联机。我将再次更新此帖子并附上结果。

编辑:非常酷。现在可以正常工作了!我希望知道为什么 a) 设备名称是“p2p1”以及 b) 操作系统没有自动添加初始化脚本?再次感谢您的建议!

答案1

请参阅此帖子以了解为什么它是 p2p1 - PCI 插槽 2,端口 1。http://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming

我还不知道为什么操作系统没有自动添加正确的 ifcfg 文件。

答案2

你好你需要删除该文件

/etc/udev/rules.d/70-persistent-net.rules

正确检测您的网卡。删除文件后,还要重新启动您的机器。重新启动后,从命令行执行设置以配置网络,如果这也不起作用,那么您将必须为每个设备/接口创建一个文件。

请参阅博客

答案3

根据我的经验,你应该使用以下命令:ip link、ifup

#ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:ac:0d:0e brd ff:ff:ff:ff:ff:ff

然后

#ifup eth0

就是这样。

相关内容