MTR
MTR, which stands for My traceroute, is a network diagnostic tool that combines the functionality of both the traceroute and ping utilities. It provides a continuous report on the network path between your computer and a specified destination, showing details for each hop along the route. Here's how MTR works and what it does:
- Continuous Monitoring: Unlike traditional
traceroute, which sends a series of packets and stops, MTR continues to send packets to the target destination and provides real-time updates on network latency and packet loss.
- Hop-by-Hop Details: MTR displays a list of intermediate routers (hops) along the path to the destination, along with the round-trip time (RTT) for each hop. This helps identify where network issues or delays are occurring.
- Packet Loss Detection: MTR detects and displays packet loss at each hop, which can help pinpoint where network congestion or problems are occurring.
- Interactive Mode: MTR can be run in an interactive mode where you can cycle through different display modes to view summary statistics, detailed per-hop information, and other diagnostic data.
- Historical Data: MTR can also generate historical reports showing the network performance over time, which can be useful for identifying intermittent network issues.
Overall, MTR is a powerful tool for network troubleshooting, providing detailed insights into network performance and helping to identify and resolve connectivity issues.
How MTR works with example
mtr 18.244.179.110 Start: 2024-05-04T17:15:10+0000
HOST: a173-223-20-153.deploy.akam Loss% Snt Last Avg Best Wrst StDev
1.|-- 173.223.20.129 0.0% 10 0.2 1.2 0.1 10.1 3.1
2.|-- 192.168.241.144 0.0% 10 392.5 65.4 0.8 392.5 119.5
3.|-- 192.168.235.2 0.0% 10 0.1 0.2 0.1 0.2 0.0
4.|-- 192.168.200.168 0.0% 10 17.1 11.8 0.2 36.8 12.6
5.|-- 23.210.57.18 0.0% 10 21.3 5.1 0.4 21.3 6.9
6.|-- 23.210.57.40 0.0% 10 0.5 4.3 0.5 10.3 3.9
7.|-- 95.100.192.230 0.0% 10 15.4 15.5 15.4 16.8 0.4
8.|-- 95.100.192.167 0.0% 10 18.3 10.3 9.3 18.3 2.8
9.|-- 95.100.192.227 0.0% 10 27.6 23.5 21.8 28.3 2.4
10.|-- 23.210.48.35 0.0% 10 21.8 22.4 21.7 27.7 1.9
11.|-- 23.210.48.131 0.0% 10 22.4 22.8 21.7 26.6 1.4
12.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
13.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
14.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
15.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
16.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
17.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
18.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
19.|-- 15.230.173.38 0.0% 10 22.1 22.8 22.1 27.9 1.8
20.|-- 18.244.179.110 0.0% 10 21.8 21.9 21.8 22.8 0.3
mtr (My Traceroute) is a command-line network diagnostic tool that combines the functionality of the traceroute and ping utilities. It continuously probes the network path between the host running mtr and a specified destination IP address, providing real-time statistics about packet loss, latency, and route. Here's a breakdown of the fields in the example output:
mtr, short for My traceroute, is a network diagnostic tool that combines the functionality of the traceroute and ping utilities. It is used to trace the path that packets take from the host running mtr to a specified destination IP address or hostname. Unlike traditional traceroute, which only provides information about the route to the destination, mtr continuously sends packets and provides real-time statistics about packet loss, latency (round-trip time), and route changes.
Here's how `mtr` works:
- Initialization: When you start
mtr and specify a destination, it begins by sending ICMP Echo Request packets to the destination.
- Packet Routing:
mtr sends packets to the destination, and each router along the path responds with an ICMP Time Exceeded message, indicating that the packet has reached its TTL (Time to Live) limit.
- Statistics Gathering:
mtr collects statistics about each hop along the route, including the percentage of packets lost, the average, best, and worst round-trip times (RTT), and the standard deviation of RTT.
- Continuous Monitoring: Unlike
traceroute, which sends a single set of packets, mtr continues to send packets and updates the statistics in real-time. This allows you to see how the network performance changes over time.
- Output:
mtr displays its output in a text-based format, showing the route to the destination and the statistics for each hop. It also includes a continuously updating display of the current round-trip time to each hop.
mtr is useful for diagnosing network connectivity issues, identifying packet loss or latency problems, and monitoring the performance of network paths over time. It provides more detailed and actionable information compared to traditional traceroute or ping utilities, making it a valuable tool for network administrators and troubleshooting purposes.
HOST: The host name or IP address being traced. Loss%: Percentage of packets lost during the trace. Snt: Number of packets sent. Last: Last round-trip time (RTT) in milliseconds for the most recent packet. Avg: Average RTT in milliseconds. Best: Best RTT in milliseconds. Wrst: Worst RTT in milliseconds. StDev: Standard deviation of RTT.
In the example provided, mtr is tracing the route to IP address 18.244.179.110 Each line represents a hop along the route, showing the RTT statistics for packets sent to that hop. The Loss% column indicates packet loss at each hop, and the RTT columns (Last, Avg, Best, Wrst, StDev) provide latency information.
The output also shows that there are some hops (12 to 18) where the packets are lost (100.0% loss), which could indicate a network issue or a firewall blocking the mtr packets.