A system administrator is troubleshooting a web server that is intermittently slow. They suspect that the server's network card might be experiencing errors or dropped packets at the hardware level. Which command would provide statistics about network interface errors, such as dropped packets, collisions, or overruns, that are typically indicative of physical layer or driver issues?
- A`netstat -an` to display all network connections.
- B`ifconfig eth0` or `ip -s link show eth0` to view interface statistics.
- C`ip route show` to check the routing table.
- D`ss -tln` to list listening sockets.
Show answer & explanationAnswer & explanation
Correct answer: B. `ifconfig eth0` or `ip -s link show eth0` to view interface statistics.
Both `ifconfig eth0` (older, but still widely used) and `ip -s link show eth0` (modern `ip` command) provide detailed statistics for a specific network interface. These statistics include counts of errors, dropped packets, overruns, and collisions, which are crucial indicators of physical layer problems, faulty cabling, or driver issues with the network card.
Why the other options are wrong
- A. `netstat -an` displays network connections and routing tables, but not detailed per-interface hardware error statistics.
- C. `ip route show` displays routing information, not interface error statistics.
- D. `ss -tln` shows active listening sockets, which is unrelated to physical layer errors on the NIC.
Network Interface Error Statistics
Commands like `ifconfig` or `ip -s link show` provide detailed statistics for network interfaces, including counts for errors, dropped packets, overruns, and collisions. These metrics are vital for diagnosing physical layer network problems, faulty hardware (NIC), or driver issues.
- Shows transmit/receive packet counts.
- Includes error, dropped, overrun, collision counts.
- Helps identify physical layer or NIC driver issues.
Memory trick: IP LINK SHOWs the interface's inner woes.