Skip to main content

Ping

Updated 3 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/ping

In short

Ping is a network utility that checks whether a host is reachable by sending it small ICMP echo requests and measuring how long each reply takes to return.

What is ping?

Ping is a command-line tool, available on virtually every operating system, that tests whether another device on a network is reachable. It sends a small message to the target, waits for an answer, and reports whether a reply arrived and how long the round trip took. The word is also used as a verb, as in pinging a server, and informally for the delay itself, as when gamers say they have a high ping.

Under the hood, ping uses ICMP (Internet Control Message Protocol), a helper protocol that runs alongside IP to carry error and status messages. It sends ICMP echo request packets, and the target answers each one with an echo reply. For every reply, ping prints the round-trip time (RTT) in milliseconds and the remaining TTL, and at the end it summarizes the minimum, average, and maximum times plus the percentage of packets lost. ICMP has no port numbers, so ping tells you whether a host is reachable, not whether a particular service, such as a web server on port 443, is running.

The name comes from sonar: a submarine sends out a sound pulse and listens for the echo to judge how far away something is. Developers and operators use ping as a first troubleshooting step: if you can ping your router but not a public address, the problem is probably beyond your local network, and if you can ping an IP address but not a domain name, DNS is the likely culprit. Monitoring tools also ping hosts regularly as a basic sign of life.

A failed ping doesn't always mean a host is down, which is a common confusion. Many firewalls and cloud networks block ICMP by default, so a perfectly healthy server may never answer, and the reverse is also true: a host can answer pings while its application is broken. Ping is also often mixed up with traceroute. Ping measures the whole round trip to one destination, while traceroute lists each router along the way and the delay to each one.

Key takeaways

  • Ping checks whether a host is reachable and measures the round-trip time to it.
  • It sends ICMP echo requests and waits for echo replies.
  • Its summary reports the minimum, average, and maximum latency plus packet loss.
  • ICMP has no ports, so ping can't tell you whether a specific service is running.
  • Firewalls often block ICMP, so a missing reply doesn't always mean the host is down.

Example

Using ping to troubleshoot a connectionbash
# Send 4 echo requests, then stop (on Windows, use -n 4)
ping -c 4 example.com
# 64 bytes from <address>: icmp_seq=1 ttl=56 time=11.8 ms
# ...
# 4 packets transmitted, 4 received, 0% packet loss
# rtt min/avg/max/mdev = 11.2/11.9/12.6/0.5 ms

# Narrow down a problem step by step
ping -c 2 192.168.1.1     # the local router: does the LAN work?
ping -c 2 203.0.113.10    # a public IP address: is the internet reachable?
ping -c 2 example.com     # a domain name: does DNS work too?

Readers ask

What is a good ping time?

On a local network, replies usually come back in about 1 ms or less. Across the internet, under about 50 ms is very good, and above roughly 150 ms starts to feel slow for games and video calls; physical distance is the biggest factor.

Why does ping fail when the website still works?

The server, or a firewall in front of it, is probably blocking ICMP, which many cloud providers and companies do by default. The website still works because it uses TCP on port 443, which is allowed through.

What is the difference between ping and traceroute?

Ping measures reachability and round-trip time to a single destination. Traceroute shows every router hop between you and the destination, which helps you find where along the path a delay or failure happens.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings