WalkOnAWire · Hands-on routing fundamentals

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.

4routers in path
3discovered hops
9probe packets
2ICMP response types

Live packet-by-packet walkthrough

R1 sends · R2 and R3 forward · R4 is destination

Ready

Choose a UDP probe

Probe 0 of 9

Traceroute repeats UDP probes with successively larger TTL values.

ICMP replies return to R1 on this lane hop 1hop 2hop 3 ————R1 · Source192.0.2.10R2 · Transit198.51.100.2R3 · Transit203.0.113.3R4 · Destination203.0.113.4 UDP ICMP Select any probe below
Outbound UDP probeReturning ICMP errorTTL expires · packet dropped
Sent TTL —Expires at —UDP dport —ICMP —
1R1 sends a UDP probe
2Routers decrement TTL
3TTL hits 0, or probe arrives
4ICMP error returns
5R1 records the RTT
Key idea
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.
Try a failure scenario

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 probe
C:\Command Prompt - R1

Step-by-step: what happens to this probe

Follows the probe you select

Every 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

    These are illustrative packet fields and RTTs, not captured live network traffic.

    Probe selector

    3 TTL rounds × 3 probes

    How to read one line of output

    Each line is one TTL value, not one probe

    2203.0.113.32.34 ms2.08 ms2.29 ms
    Hop number: the TTL used for these probes
    Responder: source IP of the ICMP error
    Three RTTs: three separate probes at the same TTL

    Understand the packet fields and iterations

    01 · Outbound probe

    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.

    02 · Transit error

    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.

    03 · Iterations

    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 sentForwarding outcomeICMP sourceICMP Type / CodeResult at R1
    1R2 decrements TTL 1 → 0 and dropsR2 · 198.51.100.211 / 0 · Time ExceededFirst hop discovered
    2R2 forwards with TTL 1; R3 expires itR3 · 203.0.113.311 / 0 · Time ExceededSecond hop discovered
    3R2 and R3 forward; R4 receives UDP for closed portR4 · 203.0.113.43 / 3 · Port UnreachableDestination reached; stop

    Quiz

    Packet-level and troubleshooting questions