← Lessons

quiz vs the machine

Gold1320

Networking

How Traceroute Maps A Path

Learn the clever use of the time to live field that reveals every hop to a destination.

4 min read · core · beat Gold to climb

Revealing The Route

A packet may cross a dozen routers on its way to a server, but normally you never see them. Traceroute exposes each hop along the path, which is invaluable for diagnosing where latency or loss appears.

The Time To Live Trick

Every IP packet carries a time to live field that each router decrements by one. When it reaches zero, the router discards the packet and sends back an ICMP time exceeded message naming itself.

Traceroute exploits this deliberately:

  • It sends a packet with time to live set to one, so the first router replies and reveals itself.
  • It sends another with time to live two, so the second router replies.
  • It keeps increasing the value until a packet finally reaches the destination.

Each returned message identifies the router at that distance, building the path one hop at a time.

Reading The Output

  • Each line shows a hop and the round trip time to it.
  • Rising times can point to a congested or distant link.
  • Stars mean a hop did not reply, often because it is configured to ignore these probes, which is normal.

Key idea

Traceroute sends packets with increasing time to live values so each successive router reports a time exceeded message, revealing every hop and its round trip time along the path.

Check yourself

Answer to earn rating on the learn ladder.

1. How does traceroute make each router reveal itself?

2. What does a star in traceroute output usually mean?