Linux узнать драйвер сетевой

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 find network card driver name and version on Linux

Question: An Ethernet network interface card is attached to my Linux box, and I would like to know which network adapter driver is installed for the NIC hardware. Is there a way to find out the name and version of a network card driver for my network card?

For network interface card (NIC) hardware to operate properly, you need a suitable device driver for the NIC hardware (e.g., ixgbe driver for Intel NICs). A NIC device driver implements a hardware-independent common interface between the Linux kernel and the NIC, so that packets can be moved between the kernel and the NIC. While some drivers may be statically built in the kernel, most drivers for modern NICs are dynamically loaded as kernel modules.

When you are troubleshooting a NIC hardware problem, one thing you can do is to check whether a correct network adapter driver is installed properly. In this case, you need to know which kernel module is your NIC driver.

There are several ways to find the name/version of an Ethernet card driver on Linux.

Method One: dmesg

The first method is to to check dmesg messages. Since the kernel loads necessary hardware drivers during boot, dmesg output should tell if an Ethernet card driver is installed.

The above output shows that a driver named tg3 is loaded in the kernel.

If you want to know more detail about this driver (e.g., driver version), you can use modinfo command.

Читайте также:  Linux check process by user

If dmesg does not print any information about Ethernet driver, that means no suitable network device driver is available on your system.

Method Two: ethtool

The second method is to use the ethtool command. To find out the driver name for an interface eth0 , run the following.

Method Three: lshw

Another useful tool for NIC driver information is lshw . Type the following command to get detailed information about available Ethernet card(s) and their driver.

In the lshw output, look for the capabilities line, and examine driver and driverversion in the line.

If no suitable NIC driver is installed on your system, the driver field will remain empty.

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 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,

Читайте также:  Linux tar extract all files

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

Источник

🏷 Как найти имя и версию драйвера сетевой карты в Linux

Вопрос: Сетевая карта Ethernet подключена к моей Linux-системе, и я хотел бы узнать, какой драйвер сетевого адаптера установлен для оборудования NIC. Есть ли способ узнать имя и версию драйвера сетевой карты для моей сетевой карты?

Для правильной работы аппаратного обеспечения сетевой интерфейсной платы (NIC) необходим соответствующий драйвер устройства для аппаратного обеспечения NIC.

Драйвер устройства NIC реализует аппаратно-независимый общий интерфейс между ядром Linux и NIC, так что пакеты могут перемещаться между ядром и NIC.

Хотя некоторые драйверы могут быть статически встроены в ядро, большинство драйверов для современных сетевых адаптеров динамически загружаются как модули ядра.

Когда вы устраняете неполадки аппаратного обеспечения сетевого адаптера, вы можете проверить, правильно ли установлен драйвер сетевого адаптера.

В этом случае вам нужно знать, какой модуль ядра является вашим драйвером NIC.

Способ первый

Первый способ заключается в проверке сообщений dmesg.

Поскольку ядро загружает необходимые аппаратные драйверы во время загрузки, вывод dmesg должен сообщить, установлен ли драйвер карты Ethernet.

○ → dmesg | grep -i ethernet [ 1.998782] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded

Приведенный выше вывод показывает, что драйвер с именем r8169 загружен в ядро.

Если вы хотите узнать более подробно об этом драйвере (например, о версии драйвера), вы можете использовать команду modinfo.

Если dmesg не выводит какую- либо информацию о драйвере Ethernet, это означает, что в вашей системе нет подходящего драйвера сетевого устройства.

Способ второй

Второй способ – использовать команду ethtool. Чтобы узнать имя драйвера для интерфейса eth0, выполните следующее.

Способ третий

Введите следующую команду, чтобы получить подробную информацию о доступных картах Ethernet и их драйверах.

Источник

Оцените статью
Adblock
detector