The ping Command: Reading Every Line of the Output
Every ping guide lists the flags. Almost none of them teach you to read what comes back. This one walks a real run line by line, number by number.
Updated 25 August 2026 · 20 min read
-
Written by
Andrian Valeanu
Founder of Pulsetic
-
Reviewed by
Ionut Caval
Technical reviewer
The ping command sends ICMP echo request packets to a host and prints what comes back. Each reply line carries icmp_seq (packet order), ttl (hops left) and time (round-trip milliseconds). The closing block gives packet loss and rtt min/avg/max/mdev, where the last figure is jitter. A reply proves the host answers ICMP, nothing more.
Key takeaways
- Read the output in three parts: the header line, the reply lines, and the closing statistics block.
ttlis a hop counter, not a time. Subtract it from the nearest standard start value (64, 128 or 255) to estimate hops.- The last figure in
rtt min/avg/max/mdevis jitter, and it predicts how a call or a game feels better than the average does. - The flags are not portable.
-tmeans ping forever on Windows, set TTL on Linux, and quit after N seconds on macOS. - A failed ping does not mean a website is down, and a successful one does not mean it is up. Filtering ICMP is normal policy.
What the ping command actually does
The definition of ping is short: it sends an ICMP echo request to an address and waits for an echo reply. That is the whole mechanism. What the ping command does is measure one thing precisely, how long a small packet takes to reach a host and come back, which is called the round-trip time. Everything else you can learn from ping is inference drawn from that one measurement, or from its absence.
The packets are defined in RFC 792: an echo request is ICMP type 8, an echo reply is type 0. Over IPv6 the same pair are types 128 and 129. They are handled by the operating system kernel, not by any application, which is the single most important fact about ping and the reason it can mislead you. Nothing on the host has to be working except the network stack itself.
Mike Muuss wrote the original in December 1983 and named it after the sound a sonar makes, so the meaning of the word is literal: emit a pulse, listen for the echo. The expansion "Packet InterNet Groper" came later and is a backronym. Keep the sonar reading, because it sets the right expectation. Sonar tells you something is out there and roughly how far away. It does not tell you what it is or whether it works.
Ping does not measure bandwidth or throughput. Sending a larger payload with -s or -l does not turn it into a speed test. It measures latency and loss, and those are different properties of a link.
A real ping run, annotated
Here is a complete run on Linux against google.com, with a fixed count of five packets so it stops on its own:
ping -c 5 google.com
PING google.com (142.250.185.174) 56(84) bytes of data.
64 bytes from fra16s52-in-f14.1e100.net (142.250.185.174): icmp_seq=1 ttl=116 time=13.2 ms
64 bytes from fra16s52-in-f14.1e100.net (142.250.185.174): icmp_seq=2 ttl=116 time=12.9 ms
64 bytes from fra16s52-in-f14.1e100.net (142.250.185.174): icmp_seq=3 ttl=116 time=14.6 ms
64 bytes from fra16s52-in-f14.1e100.net (142.250.185.174): icmp_seq=4 ttl=116 time=12.7 ms
64 bytes from fra16s52-in-f14.1e100.net (142.250.185.174): icmp_seq=5 ttl=116 time=13.1 ms
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 12.744/13.301/14.612/0.679 ms
Three sections, and each answers a different question. The header line tells you what ping decided to talk to. The reply lines tell you what came back and how fast. The statistics block tells you what the run added up to. Take them in order.
The header line
PING google.com (142.250.185.174) 56(84) bytes of data.
This line is a receipt for two things that happened before any packet left your machine. First, the hostname was resolved to an IP address, and that address is printed in brackets. If you were expecting a different address, stop reading the rest of the output: your problem is DNS or a stale record, and the DNS lookup tool or the website IP lookup will show you what the world resolves that name to. Ping an IP address directly and this step is skipped entirely, which is exactly why ping 8.8.8.8 is the standard test for "is my connection working, ignoring DNS".
Second, the size. 56(84) bytes means 56 bytes of payload, which becomes 84 on the wire once you add the 8-byte ICMP header and the 20-byte IPv4 header. Windows prints "with 32 bytes of data" instead, because its default payload is 32 bytes. Neither default matters until you are hunting an MTU problem, which is further down.
The reply lines
64 bytes from fra16s52-in-f14.1e100.net (142.250.185.174): icmp_seq=1 ttl=116 time=13.2 ms
One line per packet that came back. Five fields, each worth reading:
| Field | What it is | What to watch for |
|---|---|---|
64 bytes | Size of the reply payload: your 56 data bytes plus the 8-byte ICMP header. | It should match what you sent. A reply that is truncated or a different size points at a middlebox rewriting packets. |
from ... | The host that answered, with the reverse DNS name if there is one. | Check this address. If it is not the address you pinged, an intermediate router is reporting an error, not the target replying. |
icmp_seq=1 | A counter ping puts in each request and the target echoes back. | Gaps mean packets went missing. Out-of-order numbers mean the path is reordering traffic, which usually means load balancing across links. |
ttl=116 | How much of the hop budget the reply had left when it arrived. | A value that changes between packets means your traffic is taking different paths. A steady value is normal. |
time=13.2 ms | Round-trip time: request out, reply back, measured by your own machine. | Compare it against a baseline you took when things were fine. An absolute number means little without one. |
One quiet platform difference: Linux numbers the first packet icmp_seq=1, while macOS and the BSDs start at icmp_seq=0. Windows does not print sequence numbers at all, which is why a lost packet on Windows shows up as a "Request timed out." line rather than a gap in a counter.
What a round-trip time should look like
Round-trip time is bounded by physics before it is bounded by anything you can fix. Light in fibre covers roughly 200 km per millisecond, and a round trip travels the distance twice, so there is a floor under every link that no amount of tuning removes. These are the ranges to calibrate against:
| Path | Typical round-trip time | Reading |
|---|---|---|
| Same LAN, wired | under 1 ms | Anything above a few ms on a local switch is a fault, not distance. |
| Same LAN, Wi-Fi | 2 to 20 ms, variable | Wi-Fi adds jitter. Test from a wired host before blaming the internet. |
| Your ISP gateway | 5 to 20 ms | Your first hop out. A useful thing to baseline. |
| Same country or region | 10 to 40 ms | Normal for a CDN edge serving you. |
| Across a continent | 40 to 80 ms | US coast to coast sits around 60 to 80 ms. |
| Transatlantic | 70 to 120 ms | London to New York is roughly 70 to 90 ms. |
| Transpacific or antipodal | 150 to 300 ms | Sydney to Europe rarely beats 250 ms. |
| Geostationary satellite | 500 to 700 ms | Two 36,000 km hops each way. This is geometry, not congestion. |
| Low-earth-orbit satellite | 25 to 60 ms | Much closer orbit, so much lower latency, but more variable. |
The number that matters is not the one in the table, it is the difference from your own normal. A path that has always been 12 ms and is now 90 ms is a problem even though 90 ms would be fine for someone on another continent. This is what latency baselining is for, and it is the argument for measuring continuously rather than only when something feels wrong.
TTL is a hop counter, not a time
TTL stands for Time To Live, and the name is a historical accident that misleads almost everyone who meets it. RFC 791 originally intended it as a lifetime in seconds. In practice, every router implements it as a counter: it takes 1 off the TTL of every packet it forwards, and if the value hits 0 the packet is discarded and an ICMP Time Exceeded message is sent back to the sender. It is a loop-prevention device. Nothing about it is measured in time.
The field is 8 bits, so the maximum is 255. Operating systems pick a starting value and stick to it, and the common ones are consistent enough to be useful:
| System | Initial TTL it sets |
|---|---|
| Linux, macOS, most BSDs, Android | 64 |
| Windows (2000 onward) | 128 |
| Many routers, switches and network appliances (Cisco IOS, older Solaris) | 255 |
Estimating hop count from the TTL you see
The value in a reply line is what was left after the trip, so you can work backwards. Take the TTL you see, round up to the nearest standard starting value above it, and subtract. In the run above, ttl=116 rounds up to 128, so the reply crossed about 12 routers on its way to you. A reply showing ttl=53 rounds up to 64 and came about 11 hops.
Treat this as an estimate, with three honest caveats. Operators can and do change the initial TTL, so the standard values are conventions rather than rules. Some middleboxes and tunnels rewrite the field. And the TTL you see reflects the return path only, which on the internet is frequently not the same as the outbound path, so it is not a hop count for your traffic going out. If you want the real path, that is what traceroute is for, and traceroute works precisely by sending packets with a TTL of 1, then 2, then 3, collecting the Time Exceeded error from each router in turn.
TTL never counts seconds. It counts routers. A reply arriving with ttl=116 did not take 116 of anything, it had 116 hops of budget left out of the 128 it started with.
The statistics block, which is where the answer usually is
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 12.744/13.301/14.612/0.679 ms
Read the first line left to right. 5 packets transmitted, 5 received is the raw count, and the percentage after it is just those two numbers expressed as loss. The time 4006ms at the end catches people out: it is the wall-clock duration of the whole run, not a latency figure. Five packets at the default one-second interval means the run spans four one-second gaps, so any figure a little over 4000ms is exactly what you expect and tells you nothing about the network.
Reading packet loss
Packet loss is the first number to look at, because loss and latency fail differently and loss is usually worse. A healthy wired path returns 0%. Sustained loss of 1% to 2% is enough to make a voice call choppy and a video call freeze, because TCP treats every lost packet as congestion and backs off. Above 5% sustained, something is genuinely broken.
There is one caveat that saves a lot of wasted investigation. Routers rate-limit and deprioritise ICMP on purpose, because generating replies costs CPU on a device whose job is forwarding. So loss that only appears when you ping hard, with a flood or a large payload, is often the router protecting itself rather than the path dropping your real traffic. Loss that shows up at a steady one packet per second, over minutes, is real.
The rtt line, and why the last number is the important one
Four figures: minimum, average, maximum, and a spread. Linux labels the last one mdev; macOS and the BSDs print stddev in the same slot. Either way it measures how far individual round trips scatter around the average, which is what everyone means by jitter.
Most people read the average and stop. That is the wrong number to stop on. The average tells you how far away something is. The spread tells you how the connection feels, because anything real-time has to buffer for the worst case rather than the typical one. A path averaging 40 ms with 2 ms of jitter carries a clean voice call. A path averaging 25 ms with 30 ms of jitter is a faster path on paper and an unusable one in practice: the receiver has to hold audio back to cover the late packets, and when it guesses wrong you hear a dropout.
A quick way to read the line without doing arithmetic: compare min and max. In the run above they are 12.7 and 14.6, a spread of under 2 ms, which is a stable path. If max is several times min, something on the route is queueing your packets, and the average is hiding it. That relationship between latency, jitter and what a user actually experiences is the same one that makes response time percentiles more useful than response time averages.
- 64
- the initial TTL Linux and macOS put on outgoing packets; Windows uses 128
- 32
- bytes of payload Windows ping sends per packet; Linux and macOS send 56
- 4
- echo requests Windows sends before stopping; Linux keeps going until Ctrl+C
- 1472
- the largest ping payload that fits a 1500-byte Ethernet MTU without fragmenting
The same command, three different flag sets
The Linux ping command, the macOS one and the Windows one are three separate programs that happen to share a name. Their flags overlap enough to feel portable and differ enough to bite. The first difference you meet is the default: ping in Command Prompt on Windows sends four packets and exits, while on Linux and macOS it runs until you stop it. Here is what each one wants:
| What you want | Linux (iputils) | macOS and BSD | Windows |
|---|---|---|---|
| Send a fixed number of packets | -c 5 | -c 5 | -n 5 |
| Run continuously | default behaviour | default behaviour | -t |
| Time between packets | -i 0.5 (seconds) | -i 0.5 (seconds) | no equivalent |
| Payload size | -s 1400 | -s 1400 | -l 1400 |
| Set the outgoing TTL | -t 64 | -m 64 | -i 64 |
| Wait time per reply | -W 2 (seconds) | -W 2000 (milliseconds) | -w 2000 (milliseconds) |
| Stop the whole run after N seconds | -w 10 | -t 10 | no equivalent |
| Do not fragment | -M do | -D | -f |
| Skip reverse DNS on replies | -n | -n | skipped by default (-a asks for the lookup) |
| Force IPv4 or IPv6 | -4 / -6 | macOS has neither: use ping6. FreeBSD 13 and later accept -4 / -6 | -4 / -6 |
Three flags mean three different things depending on where you type them. -t: ping forever on Windows, set the TTL on Linux, exit after N seconds on macOS. -i: interval between packets on Linux and macOS, set the TTL on Windows. -D: print a timestamp on Linux, set the Do Not Fragment bit on macOS. Copying a command between machines without checking is how a five-second test becomes a ten-minute one.
Two more Linux notes. Only root may set -i below 2 ms, and only root may run flood mode -f with a zero interval, because both let you generate a lot of traffic very quickly. Do not point either at a host you do not own: from the far end it is indistinguishable from an attack.
Continuous ping, and logging an intermittent fault
The problems worth investigating with ping are rarely the ones happening while you watch. A connection that drops for eight seconds twice a day will never appear in a five-packet test. The fix is to leave a ping running with timestamps, and read the file afterwards.
On Linux and macOS, ping already runs until you stop it. Add -i to slow it down so the log stays readable. On Linux, two more flags make the log worth reading afterwards: -D puts a Unix timestamp on every line, and -O prints a line for packets that got no answer. Without -O a lost packet leaves no trace at all in the file, just a gap in the sequence numbers you would have to spot by eye. Wrap the whole thing in stdbuf -oL so the output reaches the file line by line instead of sitting in a buffer:
# One packet every 5 seconds, timestamped, losses recorded, appended to a file
stdbuf -oL ping -D -O -i 5 8.8.8.8 >> ~/ping-8888.log 2>&1 &
# Later: how many replies, and how many losses?
grep -c "bytes from" ~/ping-8888.log
grep -c "no answer yet" ~/ping-8888.log
# Pull out only the slow ones (over 100 ms)
grep -E "time=[0-9]{3,}" ~/ping-8888.log
On Windows, -t is what makes ping continuous, and it has a feature worth knowing: press Ctrl+Break and it prints the running statistics so far and keeps going. Ctrl+C stops it. Windows ping does not timestamp its output, so if you want to correlate a drop with anything else, add the timestamp in PowerShell:
REM Command Prompt: runs until Ctrl+C, Ctrl+Break for interim stats
ping -t 8.8.8.8
REM PowerShell: same thing, with a timestamp on every line
ping -t 8.8.8.8 | ForEach-Object { "$(Get-Date -Format o) $_" } | Tee-Object -FilePath ping.log
Two things to control before you trust the log. Ping from a wired machine if you can, because a ping over Wi-Fi measures your Wi-Fi and will happily blame the internet for a bad access point. And ping two targets at once, your own gateway and something external such as 8.8.8.8, so that when loss appears you can immediately see whether it starts inside your network or outside it.
Reading the failures: each one points somewhere different
When ping fails, the specific message is the diagnosis. The most common mistake is treating them all as "it did not work" when they are telling you about completely different parts of the path. Read who sent the message as carefully as you read the message itself.
| What you see | Who is telling you | What it means |
|---|---|---|
Request timed out. (Windows), or a gap in icmp_seq and 100% packet loss (Linux, macOS) | Nobody. This is silence. | The request went out and nothing came back. The host may be down, may be filtering ICMP, may have replied into a black hole, or may never have received it. This is the least informative failure, and the one most often misread as proof of an outage. |
Destination host unreachable | A router on the path, whose IP is printed in the line. | That router has a route toward the target subnet but could not reach the host itself, typically because there was no ARP reply. The host is off, unplugged, or on a different subnet than you think. The router named itself: start there. |
Destination net unreachable | A router further out. | No route to that network at all. This is a routing problem, not a host problem, and it is usually not yours to fix. |
ping: unknown host, Name or service not known, Ping request could not find host | Your own resolver. | DNS failed and no ICMP packet was ever sent. Nothing here concerns the network path. See ERR_NAME_NOT_RESOLVED and DNS server not responding. |
TTL expired in transit (Windows), Time to live exceeded (Linux) | The router where the hop budget ran out. | The packet crossed more routers than its TTL allowed. Usually a routing loop, occasionally just a deliberately low TTL you set yourself. |
PING: transmit failed. General failure. | Your own machine. | The packet never left. Adapter, driver, or IP stack problem locally. Check the interface before you check anything else. |
ping: sendmsg: Operation not permitted | Your local firewall. | A local rule is blocking outbound ICMP. Nothing external is involved. |
The pattern worth internalising: an error message means some device on the path identified itself and told you what went wrong, which is genuinely useful. A timeout means nothing answered, which is barely information at all. If you are staring at timeouts, the next tool is traceroute, not another ping.
Ping on a schedule, from 15+ locations
Ping monitoring checks ICMP reachability continuously and alerts you when a host stops answering. For a website you usually want an HTTP check alongside it, since a server can answer ICMP while the site returns errors.
A failed ping does not mean the website is down
This is the part that matters most, and it cuts both ways.
No reply does not mean the host is down. Filtering ICMP is ordinary, deliberate policy across large parts of the internet, and it has been for two decades. AWS security groups allow no inbound traffic until you write a rule, and ICMP echo request needs its own rule, so a freshly launched EC2 instance serving traffic perfectly will not answer a ping. Windows Defender Firewall blocks inbound echo requests on the private and public profiles by default, which is why a healthy Windows box on a new network ignores you until somebody enables the File and Printer Sharing (Echo Request - ICMPv4-In) rule. Plenty of corporate firewalls drop echo requests at the edge as a matter of course. Getting nothing back from a host tells you that host does not answer ICMP from where you are. It is not a diagnosis.
A reply does not mean the website is up. ICMP is handled by the kernel, so an echo reply proves the machine has power, an IP address and a functioning network stack. It says nothing about anything running on top. The web server can be returning 500s to every request, the TLS certificate can have expired an hour ago, the database can be refusing connections, the application can be deadlocked and serving a blank page. All of that is invisible to ping, and every one of those is an outage to your users.
There is a third trap specific to modern hosting. If a domain sits behind a CDN or a reverse proxy, the thing that answers your ping is the edge, not your server. Ping a Cloudflare-proxied hostname and you get a fast, healthy reply from a Cloudflare data center near you while your origin sits dead in a rack somewhere. The ping succeeded. The website is down. Nothing about the output hinted at it.
Ping answers exactly one question: does this IP address answer ICMP from where I am standing. If the question you actually have is "can people use my website", ping cannot answer it in either direction. Check the site itself, from outside, with a real request.
ping vs traceroute vs curl vs an uptime check
Each of these proves something narrow, and knowing the boundaries saves you from concluding too much from one of them:
| Tool | What it sends | What a success proves | What it cannot tell you |
|---|---|---|---|
ping | ICMP echo requests | The host answers ICMP, plus round-trip time and loss | Whether any service on the host works |
traceroute / tracert / mtr | Packets with rising TTL values | Which hop the path stops at, and roughly where delay is introduced | Reliable per-hop latency: routers deprioritise the errors they generate, so a slow-looking middle hop is often an artefact |
curl -v | A real HTTP request | The web server answers, with a status code, TLS validity and full request timing | Whether it works from anywhere else, or a minute from now |
| Uptime monitoring | Scheduled HTTP or ICMP checks from many locations | Whether the site is reachable now and how it behaved historically, with an alert when it is not | Why it broke, only that something did |
The usual sequence when something is wrong: ping to see whether the host is reachable at all, traceroute to find where the path breaks if it is not, and curl to find out whether the application is actually working if it is. Ping is the first step because it is the cheapest, not because it is the most informative.
Ping recipes worth keeping
How to use the ping command well comes down to asking a specific question instead of a vague one. To ping an IP address from a Linux or macOS shell, or in Command Prompt on Windows, these are the runs worth keeping:
# Is my connection working at all, ignoring DNS entirely?
ping -c 4 8.8.8.8 # Linux, macOS
ping -n 4 8.8.8.8 # Windows
# Is DNS the problem? Compare these two.
ping -c 4 8.8.8.8
ping -c 4 example.com
# Is my own gateway healthy, or does the trouble start upstream?
ping -c 20 192.168.1.1
# Quick jitter sample: 20 packets, fast, then read mdev
ping -c 20 -i 0.2 8.8.8.8
# Is there an MTU problem? 1472 + 8 ICMP + 20 IP = 1500
ping -c 3 -M do -s 1472 8.8.8.8 # Linux
ping -c 3 -D -s 1472 8.8.8.8 # macOS
ping -f -l 1472 -n 3 8.8.8.8 # Windows
The MTU one is worth explaining because it is the most useful non-obvious trick here. The Do Not Fragment bit stops routers splitting your packet, so if a payload of 1472 fails while 1400 succeeds, something on the path has an MTU below 1500. That is the classic signature of a VPN or a PPPoE link, where a page starts loading and then stalls forever. Step the size down until it succeeds and you have found the working MTU. Note that this still is not a bandwidth test: you are probing packet size, not speed.
One safety note on -f: on Windows it sets Do Not Fragment, but on Linux the same letter means flood ping, which fires packets as fast as the host replies. Same flag, wildly different consequences.
Using ping as a network health check
Everything above is ping as a hand tool. Run on a schedule, it becomes a health check, and the honest scope of that check is narrow but real.
Scheduled ICMP checks are the right instrument for anything that has an IP address and no HTTP surface: routers, switches, firewalls, VPN endpoints, printers, IoT devices, database servers, a bare host you want to know is alive. For these, ICMP reachability is the health question, and ping monitoring answers it directly, with the round-trip time doubling as an early warning that something on the path is degrading before it fails outright.
For a website, ICMP is the wrong check on its own, for both reasons above: a healthy host may not answer it, and a broken one may answer perfectly. The pairing that works is an HTTP check that requests a real URL and validates the status code, with an ICMP check alongside it when you also want to know the machine is reachable. The gap between the two is often what locates the fault: HTTP failing while ICMP passes means the box is up and the application is not.
Do the baselining while things are healthy. Ping is far more useful when you can say "this path has run at 14 ms with 0.5 ms of jitter for six months" than when you meet it for the first time mid-incident. Without history, a number has nothing to be compared against.
Ping monitoring tells you a host is reachable. An HTTP check tells you a website is working. They are different questions, and a site can fail one while passing the other in either direction.
See how Pulsetic's ping monitoring catches this from the outside, across 15+ locations.
Frequently asked questions
-
What is the ping command?
Ping is a command-line tool that sends ICMP echo request packets to a host and reports whether replies came back and how long each round trip took. It ships with Windows, macOS and every Linux distribution, and it is the standard first test of whether one machine can reach another over a network.
-
How do I ping an IP address from the command line?
Open Command Prompt on Windows or Terminal on macOS and Linux, then type ping followed by the address, for example "ping 8.8.8.8". Add -n 5 on Windows or -c 5 on Linux and macOS to send a fixed number of packets. Pinging an IP address rather than a hostname skips DNS entirely, which is why it is the standard way to check whether a connection works when name resolution is suspect.
-
What is a good ping time?
It depends entirely on distance. Under 1 ms is normal on a wired LAN, 10 to 40 ms to a nearby CDN edge, 70 to 120 ms across the Atlantic, and 500 ms or more over a geostationary satellite link. The useful comparison is against your own baseline for that path, not against an absolute figure. A jump from 12 ms to 90 ms on a link that has always been fast is a problem, even though 90 ms would be perfectly normal for someone on another continent.
-
What does TTL mean in ping output?
TTL is a hop counter, despite standing for Time To Live. Each router that forwards the packet subtracts 1, and at 0 the packet is discarded. Systems start it at a standard value: 64 on Linux and macOS, 128 on Windows, 255 on many network appliances. Round the value you see up to the nearest of those and subtract to estimate hops, so ttl=116 means roughly 12 routers on the return path. It is an estimate, because operators can change the initial value and the return path may differ from the outbound one.
-
How do I run a continuous ping?
On Linux and macOS ping runs continuously by default; press Ctrl+C to stop and print the summary. On Windows use ping -t, then Ctrl+Break to print interim statistics without stopping, or Ctrl+C to stop. For an intermittent fault, slow the rate with -i 5 on Linux or macOS and redirect the output to a file so you can read it later.
-
Does a failed ping mean the website is down?
No. Many hosts, cloud platforms and CDNs filter ICMP as a matter of policy, so a perfectly healthy server can refuse to answer a ping. The reverse is also true: a successful ping only proves the machine has a working network stack, not that the web server, TLS certificate or application behind it are working. To know whether a website is actually up, make a real HTTP request to it.
-
Catch the next outage before your visitors do.
2-minute setup · Cancel any time
-
No credit card needed