How to perform a MTR network test

    Updated on October 30, 2024

    Reading Time: 3 min

    Facebook
    Twitter
    LinkedIn

    Creating a MTR (My Traceroute) report can be essential for diagnosing network issues, as it combines the functionality of both ping and traceroute. This guide explains how to install and use MTR on macOS, Linux, and Windows (using WinMTR) to perform network diagnostics.

    What Is MTR?

    MTR sends packets to a specific host and measures the time taken by each hop, displaying information about packet loss and latency. This can reveal where network problems might be occurring along the path to the target.

    1. Using MTR on macOS

    macOS does not include MTR by default, so you’ll need to install it using Homebrew.

    Installing MTR on macOS

    1. Install Homebrew (if you haven’t yet):bashCopy code/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    2. Install MTR:bashCopy codebrew install mtr

    Running MTR on macOS

    1. Open Terminal.
    2. Run the MTR command:bashCopy codesudo mtr -report google.com Replace google.com with the domain or IP you want to test.
    3. For a live report, omit the -report flag:bashCopy codesudo mtr google.com
    4. Save Output (optional): To save the output, use the > operator:bashCopy codesudo mtr -report google.com > mtr_report.txt

    2. Using MTR on Linux

    On most Linux distributions, you can easily install MTR through the package manager.

    Installing MTR on Linux

    1. For Debian/Ubuntu-based systems:bashCopy codesudo apt-get install mtr
    2. For Red Hat/CentOS/Fedora:bashCopy codesudo yum install mtr
    3. For Arch Linux:bashCopy codesudo pacman -S mtr

    Running MTR on Linux

    1. Open Terminal.
    2. Run MTR with the sudo command:bashCopy codesudo mtr -report google.com
    3. Save Output (optional):bashCopy codesudo mtr -report google.com > mtr_report.txt

    3. Using WinMTR on Windows

    Since Windows doesn’t support MTR natively, you can use WinMTR, a graphical version designed for Windows.

    Downloading and Installing WinMTR

    1. Go to the WinMTR GitHub page or official WinMTR site.
    2. Download the latest ZIP file for your version (32-bit or 64-bit).
    3. Extract the contents of the ZIP file to a folder.
    4. Run WinMTR.exe from the extracted files.

    Running WinMTR

    1. Open WinMTR.
    2. In the Host field, enter the IP address or domain name you want to test.
    3. Click Start to begin the test.
    4. Let WinMTR run for a while to gather data (usually 100–300 packets for a good analysis).
    5. Save the Results:
      • Click Export TEXT to save the results as a text file.
      • Click Export HTML if you prefer an HTML report.

    Common MTR Options

    For more specific results, you can customize your MTR tests with additional options. Here are some commonly used flags:

    • -c (Count): Number of pings to send to each hop.bashCopy codemtr -c 100 google.com
    • -i (Interval): Sets the interval between pings (in seconds).bashCopy codemtr -i 1 google.com
    • -n: Display numeric IP addresses instead of resolving hostnames.

    Reading MTR Results

    After running an MTR report, here’s how to interpret the output:

    1. Host: Displays each hop along the network route.
    2. Loss %: Percentage of packet loss at each hop.
    3. Snt: Number of packets sent.
    4. Last, Avg, Best, Wrst: Times (in ms) representing the most recent, average, best, and worst round-trip times.

    By using MTR on macOS, Linux, or Windows, you can identify network problems along a route, pinpointing potential trouble spots in your connection for faster troubleshooting.