$linuxjunkies
>

mtr(8)

Combines traceroute and ping functionality to diagnose network paths and measure latency to a destination host.

UbuntuDebianFedoraArch

Synopsis

mtr [OPTION]... HOST

Description

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

FlagWhat it does
-c, --report-cycles NUMRun NUM report cycles then exit (non-interactive mode); useful for scripts and automation
-r, --reportPrint statistics in report mode and exit; shows summary data for each hop
-a, --address ADDRESSBind outgoing packets to a specific local IP address
-4Force IPv4 only; use with IPv4 addresses exclusively
-6Force IPv6 only; use with IPv6 addresses exclusively
-u, --udpUse UDP instead of ICMP ECHO; some networks block ICMP
-T, --tcpUse TCP SYN packets instead of ICMP; useful when ICMP is filtered
-p, --port PORTSpecify destination port for TCP/UDP probes (default 80 for TCP)
-m, --max-hops NUMSet maximum TTL (hops) to probe; default is 30
-i, --interval SECONDSSet interval between probes in seconds (default 1.0)
-s, --packetsize BYTESSet ICMP packet size in bytes (minimum 64)
-w, --report-widePrint 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.com

Probe example.com for 5 cycles then exit; useful for quick diagnostics in scripts

mtr -c 5 example.com

Generate a report showing 10 cycles to Google's DNS; displays summary statistics per hop

mtr -r -c 10 8.8.8.8

Trace to ns.example.com using UDP packets on port 53; bypasses ICMP blocking

mtr -u -p 53 ns.example.com

Use TCP SYN packets on port 443 to trace api.example.com; works when ICMP is blocked

mtr -T -p 443 api.example.com

Limit trace to maximum 15 hops when probing local gateway

mtr -m 15 192.168.1.1

Force IPv6 and trace to Google's public IPv6 DNS address

mtr -6 2001:4860:4860::8888

Generate 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

Related commands