H
10Corp Premium Hosting

The mtr Command — Advanced Network Diagnostics

Last Updated: 2025-01-01 3 min read

Overview

mtr (My Traceroute) combines the functionality of ping and traceroute into a single, powerful diagnostic tool. It continuously sends packets and displays real-time statistics for every hop along the network path, including packet loss percentage and latency — making it far more informative than either tool alone.

Basic Syntax

mtr [options] hostname_or_IP

Basic Usage

Interactive mode

mtr example.com

This opens a live, continuously updating display:

                          My traceroute  [v0.95]
Host:  myserver              Loss%  Snt   Last   Avg  Best  Wrst StDev
 1. gateway (192.168.1.1)     0.0%   50    0.5   0.6   0.3   1.2   0.2
 2. isp-router.net            0.0%   50    5.1   5.3   4.8   6.2   0.4
 3. core.isp.net              0.0%   50   12.3  12.1  11.5  13.4   0.5
 4. peer-exchange.net         2.0%   50   15.7  16.2  14.9  22.1   1.8
 5. cdn-router.net            0.0%   50   18.4  18.1  17.2  19.8   0.6
 6. example.com               0.0%   50   20.2  20.5  19.1  22.3   0.7

Press q to quit.

Understanding the Output

ColumnDescription
HostRouter or device at each hop
Loss%Percentage of packets lost at this hop
SntNumber of packets sent
LastLatency of the most recent packet (ms)
AvgAverage latency (ms)
BestLowest latency recorded (ms)
WrstHighest latency recorded (ms)
StDevStandard deviation — indicates consistency (lower = more stable)

How to Interpret the Results

Packet loss at a single hop but not at later hops:

 3. router-a.net    5.0%   ...
 4. router-b.net    0.0%   ...
 5. destination.com 0.0%   ...

This is usually not a real problem — the intermediate router is simply deprioritizing ICMP responses. Check the destination hop for the true picture.

Packet loss that continues to the destination:

 3. router-a.net    0.0%   ...
 4. router-b.net   15.0%   ...
 5. router-c.net   15.0%   ...
 6. destination.com 15.0%  ...

The issue starts at hop 4 — this is where packets are being dropped.

Latency spike that continues:

 3. router-a.net    avg: 12ms
 4. router-b.net    avg: 85ms   ← Jump here
 5. destination.com avg: 86ms

Hop 4 is the bottleneck.

Report Mode

Generate a text-based report (non-interactive) — perfect for sharing with support teams:

mtr --report example.com

Or specify the number of packets:

mtr --report -c 100 example.com

Sample report output:

HOST: myserver                Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- gateway               0.0%   100    0.5   0.6   0.3   1.2   0.2
  2.|-- isp-router.net        0.0%   100    5.2   5.4   4.7   6.5   0.4
  3.|-- example.com           0.0%   100   20.1  20.3  19.0  22.1   0.7

Useful Flags

FlagDescription
--reportGenerate a report and exit
-c NNumber of pings per hop (default: 10)
-nDon’t resolve hostnames (faster)
-wWide report mode (shows both hostnames and IPs)
-4Force IPv4
-6Force IPv6
-i SECONDSInterval between pings (default: 1)
-s SIZEPacket size in bytes
--tcpUse TCP instead of ICMP
--port PORTSpecify port for TCP mode

mtr vs. traceroute

Featuremtrtraceroute
Real-time updatesYes — continuous monitoringNo — single snapshot
Packet loss per hopYes — with percentagesNo
Average latency per hopYesLimited (only 3 probes)
Best forIn-depth, ongoing diagnosticsQuick path check
Report modeYes (--report)No

Practical Examples

Diagnose connectivity issues with your website

mtr --report -c 50 yourdomain.com

Test using TCP (bypasses ICMP-blocking firewalls)

mtr --tcp --port 443 yourdomain.com

Wide report with IPs and hostnames

mtr --report-wide -c 100 yourdomain.com

Skip DNS lookups for faster results

mtr -n --report example.com

Installation

mtr may not be pre-installed. To install:

# Debian/Ubuntu
sudo apt install mtr

# CentOS/RHEL
sudo yum install mtr

Tips

  • When reporting network issues to your hosting provider, include the full output of mtr --report -c 100 yourdomain.com — it provides everything support teams need.
  • Run mtr from both directions if possible (local → server and server → your machine) to catch asymmetric routing problems.
  • Focus on the destination hop for the true picture — intermediate hops with minor loss are usually cosmetic.
  • Use --tcp --port 443 when ICMP-based results seem incomplete due to firewall filtering.
Tags: ssh linux mtr networking diagnostics

Still need help?

Our support team is available 24/7 to assist you.