While lspci | grep Ethernet
is a common first approach to detect network interfaces, dedicated servers sometimes need deeper inspection. Here are more robust methods to verify physical NIC installation:
sudo dmidecode -t slot | grep -A10 "Network"
This queries the motherboard's DMI table directly, revealing physical slot information that PCI enumeration might miss.
lsmod | grep -e 'igb\|ixgbe\|e1000\|bnx2'
Different drivers load for different NICs. Common drivers include:
- igb: Intel Gigabit
- ixgbe: Intel 10GbE
- e1000: Older Intel
- bnx2: Broadcom NetXtreme
ls -l /sys/class/net/
Compare physical devices with symbolic links. Physical interfaces typically show under:
ls -l /sys/class/net/*/device
For servers with NICs that don't show as Ethernet controllers:
lspci -nnk | grep -i network -A3
This reveals both classified and unclassified network devices with their kernel drivers.
Combine multiple verification methods:
ip -d link show | grep -B1 'link/ether'
ethtool -i eth0 # Repeat for all interfaces
find /sys/devices -name net -exec ls -l {} \;
For missing NICs:
- Check dmesg for detection errors:
dmesg | grep -i eth
- Verify kernel module loading:
modprobe DRIVER_NAME
- Inspect BIOS settings for disabled ports
While lspci | grep Ethernet
is the standard approach, sometimes it doesn't show all physical NICs due to driver issues or hardware detection problems. Here's how to perform a thorough investigation:
# Check kernel messages for detected hardware
dmesg | grep -i ethernet
# List all network interfaces (including disabled ones)
ip link show
# Detailed PCI device information
lspci -v | grep -A 10 Ethernet
# Check loaded network modules
lsmod | grep eth
For servers with potentially undiscovered hardware, these commands provide low-level access:
# View all PCI devices in tree format
lspci -tv
# Check sysfs for network devices
ls -l /sys/class/net/
# Examine kernel ring buffer
journalctl -k | grep -i eth
On a server where one NIC wasn't showing up, I discovered it through:
# First attempt showed only one NIC
$ lspci | grep Ethernet
02:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
# Deeper inspection revealed the second NIC
$ dmesg | grep -i eth
[ 3.224566] igb 0000:02:00.0: eth0: (PCIe:2.5Gb/s:Width x1)
[ 3.224568] igb 0000:02:00.1: eth1: (PCIe:2.5Gb/s:Width x1)
- Check if the NIC requires firmware:
dmesg | grep firmware
- Verify kernel module loading:
modprobe MODULE_NAME
- Inspect BIOS settings for disabled ports
- Test with alternative Linux live CD to rule out OS configuration
# Install ethtool for detailed NIC information
sudo apt install ethtool
# Get detailed NIC specs
sudo ethtool -i eth0
# Check for link detection
sudo ethtool eth0