Vol. I · No. 46The command line sectionSat, 10 Oct 2026
Linux · reachability

traceroute

which way the packet went

traceroute sends probes with a TTL of 1, then 2, then 3. Each router that decrements the TTL to zero discards the probe and reports back with an ICMP time-exceeded message, and that reply gives away the router's address. The result is the forward path, one hop per line.

The TTL exists to kill packets caught in a loop — traceroute uses that safety mechanism as a flashlight.

Relies on
TTL expiry
ICMP time-exceeded replies
Default probe
UDP
-I for ICMP, -T for TCP
Probes per hop
3
three timings on each line
Shows
Forward path only
the return may differ

At the terminal

Read the session first, then the notes: each numbered line in the output is answered by the note with the same number.

user@netflow — bashtraceroute
$ traceroute -n 192.0.2.10
traceroute to 192.0.2.10 (192.0.2.10), 30 hops max, 60 byte packets
1 1 192.168.1.1 0.412 ms 0.388 ms 0.371 ms
2 2 10.20.0.1 3.104 ms 2.987 ms 3.220 ms
3 3 * * *
4 198.51.100.33 9.871 ms 9.640 ms 10.012 ms
4 5 192.0.2.10 11.902 ms 11.754 ms 12.031 ms
Illustrative session · names, sizes and dates are examples, and every address is from a documentation or private range
Reading the output

What the numbered lines are telling you

1
Hop 1 is your own gateway

Three probes, three round-trip times. Sub-millisecond is what a healthy local link looks like.

2
The jump in latency marks a slower link

From 0.4 ms to 3 ms: the packet left the building. The time is cumulative to that hop, not the cost of that hop alone.

3
Stars are a router that did not reply

It forwarded the probes — later hops answered — but sends no time-exceeded messages, or rate-limits them. Not a fault.

4
The last line is the destination itself

Its time should match what ping reports. If the trace ends in stars instead, the path or the target is dropping the probe type.

Switches

A switch changes how the command behaves. These are the ones used day to day; man traceroute lists the rest. Single-letter switches can usually be joined, so -l -a may be written -la.

-n
Numeric: show addresses only, do not look up host names. Much faster.
-I
Probe with ICMP echo requests instead of UDP.
-T
Probe with TCP SYN packets — gets through firewalls that drop the others.
-p PORT
The destination port to probe.
-m NUM
Give up after NUM hops. The default is 30.
-q NUM
Send NUM probes per hop instead of three.
-w SECS
Wait at most this long for each reply.

Variations worth knowing

The same tool, pointed at a narrower question. These four cover most of what it is reached for day to day.

traceroute -I 192.0.2.10

Probes with ICMP echo instead of UDP, which more firewalls allow.

traceroute -T -p 443 192.0.2.10

Probes with TCP SYNs to port 443 — follows the path real web traffic takes. Needs root.

tracepath 192.0.2.10

A sibling tool that needs no privileges and reports the path MTU as it goes.

mtr -n 192.0.2.10

Runs traceroute continuously and shows loss per hop — the better tool for an intermittent fault.

In cybersecurity

A trace is a map of somebody's network, drawn from outside. That makes it a standard step in reconnaissance, and a reason many routers stay quiet.

Topology disclosure

Router addresses and reverse names reveal providers, sites and internal numbering. Filter time-exceeded at the edge if that matters.

Finding the firewall

The hop where probes stop being answered is usually the filtering device, and the probe type that gets through shows its rules.

Loss at one hop

Loss that appears at a middle hop but not at the destination is just that router rate-limiting replies — not a real problem.

Asymmetric paths

The return path is invisible here. A trace that looks clean one way can hide a fault in the other direction.

Unexpected detours

A path that suddenly crosses an unfamiliar network may be a routing leak or a BGP hijack. Compare it with a known-good trace.

Load balancing

Equal-cost paths mean successive probes can take different routes, so one line may show several addresses.

Protocols it shows

ICMPUDPIPv4TCPBGP

Read alongside