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

$ ping -c 4 app.example.com PING app.example.com (203.0.113.42): 56 data bytes 64 bytes from 203.0.113.42: icmp_seq=0 ttl=54 time=11.204 ms 64 bytes from 203.0.113.42: icmp_seq=1 ttl=54 time=10.887 ms 64 bytes from 203.0.113.42: icmp_seq=2 ttl=54 time=12.013 ms 64 bytes from 203.0.113.42: icmp_seq=3 ttl=54 time=11.442 ms --- app.example.com ping statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 10.887/11.387/12.013/0.421 ms
  • 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
PlatformDefault behaviorTo limit the count
WindowsSends exactly 4 packets and stops automaticallyping -n 10 app.example.com
Linux / macOSRuns continuously until interrupted with Ctrl+Cping -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.

Windows and Linux don't use the same underlying protocol by default
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

$ traceroute app.example.com 1 192.168.1.1 (192.168.1.1) 0.412 ms 0.389 ms 0.375 ms 2 10.20.0.1 (10.20.0.1) 2.104 ms 2.041 ms 1.998 ms 3 * * * 4 203.0.42.9 (203.0.42.9) 8.221 ms 8.109 ms 8.033 ms 5 203.0.113.42 (203.0.113.42) 11.204 ms 11.187 ms 11.093 ms

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.

A silent hop in the middle isn't proof the path is broken there
The same "refused vs. timed out" and "silent gateway" ambiguity from earlier chapters applies to traceroute too, and it's worth being extra careful here because a wall of asterisks in the middle of a trace looks dramatic. What actually matters is whether the trace reaches the destination at all, and whether packet loss or timeouts persist consistently at or beyond a specific hop across repeated runs — not a single silent hop with normal hops on either side of it.

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.

A traceroute is good evidence to hand off, even mid-investigation
If a trace consistently stops or starts losing packets at a specific hop that belongs to another team or provider's network, that's concrete, specific evidence worth escalating with — "traffic reaches hop 4 fine every time but never gets a response past hop 5, which resolves to a range owned by [provider]" is a far more useful handoff than "the network seems slow," and it points the next person directly at where to start looking.

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

Exercise 1

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 solution
Exercise 2

Explain 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.

📄 View solution
Exercise 3

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 solution

Chapter 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 N to 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 tracert uses ICMP; Linux/macOS traceroute uses 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