How to Use MTR

Written By Support Team (Administrator)

Updated at April 20th, 2022

MTR combines 2 functions, namely ping and traceroute/tracert. The advantage is that it can display network connection statistics in real time per second.


MTR Installation

For Ubuntu/Debian operating systems Run the following command:


sudo apt install mtr –y


For Centos operating system run the following command:


sudo yum install mtr –y


For Windows operating system, please download at the following link:


https://sourceforge.net/projects/winmtr/ 



Ways of working

To understand the output that the MTR produces, you may need to know how it works. If you already know how the traceroute command works, then this explanation will sound familiar.


MTR will send ICMP Request packets destined for the target IP/hostname from when you execute the MTR command. The first packet will have a time-to-live (TTL) value of 1. When the packet arrives at a router that is a gateway on its path to its final destination, the receiving router will reduce the TTL by 1, making it 0. When the TTL reaches 0, the router will drop the packet. and sends ICMP Time Exceeded packets to the original sender. This returned packet contains the sender's IP address, and MTR returns this IP (or hostname) as the first hop. Then the PC will send a separate ICMP Request packet with TTL 2, and when it receives an ICMP Time Exceeded packet as before, the MTR tool will list this device as the second hop, and so on until it reaches the destination host that returns a packet containing an ICMP Echo Reply .


Reading MTR Output

In addition to listing each network hop between the sender and the destination, MTR also tracks statistics related to the round-trip time for packets from the originating host to each hop in each routing path. This round-trip time is often referred to as latency.


To get a clearer picture of what MTR does for us, let's take a look at the following example for tracing a route to Google's public DNS.




The MTR output, by default displays the following fields:


Loss% = Percentage of packets for which ICMP replies were not received.

Snt = Number of packets sent to each hop.

Last = Round-trip time of the last traceroute search, in milliseconds

Avg = Average round-trip time of all traceroute traces, in milliseconds.

Best = Shortest round-trip time of all traceroute traces, in milliseconds.

Wrst = Longest round-trip time of all traceroute traces, in milliseconds.

StDev = Standard check result for each hop.



Was this article helpful?