Linux中如何查找以太网网卡固件和驱动信息

下面的命令可以用于获取连接到系统的以太网网卡的驱动程序和固件详细信息, 适用于 Red hat Enterprise Linux 和 SuSE Enterprise Linux 。

# ethtool -i eth0
driver: be2net
version: 11.2.1263.16
firmware-version: 11.2.1263.19
expansion-rom-version:
bus-info: 0000:06:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: no
supports-priv-flags: yes

根据我们从上述命令获得的驱动程序名称,我们可以从以下命令获得有关它正在使用的模块的更多详细信息

# modinfo be2net
filename:       /lib/modules/3.10.0-693.5.2.el7.x86_64/weak-updates/be2net/be2net.ko
supported:      external
license:        GPL
author:         Emulex Corporation
description:    Emulex OneConnect NIC Driver 11.2.1263.16
version:        11.2.1263.16

其他服务器示例:拥有不同以太网网卡

# ethtool -i eth0
driver: igb
version: 5.2.15-k
firmware-version: 2.1.5
bus-info: 0000:01:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes

如果是 igb 模块:

# modinfo igb
filename:       /lib/modules/3.0.101-100-default/kernel/drivers/net/ethernet/intel/igb/igb.ko
version:        5.2.15-k
license:        GPL
description:    Intel(R) Gigabit Ethernet Network Driver
author:         Intel Corporation,

下面是一些可用于获取 NIC 固件和驱动程序相关详细信息和信息的其他命令

在 SLES 上

# hwinfo --network | grep Driver | sort | uniq
  Driver Modules: "igb"
  Driver: "igb"

在 RHEL 7 上

接下来是“lshw”实用程序,如果没有这个命令,我们可以从 Red Hat 存储库中获取安装。

说明:这在 Red Hat Enterprise Linux 上可用

# rpm -qf /usr/sbin/lshw
lshw-B.02.18-7.el7.x86_64

# lshw -c network
  *-network:0
       description: Ethernet interface
       product: OneConnect NIC (Skyhawk)
       vendor: Emulex Corporation
       physical id: 0
       bus info: pci@0000:06:00.0
       logical name: eth0
       version: 10
       serial: 00:17:a4:77:00:0e
       size: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msix pciexpress vpd bus_master cap_list rom ethernet physical autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=be2net driverversion=11.2.1263.16 duplex=full firmware=11.2.1263.19 latency=0 link=yes multicast=yes slave=yes speed=1Gbit/s

可以看到,它还为我们提供了有关可用以太网卡的足够详细信息,包括固件和驱动程序版本以及驱动程序名称。

日期:2020-06-02 22:18:31 来源:oir作者:oir