Networking
Howto use ping to troubleshoot connectivity
Whether or not your troublesome server is connected to your local network it is always a good practice to force a response from it.
One of the most common methods used to test connectivity across multiple networks is the "ping" command. Ping sends ICMP “echo” type packets that request a corresponding ICMP “echo-reply” response from the device at the target address. As most servers will respond to a ping query it becomes a very handy tool. A lack of response could be due to:
· A server with that IP address doesn't exist
· The server has been configured not to respond to pings
· A firewall or router along the network path is blocking ICMP traffic
· You have incorrect routing. Check routes on the local, remote servers and all routers in between. A classic symptom of bad routes on a server is the ability to only ping servers on your local network and nowhere else.
There are a variety of ICMP response codes which can help in further troubleshooting.
The Linux ping command will send continuous pings, once a second, until stopped with a . Here is an example of a successful ping to the server bigboy at 192.168.1.100
[root@freesco] ping 192.168.1.101
PING 192.168.1.101 (192.168.1.101) from 192.168.1.100 : 56(84) bytes of data.
64 bytes from 192.168.1.101: icmp_seq=1 ttl=128 time=3.95 ms
64 bytes from 192.168.1.101: icmp_seq=2 ttl=128 time=7.07 ms
64 bytes from 192.168.1.101: icmp_seq=3 ttl=128 time=4.46 ms
64 bytes from 192.168.1.101: icmp_seq=4 ttl=128 time=4.31 ms
--- 192.168.1.101 ping statistics ---
4 packets transmitted, 4 received, 0% loss, time 3026ms
rtt min/avg/max/mdev = 3.950/4.948/7.072/1.242 ms
You may get a "Destination Host Unreachable" message if your router or server knows that the target IP address is part of a valid network, but is getting no response from the target server. The network device sends an ICMP reply type 3 which triggers the message.
[root@freesco] ping 192.168.1.105
PING 192.168.1.105 (192.168.1.105) from 192.168.1.100 : 56(84) bytes of data.
From 192.168.1.100 icmp_seq=1 Destination Host Unreachable
From 192.168.1.100 icmp_seq=2 Destination Host Unreachable
From 192.168.1.100 icmp_seq=3 Destination Host Unreachable
From 192.168.1.100 icmp_seq=4 Destination Host Unreachable
From 192.168.1.100 icmp_seq=5 Destination Host Unreachable
From 192.168.1.100 icmp_seq=6 Destination Host Unreachable
--- 192.168.1.105 ping statistics ---
8 packets transmitted, 0 received, +6 errors, 100% loss, time 7021ms, pipe 3
More information: http://www.siliconvalleyccie.com/linux-hn/network-trouble.htm
Last update: 2004-10-29 01:02
Author: dingetje
Revision: 1.0
Print this record
Send to a friend
Show this as PDF file
Export as XML-File
You can comment on this entry