Thu. Apr 2nd, 2020

How to diagnose network problems with MTR

1 min read

MTR is a powerful network diagnostic tool that allows system administrators to diagnose and locate network errors and provide network status reports to upstream providers. mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.

As mtr starts, it investigates the network connection between the host mtr runs on and HOSTNAME by sending packets with purposely low TTLs. It continues to send packets with low TTL, noting the response time of the intervening routers. This allows mtr to print the response percentage and response times of the internet route to HOSTNAME. A sudden increase in packet loss or response time is often an indication of a bad (or simply overloaded) link.

The results are usually reported as round-trip-response times in milliseconds and the percentage of packetloss.

Install mtr

Ubuntu/Debian

apt install mtr

CentOS

yum install mtr

Arch Linux

pacman -S mtr

MacOS

brew install mtr

Use

Once MTR is installed on Linux or MacOS you can use the following syntax to generate the MTR report:

mtr -rw [destination_host]

For example, to test the quality of the route and network connection to the host meterpreter.org, execute the following command on the source host: