The Message of a Failed ping

A failed ping test can also tell you a lot. Listing 13.10 shows a ping test failure. Listing 13.10: A Failed ping Test

PING ( 56 data bytes ping: sendto: Network is unreachable ping: wrote 64 chars, ret=-1 ping: sendto: Network is unreachable AC

3 packets transmitted, 0 packets received, 100% packet loss

Again, the test directs you to focus your troubleshooting efforts on certain layers of the network. A failure indicates you should focus on the network hardware, interface configuration, and lower-layer network services. The error message further helps refine that focus.

The specific text of ping error messages varies slightly, but the messages fall into three main categories:

Network unreachable This indicates that the local host does not have a valid route to the remote computer. (The next section looks at some tools that can help you try to track down a routing problem.) A related message that you might see in a ping test is ICMP Redirect, which is not really an error. An ICMP Redirect means that you have the wrong route in your routing table for this destination, and the local router is correcting your routing table.

No answer This indicates that the remote host did not respond to the ICMP Echo packets. On some systems, the Linux ping command does not display an error message saying No answer. Instead, the error "host unreachable" is displayed. In either case, however, when the ping is terminated, the summary line says 100% packet loss, which means that the remote host did not respond. No answer can be caused by many things. Any interruption of service anywhere on the network, from your host to the remote system, can cause this problem. This error means that no IP packets can successfully travel from your host to the remote host. Look for network errors.

Unknown host This indicates that name service was not able to resolve the hostname into an address. Possibly the user gave you the wrong hostname or the

DNS is misconfigured. Later in the chapter, tools for testing DNS servers are discussed.

ping is one of the best test tools available to the system administrator. Unfortunately, some sites block ICMP Echo messages at their firewalls or drop them at their routers. Every system that offers services to external users should respond to ping, even if those responses really come from a dedicated ping server sitting on the same network as the system that provides external services. The Internet works best when everyone works together. Unfortunately, bad people have frightened some administrators so much that we are losing some good tools. Interfering with ICMP Echo limits the effectiveness of one of the simplest and best test tools.

The results of the ping test guide you in the next phase of testing. ping directs you to focus on routing, DNS, or the application as the cause of the problem. Linux provides tools to test all of these things. The next section discusses the tools that let you test routing.

Continue reading here: Testing Routing

Was this article helpful?

+1 0