How Traceroute Works
Follow individual UDP probes from source R1 toward destination R4. Watch each TTL expire, inspect the ICMP response, understand what three probes per hop actually mean, and read the resulting traceroute output.
Live packet-by-packet walkthrough
R1 sends · R2 and R3 forward · R4 is destination
Choose a UDP probe
Traceroute repeats UDP probes with successively larger TTL values.
A router that forwards an IPv4 packet reduces TTL by one. A transit router drops the packet when the TTL cannot be forwarded any further.
A * indicates no response within the timeout—not proof that the router is down or that the forward packet never arrived.
Simulated terminal
Command prompt on R1 · updates per probeStep-by-step: what happens to this probe
Follows the probe you selectEvery TTL change is listed, so you can follow exactly what R1 and each router does.
Packet inspector
Compare the outgoing UDP packet with the returning ICMP error.
What the network does
Probe selector
3 TTL rounds × 3 probesHow to read one line of output
Each line is one TTL value, not one probe
Understand the packet fields and iterations
What is inside UDP?
The IPv4 header has source IP, destination IP, protocol 17, and TTL. The UDP header has source port, destination port (starting at 33434), length, and checksum. The UDP payload can be minimal; the TTL is in the IP header, not the UDP header.
What comes back in ICMP?
When a transit router expires a packet, it may send ICMP Type 11, Code 0 (Time Exceeded). The reply contains a new outer IP header, ICMP type/code/checksum, and a quotation of the original packet to match the probe.
Why three probes?
Traditional traceroute commonly sends three independent probes per TTL value. Three replies show three separate round-trip times, which can differ due to load, queuing, ECMP or rate limiting. They are not three hops.
What each TTL reveals
Example when all ICMP replies are permitted
| TTL sent | Forwarding outcome | ICMP source | ICMP Type / Code | Result at R1 |
|---|---|---|---|---|
| 1 | R2 decrements TTL 1 → 0 and drops | R2 · 198.51.100.2 | 11 / 0 · Time Exceeded | First hop discovered |
| 2 | R2 forwards with TTL 1; R3 expires it | R3 · 203.0.113.3 | 11 / 0 · Time Exceeded | Second hop discovered |
| 3 | R2 and R3 forward; R4 receives UDP for closed port | R4 · 203.0.113.4 | 3 / 3 · Port Unreachable | Destination reached; stop |
Quiz
Packet-level and troubleshooting questions