Network Measurement, Management & Performance

ping

/ ping /

Ping is the network's way of shouting "are you there?" and waiting to hear "yes" come back. The name is borrowed from sonar: a submarine sends out a pulse of sound and listens for the echo, and the time the echo takes tells it how far away something is. Ping does the same with packets — it is usually the very first tool anyone reaches for when something is unreachable, because it answers two simple questions at once: can I reach that host at all, and how long does a round trip take?

Mechanically, ping sends an ICMP echo request packet to a target address. A host that receives it normally replies with an ICMP echo reply containing the same data. Ping times the gap between sending the request and receiving the reply — that is the round-trip time, or RTT. It repeats this once per second and reports each RTT plus a summary: how many replies came back versus how many were sent (so you can see packet loss), and the minimum, average, and maximum RTT. Steady low RTTs with zero loss mean a healthy path; rising RTTs hint at queuing delay, and missing replies hint at loss or a host that is down or filtering.

Two honest cautions. First, ping measures round-trip time, not one-way delay, and the two directions of a path can be very different. Second, many hosts and firewalls deliberately drop ICMP, or de-prioritise it, so "no reply" does not prove the host is down — it may simply be ignoring you, and a router under load may answer its own pings slowly even while forwarding real traffic perfectly. Ping tells you about the path to a host as seen by ICMP, which is a useful proxy but not the whole truth.

You type "ping 8.8.8.8" and see: "64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=14.2 ms", repeating each second, ending with "5 packets transmitted, 5 received, 0% packet loss, rtt min/avg/max = 13.9/14.2/14.6 ms". Zero loss and a tight RTT spread say the path is healthy.

Ping reports round-trip time and loss to a host using ICMP echo — the first thing to try when something is unreachable.

No ping reply does NOT prove a host is down: many hosts and firewalls drop or de-prioritise ICMP on purpose. Ping also measures the round trip, not one-way delay, and the two directions can differ a lot.

Also called
ICMP echoICMP echo request/reply