Skip to content

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-tiny or yum install mtr)
  • Root access for some modes (raw sockets)

Commands

Basic path analysis with report mode:

mtr --report -c 20 example.com

Use TCP mode to test through firewalls that block ICMP:

mtr --report --tcp -P 443 -c 20 example.com

Use UDP mode:

mtr --report --udp -c 20 example.com

Show IP addresses only (no DNS resolution):

mtr --report --no-dns -c 20 example.com

Interactive mode for live monitoring:

mtr example.com

Wide report with both IPs and hostnames:

mtr --report-wide -c 30 example.com

Output as JSON for scripting:

mtr --json -c 10 example.com

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.