Testing the Path: ping and traceroute/tracert — What They Actually Prove
Network Troubleshooting
Chapter 5 · Testing the Path: ping and traceroute/tracert — What They Actually Prove
Both tools in this chapter have already made cameo appearances — Chapter 1's timed-out ping, Chapter 3's gateway ping. This chapter goes deeper on what they're actually doing under the hood, because a surprising amount of wasted diagnostic time comes from treating a ping reply as proof of more than it actually proves, or reading a broken-looking traceroute as more conclusive than it really is.
What Ping Actually Tests
ping sends an ICMP echo request and waits for an ICMP echo reply. That's the entire test — it says nothing directly about whether any actual service on that machine is working. A web server can be completely healthy and serving every request correctly while its host doesn't answer ping at all (ICMP disabled by policy, same as Chapter 3's gateway example); equally, a host can answer ping instantly while the one service you actually care about has crashed. Ping tests reachability at the network layer, not health at the application layer — conflating the two is one of the most common false conclusions in network troubleshooting.
Reading Ping Output In Depth
- Packet loss % — the single most important summary line; any sustained loss above 0% on a healthy path is worth investigating further, even if most packets get through
- Round-trip time (min/avg/max) — high or wildly varying latency (a large gap between min and max, called jitter) can point toward congestion somewhere on the path, even when every packet technically arrives
- TTL in the reply — a rough hint at how many hops away the destination is; a TTL value much lower than expected for a "local" destination can be a sign traffic is taking an unexpectedly long path
| Platform | Default behavior | To limit the count |
|---|---|---|
| Windows | Sends exactly 4 packets and stops automatically | ping -n 10 app.example.com |
| Linux / macOS | Runs continuously until interrupted with Ctrl+C | ping -c 4 app.example.com |
Traceroute: Watching the Path Hop by Hop
Where ping only reports the final result, traceroute (Linux/macOS) and tracert (Windows) reveal every router along the way. The mechanism is a genuinely clever trick with a packet's TTL field: the first probe is sent with TTL set to 1, so the very first router along the path decrements it to 0 and sends back an ICMP "time exceeded" message — revealing itself — instead of forwarding the packet further. The next probe uses TTL 2, revealing the second router, and so on, one hop further with each round, until a probe finally reaches the actual destination.
tracert on Windows sends ICMP echo requests, the same protocol family as ping. Traditional traceroute on Linux/macOS sends UDP packets to a high, normally-unused port by default, relying on a "port unreachable" ICMP response at the final hop to detect arrival. This matters in practice: a firewall that blocks UDP but allows ICMP (or the reverse) can make one tool succeed and the other fail on the exact same path, for reasons that have nothing to do with the actual destination being reachable.
Reading Traceroute Output
Each numbered line is one hop, with up to three round-trip times from three separate probes sent to it. Hop 3 shows three asterisks — no response at all from that specific router — yet hop 4 responds normally and the trace reaches the actual destination at hop 5. That's a genuinely common, non-broken pattern: many routers are configured to rate-limit or simply not generate the ICMP "time exceeded" messages traceroute depends on, even while forwarding the actual traffic through them perfectly normally.
What Neither Tool Proves
Two honest limits worth carrying into every later chapter. First, neither tool says anything about the application layer — a perfect ping and a clean traceroute both stop exactly at "the network path works," which is Chapter 6 and 7's job to build on, not this chapter's. Second, the path a traceroute reveals is only the outbound path — return traffic can genuinely take a different route back (asymmetric routing is common on real networks), so a trace that looks broken partway through doesn't necessarily mean the return path is broken in the same place, or at all.
Working Example: Continuing the Ticket
Chapter 4 confirmed the correct IP is 203.0.113.42 once the user's DNS cache issue was accounted for. A ping directly to that IP now returns clean, consistent replies with 0% loss — network reachability confirmed. A traceroute shows one silent hop partway through, but reaches the destination normally, consistent with this chapter's own "silent hop, normal arrival" pattern rather than a real problem. The ladder moves to Chapter 6: with the network path confirmed healthy, is the actual application port open and accepting connections?
Hands-On Exercises
A colleague says "the server must be healthy, it replies to ping instantly." Explain, using this chapter's own reasoning, why that conclusion goes further than the evidence actually supports.
📄 View solutionExplain why Windows' tracert and Linux's traceroute can produce different results for the exact same network path, even when nothing about the destination itself has changed.
A traceroute shows asterisks at hop 6, but hops 5 and 7 respond normally and the trace reaches the destination. Explain why this chapter says that alone isn't proof of a problem at hop 6, and what would actually be more convincing evidence.
📄 View solutionChapter 5 Quick Reference
- Ping tests reachability, not application health — a host can be fully healthy and ignore ping, or answer ping while its actual service is down
- Windows ping sends 4 packets and stops; Linux/macOS ping runs until interrupted (
-c Nto limit) - Traceroute reveals each hop via the TTL-increment trick — each router along the path is exposed one at a time as TTL expires
- Windows
tracertuses ICMP; Linux/macOStracerouteuses UDP by default — a firewall can make one succeed and the other fail on the identical path - A silent hop in the middle of a trace, with normal hops before and after it, usually just means that router doesn't generate "time exceeded" replies — not that the path is broken there
- Traceroute only shows the outbound path — the return path can genuinely differ (asymmetric routing)
- Next chapter: Port & Service-Level Checks: telnet, curl & netcat