Updated 10 hours ago
Ping is the simplest question you can ask a network: "Are you there?" And then you wait, counting milliseconds, to see if anyone answers.
The name comes from submarine sonar—a pulse sent into the darkness, listening for the echo that reveals what's out there. Network ping works the same way. You send a tiny packet into the void. If something's listening, it echoes back. The time it takes tells you how far away it is. The silence tells you something's wrong.
How Ping Works
Ping uses the Internet Control Message Protocol (ICMP) to send "echo request" packets to a destination. When the remote host receives these packets, it sends back "echo reply" packets. By measuring the round-trip time and counting how many replies return, ping reveals:
- Whether the remote host is reachable at all
- How long packets take to travel there and back (latency)
- Whether packets are being lost along the way
- How consistent the connection is over time
Basic Usage
Or using an IP address directly:
On Linux and macOS, ping runs continuously until you press Ctrl+C. On Windows, it sends exactly four packets and stops. To make Windows ping continuously, add -t. To make Linux/macOS send a specific count, use -c 4.
Reading the Output
Each reply line tells a story:
- 64 bytes from 93.184.216.34 — The echo came back, and here's where from
- icmp_seq=0 — This is packet number 0 (they're numbered so you can spot gaps)
- ttl=56 — Time To Live, how many router hops remain before the packet would expire
- time=12.3 ms — The round trip took 12.3 milliseconds
The statistics at the end summarize everything: how many packets went out, how many came back, what percentage were lost, and the spread of response times.
What Good Looks Like
A healthy connection shows:
- 0% packet loss — Every echo request gets an echo reply
- Low latency — Under 20ms for nearby servers, under 100ms for distant ones
- Consistency — The minimum and maximum times are close together
Pinging a server in your city might show 5-10ms. A server across an ocean might show 150-200ms. The absolute number matters less than consistency—wild swings indicate problems even if the average looks fine.
What Problems Look Like
Complete silence — No replies at all. The host might be down, a firewall might be blocking ICMP, your Internet connection might be broken, or DNS failed to resolve the domain.
Intermittent replies — Some packets return, others vanish. This suggests congestion, failing hardware, wireless interference, or routing instability.
Slow but consistent — Every reply arrives, but latency is high. The path is congested, the connection is slow, or routing is inefficient.
Wildly variable times — Replies come back but response times jump around unpredictably. Something in the path is struggling—congestion, interference, or unstable routing.
Practical Patterns
Testing if your Internet works:
Google's DNS server is ideal for this—extremely reliable and almost never blocks ICMP. If this works, your Internet connection is alive.
Checking if a specific site is reachable:
If this fails but ping 8.8.8.8 succeeds, the problem is either with that specific site or with your DNS resolution.
Isolating local vs. remote problems:
Ping your router first. If your router responds but external hosts don't, the problem is between your router and the Internet, not in your local network.
The Limits of Ping
Ping answers one question well: "Can ICMP packets reach this host and return?" But that's not the same as "Is this service working?"
ICMP can be blocked. Many servers and firewalls drop ICMP for security reasons. A silent ping doesn't always mean the host is down—it might just mean they're not answering that particular question.
Services can fail independently. A server might respond to ping while its web server, database, or application is completely broken. Ping tests the network layer, not the application.
ICMP can be deprioritized. Some networks treat ICMP as low-priority traffic. Ping might show poor performance while actual application traffic flows fine.
Ping is a first step, not a complete diagnosis. It quickly answers whether basic connectivity exists. For everything else—tracing the path packets take, testing specific ports, checking application health—you need other tools.
But for that initial question, the one that starts every troubleshooting session, ping remains unmatched. Are you there? And in milliseconds, you have your answer.
Frequently Asked Questions About Ping
Was this page helpful?