• 20 December 2024

As a network administrator, you must be familiar with various tools to manage and troubleshoot the service. In the network world, there are different tools for troubleshooting, among which ping and traceroute are more famous. However, there is another tool that may not be as famous as these two tools, but it provides much more important information. This powerful tool is called MTR.

MTR as a diagnostic tool helps the network administrator detect faults and obtain a report of the overall network status. A popular technique for evaluating network connectivity and speed is MTR. My Traceroute (MTR) is a tool that combines ping with traceroute. So, in order to fully comprehend MTR, it is necessary to first examine Ping and Traceroute in more detail.

What Is Traceroute?

If you have a problem opening a site on the Internet or connecting to a system, you can find out where your connection problem is by using the Traceroute command. Also, this command can show the communication route map from your computer to the web server on which the desired website is located.

Traceroute is one of the important computer network tools whose task is to control and track the path of network packets. This tool is used with IP Internet Protocol. It can be claimed that traceroute is used in almost all common operating systems. This tool is known as “tracert” in Windows, which is available through CMD and is known as traceroute in Linux.

How Does the Traceroute Command Work?

Technically, the Traceroute command sends a sequence of packets using the ICMP protocol. Each of these packets checks a value and has a specific time. When the time of any packet reaches zero, the desired router will return it, and an error message will be displayed. By sending packets this way, Traceroute ensures that every router on the path is active.

What Is Ping?

Ping stands for Packet InterNet Groper. Ping in the network means sending a signal to the host to receive a response. Ping is done with two purposes; one is to check if the host is available, i.e., it is connected to the network and can be seen on the network or not. The second measures the time it takes to receive a response, i.e., the speed of sending and receiving data.

The Ping command in the network is one of the commands of the cmd environment used for testing and troubleshooting in the network. Using this command, we can obtain information about whether a computer is connected to the network or not, how fast data is being sent and received, and how far the computer is physically located. This command uses the ICMP protocol in addition to IP.

How Does the Ping Command Work?

The ping test consists of sending a signal packet, which is usually 32 or 56 bytes. This signal contains the echo request. If the host is available, it sends another signal packet called Reply. Ping Time is measured in milliseconds and shows the time it takes for the packet to arrive at the host and for the response to return to the sender.

The output of the ping command depends on the type of operating system, but almost all ping test outputs include the following:

  • Destination IP address
  • ICMP Sequence Number
  • Time to live (TTL)
  • Round-trip time
  • Payload size
  • The number of lost packets in the process of sending and receiving

What is My Traceroute (MTR)?

Using My Traceroute (MTR), you can verify the network connectivity and speed, similar to tracing or pinging, two popular methods for verifying network connectivity. With MTR, you can visualize latency, packet loss, and the number of hops along the route to your destination. By viewing what is happening along the route in real time, you will be able to troubleshoot network issues more effectively.

MTR is a method that discovers the network path in a similar way to a traceroute and then sends packets to continue collecting information in the hop that it will provide an updated image of the network’s health and speed.

The MTR, like traceroute, can use ICMP or UDP for outgoing packets; however, for the returned packets to be processed, the MTR must use ICMP.

MTR is an interactive tool that continuously updates its output. The MTR report does not send ICMP packets continuously, but it provides extensive information. It provides this information by sending 10 packets (by default) to each hop.

MTR reports are widely used to analyze network connection bottlenecks and related issues. However, it should be noted that there is also the possibility of misinterpretation.

How to Run MTR on Windows

  • Download WinMTR.
  • Navigate to the folder where the file was saved after it has finished downloading, then unzip it.
  • A new window with the files will open after the files have been extracted. Click WinMTR64.exe twice to launch the program.
  • Attempt your MTR test. Click Start after entering a domain name or IP address in the host box to accomplish this.
  • Click Stop when you’re ready to end the test.
  • Results can be exported for you. Click Export Text to start. Although TXT files are much smaller and simpler to work with via attachments, you can export them as HTML if you want.

How to Run MTR on Linux

 Installing MTR on Linux is not too difficult. Simply download and install the program from its repository using the terminal.

Open your terminal and type the following if you are using a RHEL-based distribution like CentOS, Fedora, or RHEL:

sudo yum install mtr

Enter the following command to launch the test after it has been installed:

mtr google.com -c 1000 -r

Use the instructions below if you’re using a Debian-based distribution, such as Ubuntu:

Start your terminal and type:

sudo apt-get install mtr

Enter the following command to launch the test after it has been installed:

mtr google.com -c -1000 -r

How to Run MTR on MacOS

The MTR tool is not pre-installed on Mac OS X systems and is not sold in the Apple store. You must have the Homebrew package management system set up on your machine in order to install MTR. For your Mac, Homebrew makes libraries and tools available that are not by default installed with Mac OS X.

To install Homebrew type this command in the terminal:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

To install MTR use this command:

brew install mtr

After MTR installation, run this command:

cd /usr/local/Cellar/mtr/0.94/sbin

Make the MTR available using this command:

sudo cp mtr /usr/local/bin/

Now you can use MTR as follows:

sudo mtr example.com -r

How To Read and Analyze MTR Reports

The explanation of each of the parameters used in MTR reports is described below:

Loss%: How many percent of packages will not return and are lost.

Snt: Number of packets sent

Last: The delay of the last packet sent

Avg, Best, Wrst: average, best and worst delay in all packets

StDev: standard deviation of delays per hop. High StDev means network instability.

How to Measure Packet loss with MTR

To measure packet loss using the MTR network monitor, you can observe the numerical values under the Loss% column. However, you must watch out for limiting if measuring packet loss using MTR. A limitation is the limit service providers impose on MTR when sending ICMP traffic.

To prioritize their network traffic, service providers limit ICMP rates. As a result, reports can show packet loss that isn’t caused by a configuration error or fault but rather by an ICMP rate limitation.

It is best to compare packet loss between hops to identify if traffic is limited. If one hop has a high packet loss, but all other hops are at zero, MTR is almost certainly restricted. As a general rule, you should trust the later hops if there are a lot of different packet loss rates.

Whenever you are troubleshooting a network issue, you should make sure to measure packet loss both ways. In this way, you can determine whether there is a problem with the outward or return route.

How to Measure Latency with MTR 

MTR reports have a lot of useful information, and one of the most important things they can gain is latency information. Viewing latency is a manual process that relies on measuring several factors manually.

As a first step, you should take notice of the hop numbers at each stage, the best and worst latency at each stage, and the most recent average hop numbers. For example, if the latency increases significantly from one hop to another, this may indicate an issue with the network. In addition, the latency may be due to a problem with either the outward routing or the return routing.

In your report, you won’t be able to see the return route. Instead, you’ll have to examine the difference between the final hop and the one before it to see if there is a problem. For this reason, you’ll have to run further network troubleshooting to find out what’s wrong.

 For more guides on other topics related to networking, check out our other articles on the ArvanCloud Blog.