October 16, 2018

How to Install MTR on FreeBSD

FreeBSD Logo

The MTR tool can help you to find network errors such as packet loss or bad ping time. MTR combines the functionality of traceroute and ping in one single diagnostic tool. By checking how many hops individual packets may traverse, and listening to responses of their expiry, MTR is the perfect tool to detect latency. MTR is licensed under the terms of the GNU General Public License (GPL) and it works under FreeBSD as well.

Root access is required to edit the following files and to execute commands. Log in as root (su) or simply prepend sudo to all commands that require root privileges.

Installing MTR on FreeBSD

Navigate to the port directory and install MTR with the following commands:

cd /usr/ports/net/mtr
make install clean; rehash

I have choosen the default installation options without X11.

Using MTR on FreeBSD

Once MTR is installed, you can simply start the tool by typing the following command into the console. Please replace the IP address with the destination IP you want to check. The test sends 1000 packets and takes 3 to 4 minutes. It is also a good idea to check the trace in both directions, i.e. externally to the server and from the server back again.

mtr -s 1500 -r -c 1000 -i 0.1

You can run the test in background like this:

mtr -s 1500 -r -c 1000 -i 0.1 > mtr_report&

Speak Your Mind