C.W.K.
Stream
Lesson 02 of 13 · published

traceroute & mtr

~15 min · traceroute, mtr, hops, path-tracing

Level 0Pinger
0 XP0/101 lessons0/12 achievements
0/150 XP to next level150 XP to go0% complete

Following the path, hop by hop

traceroute prints every router (hop) between you and a destination, with a round-trip time per hop. It works by sending packets with deliberately low TTLs — TTL=1 expires at the first router, which sends back an ICMP "time exceeded." TTL=2 expires at the second router, and so on. Each "time exceeded" tells you who that hop is.

Asterisks (* * *) at a hop mean that router didn't reply to probes. Usually that means it's configured to silently drop or rate-limit ICMP probes — not that there's a problem. Real packet loss shows as multiple consecutive hops dropping replies.

mtr — traceroute with feedback

mtr is what you actually want. It combines ping and traceroute in a live-updating display: every hop, with continuously-updated loss percentage and latency averages. The only useful tool for diagnosing "this destination feels slow" — you can see exactly which hop introduces the latency or loss.

Code

traceroute and mtr·bash
# Plain traceroute
traceroute github.com

# Use ICMP instead of UDP probes (more friendly through some firewalls)
sudo traceroute -I github.com

# mtr — live, accumulating stats
brew install mtr   # macOS
mtr github.com

# Non-interactive snapshot — what you paste into bug reports
mtr --report -c 100 github.com

# Same with explicit columns
mtr --report --report-cycles 100 --no-dns github.com

External links

Exercise

Install mtr (brew install mtr). Run mtr github.com and let it accumulate ~30 cycles. Identify hop 1 (your gateway), the first ISP hop, and the destination. Note any hop with non-trivial loss. Then run mtr --report -c 100 github.com to get a static snapshot — that's what you'd attach to a support ticket.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.