Ping Command

Ping is a computer network administration utility used to test the reachability of a host on an Internet Protocol (IP) network and to measure the round-trip time for messages sent from the originating host to a destination computer. The name comes from active sonar terminology. Ping operates by sending Internet Control Message Protocol (ICMP) echo request packets to the target host and waiting for an ICMP response. In the process it measures the time from transmission to reception (round-trip time) and records any packet loss. The results of the test are printed in form of a statistical summary of the response packets received, including the minimum, maximum, and the mean round-trip times, and sometimes the standard deviation of the mean. Ping may be run using various options (command line switches) depending on the implementation that enable special operational modes, such as to specify the packet size used as the probe, automatic repeated operation for sending a specified count of probes, time stamping options, or to perform a ping flood. Flood pinging may be abused as a simple form of denial-of-service attack, in which the attacker overwhelms the victim with ICMP echo request packets.

C:\>ping www.google.com -t

Pinging www.l.google.com [209.85.175.105] with 32 bytes of data:

Reply from 209.85.175.105: bytes=32 time=134ms TTL=56
Reply from 209.85.175.105: bytes=32 time=161ms TTL=56
Reply from 209.85.175.105: bytes=32 time=33ms TTL=56
Reply from 209.85.175.105: bytes=32 time=25ms TTL=56
Reply from 209.85.175.105: bytes=32 time=25ms TTL=56
Reply from 209.85.175.105: bytes=32 time=26ms TTL=56
Reply from 209.85.175.105: bytes=32 time=58ms TTL=56
Reply from 209.85.175.105: bytes=32 time=108ms TTL=56
Reply from 209.85.175.105: bytes=32 time=158ms TTL=56
Reply from 209.85.175.105: bytes=32 time=21ms TTL=56
Reply from 209.85.175.105: bytes=32 time=26ms TTL=56
Reply from 209.85.175.105: bytes=32 time=53ms TTL=56

Ping statistics for 209.85.175.105:
 Packets: Sent = 12, Received = 12, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
 Minimum = 21ms, Maximum = 161ms, Average = 69ms

The output shows the results of 12 pings to 209.85.175.105 with the results summarized at the end. The program is stopped by pressing Ctrl-C.
• shortest round trip time was 21ms
• average round trip time was 69ms
• maximum round trip time was 161ms

You May Also Like

1 Comment

  1. A useful detail for readers following this under the Linux category: the example shown is Windows ping, where -t keeps it running until Ctrl-C. On Linux, ping normally continues by default; ping -c 12 example.com limits the run to 12 requests.

    The sample also shows why the loss percentage and average should be read together with the individual timings: all 12 packets returned, but RTT ranged from 21 to 161 ms. That short run demonstrates variation; it cannot rule out intermittent loss later. For troubleshooting, repeat the same target over a longer interval, compare Wi-Fi with Ethernet, and record the time of the problem. ICMP can be filtered or rate-limited, so compare with the affected application too before blaming the ISP.

    Disclosure: I am posting on behalf of PacketLossTest.dev, a browser-based packet loss, latency and jitter tool. Browser-based measurements can complement this check, but their endpoint and traffic type may differ from ICMP ping, so the numbers should not be treated as interchangeable.

Leave a Reply?