Ping sends a query from your computer to another computer to determine if there is a network connection between the two computers. Here are examples for querying google.com and 8.8.8.8 (which is one of the IP addresses of the Google DNS service):
ping google.com
ping 8.8.8.8
See below for the output of "pinging" google.com for a few seconds (before hitting CTRL-C):
Georges-MBP:~ gginis$ ping google.com
PING google.com (172.217.6.46): 56 data bytes
64 bytes from 172.217.6.46: icmp_seq=0 ttl=53 time=11.222 ms
64 bytes from 172.217.6.46: icmp_seq=1 ttl=53 time=11.759 ms
64 bytes from 172.217.6.46: icmp_seq=2 ttl=53 time=7.904 ms
64 bytes from 172.217.6.46: icmp_seq=3 ttl=53 time=8.860 ms
64 bytes from 172.217.6.46: icmp_seq=4 ttl=53 time=9.650 ms
64 bytes from 172.217.6.46: icmp_seq=5 ttl=53 time=10.296 ms
64 bytes from 172.217.6.46: icmp_seq=6 ttl=53 time=10.291 ms
64 bytes from 172.217.6.46: icmp_seq=7 ttl=53 time=11.158 ms
64 bytes from 172.217.6.46: icmp_seq=8 ttl=53 time=10.115 ms
64 bytes from 172.217.6.46: icmp_seq=9 ttl=53 time=12.066 ms
64 bytes from 172.217.6.46: icmp_seq=10 ttl=53 time=11.828 ms
64 bytes from 172.217.6.46: icmp_seq=11 ttl=53 time=11.476 ms
64 bytes from 172.217.6.46: icmp_seq=12 ttl=53 time=12.505 ms
^C
--- google.com ping statistics ---
13 packets transmitted, 13 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 7.904/10.702/12.505/1.288 ms
The ping output shows if your computer is receiving a response from the remote computer, and also the time it took between sending the query and receiving the response ("round-trip time"). At the end of the output, statistics are shown on how many packets were transmitted and received and on the minimum, average, maximum and standard deviation of the round-trip time.
If you are using Windows, then you can use the -t option for starting a "continuous" ping. For example:
ping 8.8.8.8 -t
Ping can be used to diagnose if an internet destination is reachable or not. It may further reveal if the connection has packet loss or a large round-trip time.
Comments
0 comments
Article is closed for comments.