MTR and WinMTR
MTR (My traceroute; originally Matt’s traceroute) is a free and open source Linux utility that combines the functionality of both traceroute and ping, and as such is a more sophisticated tool (go here to brush up on your knowledge of these two commands). Not only does MTR reveal each hop between your host and a destination (as traceroute does), but it also sends a sequence of ICMP ECHO requests to each hop to determine the quality of the link (like ping). Simultaneously it displays running statistics about each hop. MTR supports both IPv4 and IPv6.
The simple command syntax for MTR is mtr [options] [target]. The range of options for MTR is described below.
MTR command options
|mtr -a [IP_address] or
||Binds outgoing packets’ sockets to a specific source interface so that all packets will be sent through it.|
|mtr -c [count] or
||Sets the number of pings sent to the destination and intermediary hosts. Each cycle lasts one second.|
|mtr -e or
||Displays information from ICMP extensions for MPLS (RFC 4950) that are encoded in the response packets.|
|mtr -g or
||Launches MTR within a GTK+-based X11 window interface (pictured below).|
|mtr -h or
||Displays the MTR command line options.|
|mtr -i [seconds] or
||Specifies the number of seconds to wait between ICMP ECHO requests (default value is one second).|
|mtr -l or
||Configures MTR to use the raw format for output, which is better suited for archival or parsing.|
|mtr -n or
||Configures MTR to display IP addresses and not attempt to resolve host names.|
|mtr -o [fields] [order] or
||Specifies the fields and their order when loading MTR (for example, mtr -o LSD NBAW)|
|mtr -p or
||Configures MTR to display output in a format that is suitable for a split-user interface.|
|mtr -r or
||Enables MTR’s report mode in which MTR will run for the number of cycles specified by -c, display its query output, and then exit.|
|mtr -s [bytes] [packet_size] or
||Sets the packet size used for probing.|
|mtr -t or
||Configures MTR to use the curses-based terminal interface.|
|mtr -u||Uses UDP datagrams instead of ICMP ECHO.|
|mtr -v or
||Displays the installed version of MTR.|
|mtr -w or
||Enables MTR’s wide report mode in which host names are not shortened.|
|mtr -4||Configures MTR to use IPv4 only.|
|mtr -6||Configures MTR to use IPv6 only.|
It should be noted that the MTR man page states: “Some modern routers give a lower priority to ICMP ECHO packets than to other network traffic. Consequently, the reliability of these routers reported by MTR will be significantly lower than the actual reliability of these routers.”
Below you will see an example of MTR running in a Linux shell prompt.
Sample MTR command
mtr -r -c50 kernel.org >> kernel.org-mtr.txt
The MTR graphical user interface (GUI) is depicted below.
MTR command output appears in the MTR GUI as shown here.
The Windows version of MTR is WinMTR and is developed by Appnor. Like MTR, WinMTR is free and open source. You can copy the
WinMTR.exe file to
\%SystemRoot%\Windows\System32\ so that it’s accessible in your default command line environment. The command line options for WinMTR.exe are described below. Note that when you issue a WinMTR command in a command prompt, the WinMTR interface will launch and start a scan using the parameters you specified. In other words, while you can launch WinMTR from the command line, it will not run in that environment like MTR does in Linux.
WinMTR command options
|WinMTR.exe -h or
||Displays the help message.|
|WinMTR.exe -i [value] or
||Sets the interval between pings.|
|WinMTR.exe -m [value] or
||Sets the max hosts in the LRU list.|
|WinMTR.exe -n or
||Configures WinMTR to display IP addresses and not attempt to resolve host names.|
|WinMTR.exe -s [value] or
||Sets the size of ping packets.|
Here’s what the WinMTR interface looks like.
Within the WinMTR interface you can configure the ping size, maximum hops, and ping interval.
WinMTR query results are displayed like so.
If you found the content of this article helpful and want to expand your knowledge further, please consider buying a relevant book or two using the links below. Thanks!