Ping and Traceroute are the two commands that comes in to our mind first to diagnose any network connectivity especially when we encounter timeouts. Ping is use to determine whether the remote host is accessible, calculate round-trip delay and packet loss. Traceroute is another useful utility which operates similar to ping but used to trace the path to the remote host. Both these tools are built in to all the major operating systems like Windows, Mac and Linux. MTR, an open source networking tool combines the functionality of Traceroute and Ping programs in to a single network diagnostic tool which is really useful to diagnose issues.
MTR works by identifying the address of each network hop between the hosts, by sending ICMP packets with incrementally increasing TTLs to each network hop and keeps track of the response times of the hops along the path. It also keeps track of other important information like state, connection etc. MTR is available for all operating systems. Windows users can download the windows port of MTR called WinMTR.
For generating report use the following command,
mtr —-report google.com
# r -> --report # w -> --report-wide (includes long version of host names) mtr —rw google.com
which returns the results of sending 10 packets each hop.
To send custom number of packets, use the following command,
# 100 is the number of packets. It can be anything mtr -rwc 100 google.com
To create a report without DNS names then you can use the following command,
mtr —no-dns —report google.com
PS: Linux and Mac users sometimes may get the following error after installing,
Please follow this instructions to fix it.