- How to find ethernet network card firmware and driver information in Linux
- How to find Ethernet network interface card information in Linux
- Method One: ethtool
- Method Two: lshw
- Method Three: lspci
- Support Xmodulo
- How To Check Network Adapters Status in Linux
- Displaying Network Card Driver Name and Version
- Checking Network Card If It is UP or Down
- Displaying All Network Interfaces Infomation
- List all Network Card Names
- Conclusion
How to find ethernet network card firmware and driver information in Linux
Based n the Linux Variant you use the commands and their output may differ. I have worked on Red hat Enterprise Linux and SuSE Enterprise Linux and below commands and method have been really very useful to get the driver and firmware details of the Ethernet Network Card connected to the system
I prefer using the OS provided tools and not some other third party tools because just to get the NIC driver and firmware version I don’t want to go through all browsing, download, getting over my firewall, copying to my blade (as in office environment generally we don’t have internet access to our Linux blades) when we already have bunch of OS provided tools which can be used for this purpose.
Below command can be used on both SuSE and RHEL which has two different sections with separate firmware and driver version details.
# 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
Based on the driver name you get from the above command you can get more details on the module it is using from below command
# 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
Few more examples on a hardware with different Ethernet Network card
# 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
# 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,
Below are some more commands you can use to get the NIC firmware and driver related details and information
On SLES
# hwinfo --network | grep Driver | sort | uniq Driver Modules: "igb" Driver: "igb"
On RHEL 7
Next is ‘lshw’ utility, if this is not available you can get this from the Red Hat repo.
# 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 As you see here it also gives us enough detailed information about the available Ethernet Card with the firmware and driver version along with the driver name
How to find Ethernet network interface card information in Linux
Sometimes you may want to know the product name or hardware settings of the network interface cards (NICs) attached to your Linux system. For example when you check whether a particular network device driver or a kernel module is compatible with your Ethernet adapter, you need to know its hardware specification such as NIC model/vendor (e.g., Broadcom NetXtreme, Intel I350), speed (e.g., 1GB/s, 10GB/s), link mode (e.g., full/half duplex), etc.
In this tutorial, I will describe how to find Ethernet NIC information from the command line in Linux.
Method One: ethtool
The first method is to use ethtool , a command-line tool for checking or modifying PCI-based Ethernet card settings.
To install ethtool on Ubuntu or Debian:
$ sudo apt-get install ethtool
To install ethtool on Fedora, CentOS or RedHat:
To display hardware settings of a network interface card with ethtool , run the following command. It is assumed that the NIC card is assigned the name eth0 . The reason for sudo access in this case is to allow ethtool to obtain wake-on-LAN settings and link status.
Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: Unknown Supports Wake-on: g Wake-on: g Link detected: yes
To find Ethernet device driver and firmware information:
driver: bnx2 version: 2.1.6 firmware-version: bc 5.2.3 NCSI 2.0.6 bus-info: 0000:03:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes
To find factory-default MAC address information:
Permanent address: 9c:8e:99:12:2d:8a
Method Two: lshw
The second method is via lshw , a command-line utility for showing detailed hardware specification of a Linux machine.
To install lshw on Ubuntu or Debian:
To install lshw on CentOS or RedHat, first set up Repoforge repository on your system, and then run:
To install lshw on Fedora, simply run:
To show detailed vendor information of your NIC, run the following.
*-network description: Ethernet interface product: NetXtreme II BCM5709 Gigabit Ethernet vendor: Broadcom Corporation physical id: 0 bus info: [email protected]:03:00.0 logical name: eth0 version: 20 serial: d4:85:64:77:f3:54 size: 1GB/s capacity: 1GB/s width: 64 bits clock: 33MHz capabilities: pm vpd msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=bnx2 driverversion=1.7.5 duplex=full firmware=5.2.3 NCSI 2.0.6 ip=192.168.10.78 latency=0 link=yes multicast=yes port=twisted pair speed=1GB/s resources: irq:16 memory:f4000000-f5ffffff memory:e6100000-e610ffff(prefetchable)
Method Three: lspci
If all you need to know is the product/vendor name of your Ethernet card, you can use lspci command which displays information about PCI buses and connected PCI devices.
To install lspci on Ubuntu or Debian:
$ sudo apt-get install pciutils
To install lspci on CentOS, Fedora or RedHat:
$ sudo yum install pciutils
To find the name of Ethernet card(s) available on your system, run the following.
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
Support Xmodulo
This website is made possible by minimal ads and your gracious donation via PayPal or credit card
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.
How To Check Network Adapters Status in Linux
If you want to check the status of an Ethernet Network interface in your Linux system, and you can type the following ethtool command at the shell prompt:
$ sudo ethtool NetworkInterfaceName $ sudo ethtool enp0s3
[devops@mydevops ~]$ sudo ethtool enp0s3 Settings for enp0s3: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: on MDI-X: off (auto) Supports Wake-on: umbg Wake-on: d Current message level: 0x00000007 (7) drv probe link Link detected: yes
Displaying Network Card Driver Name and Version
If you want to find the name and version of a given network adapter in your current Linux system, and you need to pass the “ -i ” option to the ethtool command, type:
[devops@mydevops ~]$ sudo ethtool -i enp0s3 driver: e1000 version: 7.3.21-k8-NAPI firmware-version: expansion-rom-version: bus-info: 0000:00:03.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: no
Checking Network Card If It is UP or Down
If you want to check a particular network interface if it is up or down state in your Linux system, and you can use one of the following command:
$ sudo ethtool enp0s3 | grep "Link"
[devops@mydevops ~]$ ip addr show enp0s3 | grep state 2: enp0s3: mtu 1500 qdisc fq_codel state UP group default qlen 1000 [devops@mydevops ~]$ sudo ethtool enp0s3 | grep Link Link detected: yes [devops@mydevops ~]$ nmcli device status DEVICE TYPE STATE CONNECTION enp0s3 ethernet connected enp0s3 virbr0 bridge connected virbr0 lo loopback unmanaged -- virbr0-nic tun unmanaged --
Displaying All Network Interfaces Infomation
If you want to display the information for all network interfaces in your system, and you can use the following command:
[devops@mydevops ~]$ ifconfig -a enp0s3: flags=4163 mtu 1500 inet 192.168.3.58 netmask 255.255.255.0 broadcast 192.168.3.255 inet6 fe80::16e5:718:a1bb:4e82 prefixlen 64 scopeid 0x20 ether 08:00:27:f9:0a:aa txqueuelen 1000 (Ethernet) RX packets 7764 bytes 2844890 (2.7 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2126 bytes 292517 (285.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4099 mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:d8:9b:47 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0-nic: flags=4098 mtu 1500 ether 52:54:00:d8:9b:47 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [devops@mydevops ~]$ ip addr show 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp0s3: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 08:00:27:f9:0a:aa brd ff:ff:ff:ff:ff:ff inet 192.168.3.58/24 brd 192.168.3.255 scope global dynamic noprefixroute enp0s3 valid_lft 75093sec preferred_lft 75093sec inet6 fe80::16e5:718:a1bb:4e82/64 scope link noprefixroute valid_lft forever preferred_lft forever 3: virbr0: mtu 1500 qdisc noqueue state DOWN group default qlen 1000 link/ether 52:54:00:d8:9b:47 brd ff:ff:ff:ff:ff:ff inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0 valid_lft forever preferred_lft forever 4: virbr0-nic: mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000 link/ether 52:54:00:d8:9b:47 brd ff:ff:ff:ff:ff:ff
List all Network Card Names
If you want to list all Network Card Names in your Linux system, and you can type the following lshw command:
$ sudo lshw -class network -short
[devops@mydevops ~]$ sudo lshw -class network -short H/W path Device Class Description ===================================================== /0/100/3 enp0s3 network 82540EM Gigabit Ethernet Controller /1 virbr0-nic network Ethernet interface /2 virbr0 network Ethernet interface
Conclusion
You should know that how to get the physical status of an ethernet card using ethtool/ip/ifconfig commands in your CentOS or RHEL Linux system.