Using Ping To Test Connectivity
Using Ping To Test
Open the Command Prompt or Terminal. Every operating system has a command line interface that will allow you to run the Ping command. The Ping command operates virtually identically on all systems.
- If using Windows, open the Command Prompt. Click the Start button and enter "cmd" into the Search field. Windows 8 users can type "cmd" while on the Start screen. Press Enter to launch the Command Prompt.
- If using Mac OS X, open the Terminal. Open your Applications folder, and then open the Utilities folder. Select Terminal.
- If using Linux, Open a Telnet/Terminal window. It is most often found in the Accessories folder in your Applications directory.
Type ping followed by an IP address or a website address then press Enter key to execute the command. Here is a brief explanation of commonly used ping commands:
ping (This will ping the IP address of a device like a local computer, remote server or any client that receives an IP address to verify that it is reachable and that you can communicate with it properly.) Example: ping 192.168.1.1 (this is the default IP address of many routers)
ping (This command will test for the Internet connectivity and DNS functionality.) Example: ping www.nimans.net, ping google.com
Doing this in windows you would see the following if the ping is successful
C:\Users\adam-h>ping www.google.co.uk
Pinging www.google.co.uk [195.50.84.216] with 32 bytes of data:
Reply from 195.50.84.216: bytes=32 time=4ms TTL=50
Reply from 195.50.84.216: bytes=32 time=8ms TTL=50
Reply from 195.50.84.216: bytes=32 time=4ms TTL=50
Reply from 195.50.84.216: bytes=32 time=4ms TTL=50
Ping statistics for 195.50.84.216:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 4ms, Maximum = 8ms, Average = 5ms
If you have used a web address / domain /URL to ping and you do not get a response try pinging an external IP address you know. For example you can use the public DNS server provided by Google. If the domain does not respond but the IP address does this would mean that the DNS settings need to be checked at site in the LAN/Router/PC.
C:\Users\adam-h>ping www.google.co.uk
Pinging www.google.co.uk [195.50.84.216] with 32 bytes of data:
Reply from 195.50.84.216: bytes=32 time=4ms TTL=50
Reply from 195.50.84.216: bytes=32 time=8ms TTL=50
Reply from 195.50.84.216: bytes=32 time=4ms TTL=50
Reply from 195.50.84.216: bytes=32 time=4ms TTL=50
Ping statistics for 195.50.84.216:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 4ms, Maximum = 8ms, Average = 5ms
C:\Users\adam-h>ping 8.8.8.8
Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=11ms TTL=48
Reply from 8.8.8.8: bytes=32 time=13ms TTL=48
Reply from 8.8.8.8: bytes=32 time=11ms TTL=48
Reply from 8.8.8.8: bytes=32 time=39ms TTL=48
Ping statistics for 8.8.8.8:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 11ms, Maximum = 39ms, Average = 18ms
Unsuccessful Ping replies:
Request Timed Out
This message indicates that no Reply messages were received within the default time of 1 second. This can be due to many different causes; the most common include network congestion, failure of the ARP request, packet filtering, routing error, or a silent discard. Most often, it means that a route back to the sending host has failed. This might be because the destination host does not know the route back to the sending host, or one of the intermediary routers does not know the route back, or even that the destination host's default gateway does not know the route back. Check the routing table of the destination host to see whether it has a route to the sending host before checking tables at the routers.
Unknown Host
This error message indicates that the requested host name cannot be resolved to its IP address; check that the name is entered correctly and that the DNS servers can resolve it.
Destination Host Unreachable
This message indicates one of two problems: either the local system has no route to the desired destination, or a remote router reports that it has no route to the destination. The two problems can be distinguished by the form of the message. If the message is simply "Destination Host Unreachable," then there is no route from the local system, and the packets to be sent were never put on the wire. Use the Route utility to check the local routing table.
If the message is "Reply From < IP address >: Destination Host Unreachable," then the routing problem occurred at a remote router, whose address is indicated by the "< IP address >" field. Use the appropriate utility or facility to check the IP routing table of the router assigned the IP address of < IP address >.
If you pinged using an IP address, retry it with a host name to ensure that the IP address you tried is correct.