mtr(8)
Combines traceroute and ping functionality to diagnose network paths and measure latency to a destination host.
Synopsis
mtr [OPTION]... HOSTDescription
mtr (My Traceroute) is a network diagnostic tool that sends ICMP echo requests to each hop along the path to a destination, displaying response times and packet loss statistics in real-time. It continuously probes the route, updating results similar to how top works for processes.
Unlike traditional traceroute, mtr shows ongoing statistics for each hop rather than just one-time probe results, making it valuable for identifying intermittent network issues and congestion points. Results are displayed in an interactive terminal interface that updates continuously.
Common options
| Flag | What it does |
|---|---|
-c, --report-cycles NUM | Run NUM report cycles then exit (non-interactive mode); useful for scripts and automation |
-r, --report | Print statistics in report mode and exit; shows summary data for each hop |
-a, --address ADDRESS | Bind outgoing packets to a specific local IP address |
-4 | Force IPv4 only; use with IPv4 addresses exclusively |
-6 | Force IPv6 only; use with IPv6 addresses exclusively |
-u, --udp | Use UDP instead of ICMP ECHO; some networks block ICMP |
-T, --tcp | Use TCP SYN packets instead of ICMP; useful when ICMP is filtered |
-p, --port PORT | Specify destination port for TCP/UDP probes (default 80 for TCP) |
-m, --max-hops NUM | Set maximum TTL (hops) to probe; default is 30 |
-i, --interval SECONDS | Set interval between probes in seconds (default 1.0) |
-s, --packetsize BYTES | Set ICMP packet size in bytes (minimum 64) |
-w, --report-wide | Print report using wider columns for longer hostnames |
Examples
Start interactive real-time trace to google.com; shows hops with latency and packet loss
mtr google.comProbe example.com for 5 cycles then exit; useful for quick diagnostics in scripts
mtr -c 5 example.comGenerate a report showing 10 cycles to Google's DNS; displays summary statistics per hop
mtr -r -c 10 8.8.8.8Trace to ns.example.com using UDP packets on port 53; bypasses ICMP blocking
mtr -u -p 53 ns.example.comUse TCP SYN packets on port 443 to trace api.example.com; works when ICMP is blocked
mtr -T -p 443 api.example.comLimit trace to maximum 15 hops when probing local gateway
mtr -m 15 192.168.1.1Force IPv6 and trace to Google's public IPv6 DNS address
mtr -6 2001:4860:4860::8888Generate wide report over 20 cycles and save to file for analysis of a slow server
mtr -w -r -c 20 slow-server.local > mtr_report.txt