Drill: Analyze Network Path Quality with mtr¶
Goal¶
Use mtr to combine traceroute and ping functionality to identify problem hops and measure path quality.
Setup¶
- Linux system with mtr installed (
apt install mtr-tinyoryum install mtr) - Root access for some modes (raw sockets)
Commands¶
Basic path analysis with report mode:
Use TCP mode to test through firewalls that block ICMP:
Use UDP mode:
Show IP addresses only (no DNS resolution):
Interactive mode for live monitoring:
Wide report with both IPs and hostnames:
Output as JSON for scripting:
What to Look For¶
- Loss% at a single hop but not at subsequent hops is usually ICMP rate-limiting, not real loss
- Loss% that starts at one hop and continues to the destination indicates a real problem
- High StDev (standard deviation) indicates inconsistent latency (jitter)
- Large latency jumps between hops are normal for geographic distance; look at the last hop
Common Mistakes¶
- Interpreting ICMP rate-limiting at intermediate hops as packet loss
- Using too few packets (
-c 5) for statistically meaningful results - Not trying TCP mode when ICMP is blocked by firewalls
- Forgetting that asymmetric routing means the return path may differ
Cleanup¶
No cleanup needed. mtr is a read-only diagnostic tool.