Chapter 19. Troubleshooting Networks
Linux provides a host of software utilities for troubleshooting network problems. This chapter covers a number of excellent Linux utilities for pinpointing problems and seeing what’s happening on your network. These are all intended to be quick and easy to use, rather than for ongoing monitoring. Check out Chapter 13 and Chapter 14 on Nagios and MRTG to learn how to set up monitoring and alerting.
Your workhorses are going to be ping, tcpdump, Wireshark, and ngrep. While ping is still the number one tool for checking connectivity, tcpdump, Wireshark, and ngrep all provide different and excellent ways to capture and read what’s going over your wires. You can’t count on applications to generate useful error messages when commands fail (or sometimes to generate any messages at all), but nothing is hidden from a packet sniffer. When you don’t know if it’s a hardware or software problem, run these first to narrow down the possibilities. Software problems are more common than hardware problems, so don’t break out the hardware testers until you have eliminated software glitches. Of course, it never hurts to rule out the immediately obvious, such as a disconnected cable or a powered-down machine.
Practice running the various utilities in this chapter as often as you can on healthy systems. Then, you’ll know what a healthy network looks like, and you’ll develop elite skills that will come in handy when there are troubles.
Don’t forget your ...