CentOS 7 未检测到网络接口控制器

CentOS 7 未检测到网络接口控制器

CentOS 7 最小化安装在远程服务器上。它有两个 NIC。与我处理过的其他服务器的设置相同。然而,其中之一似乎不起作用。

[root@home network-scripts]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether d0:50:99:d3:10:2c brd ff:ff:ff:ff:ff:ff

[root@home network-scripts]# nmcli d
DEVICE  TYPE      STATE      CONNECTION
enp4s0  ethernet  connected  enp4s0
lo      loopback  unmanaged  --

然而,有 和ifcfg-enp4s0ifcfg-eno1文件/etc/sysconfig/network-scripts/

这是ifcfg-eno1

# Generated by dracut initrd
NAME=eno1
DEVICE=eno1
ONBOOT=yes
NETBOOT=yes
UUID=912a3ac8-03b8-418c-9dd1-f0376d996d51
IPV6INIT=yes
BOOTPROTO=dhcp
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no

当我跑步时:

[root@home network-scripts]# ifup eno1
Error: Connection activation failed: No suitable device found for this connection.

的输出

[root@home network-scripts]# lshw -class network

  *-network
       description: Ethernet interface
       product: I210 Gigabit Network Connection
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: enp4s0
       version: 03
       serial: d0:50:99:d3:10:2c
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=igb driverversion=5.4.0-k duplex=full firmware=3.16, 0x800004d6 ip=xxx.xx.xxx.xx latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:17 memory:a1100000-a117ffff ioport:3000(size=32) memory:a1180000-a1183fff
  *-network UNCLAIMED
       description: Ethernet controller
       product: Ethernet Connection (7) I219-LM
       vendor: Intel Corporation
       physical id: 1f.6
       bus info: pci@0000:00:1f.6
       version: 10
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi cap_list
       configuration: latency=0
       resources: memory:a1300000-a131ffff

我不确定UNCLAIMED上面的意思。

我还尝试检查内核输出:

[root@home network-scripts]# dmesg | grep -i "Network Connection"
[    2.488019] igb 0000:04:00.0: Intel(R) Gigabit Ethernet Network Connection

和一些lspci输出:

[root@home net]# lspci | grep Connection
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-LM (rev 10)
04:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)

我不太确定这是否是驱动程序问题(以下是常问问题,但根据下面的输出,两个设备都安装了适当的驱动程序:

[root@home network-scripts]# /sbin/lspci -nn | grep -i net
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (7) I219-LM [8086:15bb] (rev 10)
04:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)

[root@home network-scripts]# for BUSID in $(/sbin/lspci | awk '{ IGNORECASE=1 } /net/ { print $1 }'); do /sbin/lspci -s $BUSID -m; /sbin/lspci -s $BUSID -n; done
00:1f.6 "Ethernet controller" "Intel Corporation" "Ethernet Connection (7) I219-LM" -r10 "ASRock Incorporation" "Device 15bb"
00:1f.6 0200: 8086:15bb (rev 10)
04:00.0 "Ethernet controller" "Intel Corporation" "I210 Gigabit Network Connection" -r03 "ASRock Incorporation" "Device 1533"
04:00.0 0200: 8086:1533 (rev 03)

[root@home network-scripts]# grep -i 8086 /lib/modules/*/modules.alias | grep -i 1533
/lib/modules/3.10.0-957.27.2.el7.x86_64/modules.alias:alias pci:v00008086d00001533sv*sd*bc*sc*i* igb
/lib/modules/3.10.0-957.el7.x86_64/modules.alias:alias pci:v00008086d00001533sv*sd*bc*sc*i* igb

[root@home network-scripts]# grep -i 8086 /lib/modules/*/modules.alias | grep -i 15bb
/lib/modules/3.10.0-957.27.2.el7.x86_64/modules.alias:alias pci:v00008086d000015BBsv*sd*bc*sc*i* e1000e
/lib/modules/3.10.0-957.el7.x86_64/modules.alias:alias pci:v00008086d000015BBsv*sd*bc*sc*i* e1000e

如何判断操作系统存在软件问题还是物理端口/主板存在硬件问题?

我是否遗漏了一些完全明显的东西?

编辑:这是相关的驱动程序输出lspci -k

00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-LM (rev 10)
    Subsystem: ASRock Incorporation Device 15bb
    Kernel modules: e1000e
04:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
    Subsystem: ASRock Incorporation Device 1533
    Kernel driver in use: igb
    Kernel modules: igb`

答案1

eno1 看起来不正确...这不是 centos7 命名接口的方式...

应该看起来像这样:

lshw -class network

  *-network:0 DISABLED      
       description: Ethernet interface
       product: 82599ES 10-Gigabit SFI/SFP+ Network Connection
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:15:00.0
       logical name: ens5f0
       version: 01
       serial: 90:e2:ba:84:cd:5c
       capacity: 10Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi msix pciexpress vpd bus_master cap_list ethernet physical fibre 1000bt-fd 10000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=ixgbe driverversion=5.1.0-k-rh7.7 firmware=0x000161ab latency=0 link=no multicast=yes port=fibre
       resources: irq:44 memory:fbf80000-fbffffff ioport:5000(size=32) memory:fbf70000-fbf73fff
  *-network:1 DISABLED
       description: Ethernet interface
       product: 82599ES 10-Gigabit SFI/SFP+ Network Connection
       vendor: Intel Corporation
       physical id: 0.1
       bus info: pci@0000:15:00.1
       logical name: ens5f1
       version: 01
       serial: 90:e2:ba:84:cd:5d
       capacity: 10Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi msix pciexpress vpd bus_master cap_list ethernet physical fibre 1000bt-fd 10000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=ixgbe driverversion=5.1.0-k-rh7.7 firmware=0x000161ab latency=0 link=no multicast=yes port=fibre
       resources: irq:70 memory:fbe80000-fbefffff ioport:5020(size=32) memory:fbe70000-fbe73fff

相关内容