How to obtain information about network devices and their configuration on Linux

This config will show few tricks on how to obtain a hardware information about the network devices and their relevant configuration on Linux system.

General information

First, let’s start the simple lspci command to obtain a bus-id, manufacturer and model of all available network cards:

# lspci | grep Network
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 34)

Hardware info

lshw command will attempt to provide you with all possible network device hardware information:

# lshw -class network
       description: Ethernet interface                                                                                                                                  
       product: 82579LM Gigabit Network Connection                                                                                                                      
       vendor: Intel Corporation                                                                                                                                        
       physical id: 19                                                                                                                                                  
       bus info: pci@0000:00:19.0                                                                                                                                       
       logical name: enp0s25                                                                                                                                            
       version: 04                                                                                                                                                      
       serial: 3c:97:0e:02:98:c8                                                                                                                                        
       capacity: 1Gbit/s                                                                                                                                                
       width: 32 bits                                                             
       clock: 33MHz                                                               
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion
       resources: irq:50 memory:f1600000-f161ffff memory:f162a000-f162afff ioport:
       description: Wireless interface                                            
       product: Centrino Advanced-N 6205 [Taylor Peak]                            
       vendor: Intel Corporation                                                  
       physical id: 0                                                             
       bus info: pci@0000:03:00.0                                                 
       logical name: wlp3s0                                                       
       version: 34                                                                
       serial: 8c:70:5a:92:f6:e0                                                  
       width: 64 bits                                                             
       clock: 33MHz                                                               
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wirel
       configuration: broadcast=yes driver=iwlwifi driverversion=3.10.0-229.7.2.elE 802.11abgn
       resources: irq:51 memory:f1500000-f1501fff

Hardware & Configuration

inxi is an extremely useful tool which apart of many other features can also print out a network hardware information and its configuration in a nicely formatted output:

# inxi -N -v 7
Network:   Card-1: Intel 82579LM Gigabit Network Connection
           driver: e1000e v: 2.3.2-k port: 4060 bus-ID: 00:19.0 chip-ID: 8086:1502
           IF: enp0s25 state: down mac: 3c:97:0e:02:97:c8
           Card-2: Intel Centrino Advanced-N 6205 [Taylor Peak]
           driver: iwlwifi v: in-tree: bus-ID: 03:00.0 chip-ID: 8086:0085
           IF: wlp3s0 state: up mac: 8c:70:5a:92:f6:e0
           WAN IP: IF: wlp3s0 ip: ip-v6: fe80::8e70:5aff:fa92:f640

Network Configuration

The most obvious command to obtain a network configuration is by using ip command:

# ip ad show

Vedor ID

# grep -r '.*'  /sys/class/net/*/device/vendor 


# grep -r '.*'  /sys/class/net/*/device/irq