How does path tracing work?
Every IP packet carries a time-to-live (TTL) counter that each router decrements. When it reaches zero, the router drops the packet and usually sends back an ICMP "time exceeded" message. A trace sends probes with TTL 1, 2, 3 and so on, and records which router answers at each step and how long it took. The result is a hop-by-hop map of the path toward the target.
How do the two tools differ?
| Feature | traceroute | tracepath |
|---|---|---|
| Default probe | UDP to high ports | UDP |
| Other probe types | ICMP (-I), TCP (-T) | None |
| Needs root | For ICMP and TCP modes | Never |
| Path MTU discovery | Optional with --mtu | Built in, reported per hop |
| Package | traceroute | iputils-tracepath or iputils |
Install what is missing with apt install traceroute iputils-tracepath on Debian and Ubuntu or dnf install traceroute on Enterprise Linux, where tracepath already ships with iputils.
When should I use tracepath?
When large transfers stall while small requests work. That pattern usually means an MTU mismatch, and tracepath reports the MTU at each hop:
tracepath -n -b 198.51.100.12 # 1?: [LOCALHOST] pmtu 1500 # 1: 203.0.113.24 0.512ms # ... # 6: 10.200.0.9 pmtu 1420
A drop from 1500 to a smaller value marks where packets must shrink, often a tunnel. The fix is lowering the MTU on your tunnel interface or enabling MSS clamping. Ping can confirm it, as shown in The ping command.
When should I use traceroute?
When UDP probes vanish into asterisks because a firewall drops them. Switch to probes the firewall allows:
traceroute -n 198.51.100.12 # UDP, default sudo traceroute -n -I 198.51.100.12 # ICMP echo sudo traceroute -n -T -p 443 shop.example.net # TCP SYN to the HTTPS port
The TCP form follows the same path real web traffic takes and passes most firewalls, which makes it the most realistic trace toward a website. -n skips reverse DNS lookups, which otherwise slow every hop.
What do asterisks mean?
A hop that did not answer within the timeout. Many routers rate-limit or ignore the ICMP replies traces depend on, so single asterisks in the middle of a healthy trace are normal. What matters is the end: if later hops answer, earlier silence is not packet loss. A trace that shows asterisks all the way after a certain hop, and the destination never answering, points to filtering or a real break at that point.
How do I measure loss per hop?
Use mtr, which combines ping and traceroute and repeats the trace continuously:
mtr -n -r -c 100 -T -P 443 shop.example.net
The report shows loss, average and worst latency per hop after 100 cycles. Loss that appears at one hop and continues through every hop after it is real; loss at one hop that vanishes further on is that router de-prioritising its own replies, not a problem for your traffic.
Why trace in both directions?
Internet routing is often asymmetric: packets from you to a client may take a different path from packets coming back. A trace from your machine only shows the outbound half. When a user reports slowness, ask them for an mtr or traceroute toward your address, and run one toward theirs. Attach both, with timestamps, to a ticket in the panel if the problem looks like it sits near our network edge.
Can traces help choose a city?
Partly. Hop counts say little; latency at the final hop says a lot. Compare minimum RTT from your users toward test hosts in Ashburn, Chicago or Amsterdam, and remember the floor set by distance described in Latency. Since every model costs the same in all six cities, choose purely on what the measurements show.
Keep Reading
The ping command
Use ping beyond "is it up": counts, intervals, packet sizes, path MTU tests, timestamps and reading loss and jitter correctly.
OpenLatency
Why distance sets the floor for ping time, how to estimate round trips between our six cities and how to choose a location.
OpenThe ss command
List sockets fast with ss: listening ports, filters by state, port and address, TCP internals like RTT, summaries and killing stuck sockets.
OpenServers in Ashburn
Northern Virginia hub with short paths to the East Coast and across the Atlantic, ideal for APIs and transatlantic services.
OpenFAQ
Quick Answers
tracepath needs no root and reports path MTU; traceroute supports ICMP and TCP probes for tracing through firewalls.
A hop did not reply in time, often because routers rate-limit ICMP. It matters only if later hops also fail.
Run sudo traceroute -T -p 443 followed by the host to send TCP SYN probes to port 443.
mtr, run in report mode with a cycle count such as mtr -r -c 100.
Routing is often asymmetric, so the return path can differ from the outbound path.