The mtr (My TraceRoute) command is a powerful network diagnostic tool that combines the functionality of ping and traceroute into a single, interactive utility. Unlike traditional network tools that provide static output, mtr continuously updates its display in real-time, giving you live insights into network performance and connectivity issues.
This makes mtr particularly valuable for system administrators, network engineers, and anyone troubleshooting network problems. It provides a comprehensive view of the entire route between your system and a destination, showing packet loss, latency, and other metrics for each hop along the path.
MTR works by sending a series of ICMP echo requests (similar to ping) to each router along the path to a destination. It then measures:
Round-trip time (RTT) for each hop
Packet loss at each point in the network
Standard deviation of response times, indicating jitter or inconsistency
The tool continuously updates these statistics, allowing you to observe network behavior over time and identify patterns that might not be apparent from a single trace or ping.
Last: The RTT of the last packet sent (in milliseconds)
Avg: Average RTT (in milliseconds)
Best: Best (lowest) RTT observed (in milliseconds)
Wrst: Worst (highest) RTT observed (in milliseconds)
StDev: Standard deviation of RTTs (in milliseconds)
A row of question marks (???) indicates that a hop did not respond to ICMP requests, which is common as some routers are configured to ignore or rate-limit ICMP traffic.
The mtr command is a powerful and versatile network diagnostic tool that combines the best features of ping and traceroute. Its real-time updates and comprehensive statistics make it invaluable for troubleshooting network issues, monitoring performance, and understanding the path your traffic takes across networks.
By mastering MTR and learning to interpret its output correctly, you can quickly identify where network problems are occurring, gather evidence for ISP support tickets, and gain deeper insights into network behavior. Whether you're a system administrator, network engineer, or just trying to figure out why your internet connection is slow, MTR is an essential tool in your diagnostic arsenal.
Test Your Knowledge
Take a quiz to reinforce what you've learned
Exam Preparation
Access short and long answer questions for written exams