keepcalculator

06 Numbers and Powers

Cheap Network Troubleshooting Tool: Packet Tracer? No, Ping

Card No. 06·6072 · Updated · Standard formula, shown below

Reachable? 1
Time to wait (s)
4 s
You entered
Packets sent
4
You entered
You enter
Time to wait (s), Packets sent
You get
Reachable?
Rounding
0 dp

The go-to network troubleshooting tool that costs less than lunch and has no settings is ping. Ping is a command-line utility built into every major operating system (Windows, macOS, Linux, and even most network devices) that sends a small data packet to a target IP address or hostname and measures how long the round trip takes. You type one word, press Enter, and get back a yes/no answer on whether the target is reachable, plus the latency in milliseconds — that’s the entire interface.

Note: The calculator above is a placeholder because ping’s core logic is network I/O, not arithmetic. The real tool is the command itself, explained below.

What Ping Actually Does

Ping uses the Internet Control Message Protocol (ICMP), a companion to the better-known TCP and UDP. When you run ping example.com, your computer sends an ICMP Echo Request packet to that host. If the host is alive and reachable, it replies with an ICMP Echo Reply. The time between sending the request and receiving the reply is the round-trip time (RTT), usually shown in milliseconds. Ping also reports packet loss — the percentage of requests that never got a reply — which is often more telling than raw latency.

The name comes from sonar: you send a pulse and listen for the echo. The tool was created in 1983 by Mike Muuss, who named it after the sound sonar makes. It has remained essentially unchanged because the concept is so simple that there is nothing to improve.

Why It Has No Settings

Ping’s default behavior is deliberately minimal. It sends one packet per second until you stop it (Ctrl+C on most systems) or until you specify a count. There are optional flags — -t on Windows to keep pinging forever, -c on Linux/macOS to set a count, -i to change the interval — but you never need them for basic troubleshooting. The tool works out of the box with zero configuration because it uses a fixed packet size (32 bytes of data by default) and a standard timeout. That lack of settings is a feature: it removes variables when you are trying to isolate a problem.

How to Read the Output

On a healthy network, ping output looks like this (Linux/macOS format):

64 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=14.3 ms

Windows shows similar lines with Reply from. The three numbers that matter are:

  • time — round-trip latency in milliseconds. Under 20 ms on a local network is normal; 50–150 ms is typical for cross-country internet; over 300 ms suggests a problem or a very distant server.
  • packet loss — shown as a summary line at the end. Any loss above 0% is worth investigating; 5% or more usually explains sluggish browsing or dropped calls.
  • TTL — time-to-live, a counter that decrements each hop. It is mostly useful to identify the OS of the target (Windows defaults to 128, Linux to 64), but not essential for basic troubleshooting.

If the target is unreachable, you will see Request timed out (Windows) or Destination Host Unreachable (Linux/macOS). The distinction matters: “timed out” means your packet went out but no reply came back — the host may be down, or a firewall is silently dropping ICMP. “Destination Host Unreachable” usually means your own network has no route to that IP, so the problem is local.

Common Problems and Misconceptions

The biggest misconception is that ping failure means the server is down. Many servers and routers block ICMP for security or performance reasons. A web server can be perfectly healthy while refusing to answer ping. So a failed ping tells you only that ICMP is blocked or the host is unreachable — not why. Conversely, a successful ping tells you the host is alive and the network path is working, but it says nothing about whether the web service on port 80 is responding.

Another common issue is misreading latency spikes. A single high-latency reply (say 500 ms) is often just a momentary network hiccup. Look at the average and the loss percentage, not one outlier. Also, ping does not account for the time your own Wi-Fi adds — if you are on wireless, the numbers include airtime, which can vary wildly with interference.

Finally, ping does not test bandwidth. A link can have 1 ms latency and still be saturated, causing slow downloads. For throughput you need a different tool, but ping is the right first step because it is fast and free.

How to Use Ping in a Real Workflow

When a user says “the internet is slow,” the standard escalation is:

  1. Ping the local gateway (e.g., ping 192.168.1.1) — if this fails, the problem is your own Wi-Fi or router.
  2. Ping a public IP like ping 8.8.8.8 — if this fails but the gateway works, your ISP link is down.
  3. Ping a hostname like ping google.com — if this fails but the IP worked, DNS is broken.

This three-step test isolates the fault to your LAN, your ISP, or your DNS. It takes less than a minute and requires no tools beyond the command prompt. For a more thorough check, use ping -c 10 (Linux/macOS) or ping -n 10 (Windows) to send 10 packets and get a reliable loss percentage.

Alternatives and When to Use Them

Ping is the cheapest and fastest check, but it has limits. If you need to trace the path, use traceroute (Windows: tracert), which shows each router hop and where delays accumulate. If you need to test a specific port, use telnet host port or nc -vz host port (netcat). If you need bandwidth, use iperf3 or a speed test. If you need to see if a web server is responding, use curl -I. But for a first pass, ping is the right tool because it is universal, instant, and requires no installation.

Frequently Asked Questions

Why does ping work on some devices but not others?

Because ICMP is optional. Many firewalls and cloud providers block ICMP by default to reduce attack surface. If you cannot ping a server but can browse its website, that is normal. If you cannot ping your own router, check your firewall settings.

What is a good ping time?

For local networks, under 10 ms is excellent. For internet, under 50 ms is good for gaming, under 100 ms is fine for general browsing, and anything above 200 ms will feel laggy for real-time applications. But latency is distance-dependent — a server on another continent will naturally have higher ping.

Can ping be used to test internet speed?

No. Ping measures latency, not throughput. You can have 1 ms latency and 0.5 Mbps speed, or 50 ms latency and 1 Gbps speed. For speed, use a bandwidth test that transfers actual data.

Why does ping show 100% loss but the internet works?

Because the target is blocking ICMP, or your firewall is blocking outgoing ICMP. The internet works because HTTP/HTTPS traffic uses TCP, which is not blocked. Try pinging a different IP, or use a TCP-based tool like curl to confirm.

Is it safe to run ping continuously?

Yes, sending one packet per second is negligible traffic. But be courteous: pinging a public server hundreds of times is unnecessary and some administrators consider it a minor nuisance. Use a limited count for troubleshooting.

What does “TTL expired in transit” mean?

It means the packet hit a routing loop or a router with a misconfigured TTL. The packet’s hop counter reached zero before reaching the target. This is rare and usually indicates a network configuration problem, not a host issue.

Related

Formula used
in t | Time to wait (s) | s | 4 | 1 | 60
in p | Packets sent | - | 4 | 1 | 100
out reach | Reachable? | - | (t * 0) + 1 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →