mtr

mtr combines the behavior of the ping and traceroute utilities: it traces a route path between localhost and a destination device or computer, showing you a list of the routers between them as well as the average round-trip times and packet loss to each router. To do this mtr utilizes ICMP Type 0 and 11 (Echo Reply/Time Exceeded) packets.

Basic usage is mtr -rw remote-host:

$ mtr -rw yahoo.com
HOST: geoffstratton.com                                                 Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 2600:3c00::8678:acff:fe0d:97c1                                     0.0%    10    0.9   1.7   0.9   4.3   1.0
  2.|-- 0.00.0000.ip4.static.sl-reverse.com                                0.0%    10    0.5   4.6   0.3  22.9   8.3
  3.|-- 8.00.0000.ip4.static.sl-reverse.com                                0.0%    10    0.7   1.4   0.7   2.9   0.8
  4.|-- 2.00.0000.ip4.static.sl-reverse.com                                0.0%    10    1.0   1.4   1.0   2.4   0.5
  5.|-- e600.0000.0000.0000.2000.2000.0d0f.7062.ip6.static.sl-reverse.com  0.0%    10    0.7   1.1   0.6   4.1   1.1
  6.|-- po2.bbr02.eq01.chi01.networklayer.com                              0.0%    10   20.4  20.7  20.3  22.2   0.6
  7.|-- exchange-cust1.ch1.equinix.net                                     0.0%    10   24.2  27.1  24.0  43.6   6.5
  8.|-- v6.ae8.pat1.bfz.yahoo.com                                          0.0%    10   42.0  42.1  41.8  42.9   0.3
  9.|-- 2001:4998:f01c:7::1                                                0.0%    10   41.9  42.0  41.7  42.3   0.2
 10.|-- 2001:4998:58:fe1f::1                                               0.0%    10   44.2  44.3  44.1  44.7   0.2
 11.|-- 2001:4998:58:fa00::13                                              0.0%    10   49.5  52.3  49.3  61.2   4.3
 12.|-- 2001:4998:58:d007::1                                               0.0%    10   45.4  45.4  45.0  46.9   0.6
 13.|-- ir1.fp.vip.bf1.yahoo.com                                           0.0%    10   50.2  49.8  47.9  63.2   4.7

-r is the “report” option, which sends 10 packets to each remote device (this can be overridden with –report-cycles=[number-of-packets] or the -c option), while -w is the “wide” option, giving you full hostnames where available. Use the –no-dns option to omit reverse DNS lookups.

The Last/Best/Wrst columns give you measurements in ms of the last/best/worst round-trip times, while Avg is the average of all of them. The final column is the standard deviation of all timings, so the higher the StDev, the greater the disparity between the individual timings during that hop.

In general, if you see high packet loss in consecutive steps, or hostnames of ??? in consecutive steps, there may be a genuine networking problem at that stage in the route. This can be useful in diagnosing persisting network slowness, but keep in mind that one or more steps — and particularly single steps — with high packet loss, no host name, or timeouts can also be the result of routers or network border firewalls intentionally discarding or rate-limiting ICMP packets. Also remember that the longer the distance the higher the latency, so a network packet traveling from San Francisco to Japan will show high latency compared to San Francisco to Vegas. It’s also not unusual to see 100% packet loss at step 1 or 2 if running mtr from a home or business network, since many consumer-grade routers default to ignoring ICMP requests.

For additional information on the ping and traceroute functionality in mtr, and diagnosing potential problems revealed by them, see Cisco and Exit109.

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *