What is MTR?
MTR (My Traceroute) combinesping
and traceroute
to monitor network performance and detect issues like latency or packet loss.
Installation
-
Linux:
sudo apt install mtr
(Debian/Ubuntu) orsudo yum install mtr
(CentOS). - Windows: Use WinMTR.
Basic Usage
-
-r -c <n>
: Generate a report aftern
tests (e.g.,mtr -r -c 10 example.com
). -
-n
: Skip DNS resolution, show IPs only. -
--tcp
or-u
: Use TCP/UDP instead of ICMP. -
--max-ttl <n>
: Limit hops ton
.
How to interpret the results
- Host: The intermediate devices (hops).
- Loss%: Packet loss percentage. High loss indicates issues.
- Last/Avg/Worst: Latency stats (in ms). High values = potential congestion.
- Consistent high loss: Likely a network issue, contact us.
- High latency only at the destination: Check the server, not the network.
- High loss on one hop: Often router configuration, not a real problem.
Example Commands
Test with 10 pings
Testing an ip-address
Specific port test
Continuous monitoring