how to use mtr 2

12
How to Use MTR (Traceroute and Ping Combined) Posted by purehate in Insights at 5:57 PM One of the not so well know networking tools available on Linux is MTR. MTR combines the functionality of the traceroute and ping programs in a single net-work diagnostic tool. As mtr starts, it investigates the network connection between the host mtr runs on and a user-specified destination host. After it determines the address of each network hop between the machines, it sends a sequence ICMP ECHO requests to each one to determine the quality of the link to each machine. As it does this, it prints running statistics about each machine. A sudden increase in packet-loss or response time is often an indication of a bad (or simply overloaded) link. mtr is fairly easy to use once you have a look at the different options possible: This shows us the usage flags and options. So in order to know more about the different flags we will take a look at them now: OPTIONS -h help Print the summary of command line argument options. -v –version Print the installed version of mtr. -r –report This option puts mtr into report mode. When in this mode, mtr will run for

Upload: eduardo-narvaez

Post on 08-May-2015

2.440 views

Category:

Technology


6 download

TRANSCRIPT

Page 1: How to use mtr 2

How to Use MTR (Traceroute and Ping Combined)

Posted by purehate in Insights at 5:57 PM

One of the not so well know networking tools available on Linux is MTR.  MTR combines the functionality of the traceroute and ping programs in a single net-work diagnostic tool.  As mtr starts, it investigates the network connection between the host mtr runs on and a user-specified destination host. After it determines the address of each network hop between the machines, it sends a sequence ICMP ECHO requests to each one to determine the quality of the link to each machine. As it does this, it prints running statistics about each machine.   A sudden increase in packet-loss or response time is often an indication of a bad (or simply overloaded) link.  mtr is fairly easy to use once you have a look at the different options possible:

This shows us the usage flags and options.So in order to know more about the different flags we will take a look at them now:OPTIONS-h helpPrint the summary of command line argument options.

-v –versionPrint the installed version of mtr.

-r –reportThis option puts mtr into report mode. When in this mode, mtr will run forthe number of cycles specified by the -c option, and then print statistics andexit.This mode is useful for generating statistics about network quality. Notethat each running instance of mtr generates a significant amount of networktraffic. Using mtr to measure the quality of your network may result indecreased network performance.

-c COUNT –report-cycles COUNTUse this option to set the number of pings sent to determine both the machineson the network and the reliability of those machines. Each cycle lasts onesecond.

-s BYTES –psize BYTES

Page 2: How to use mtr 2

PACKETSIZEThese options or a trailing PACKETSIZE on the commandline sets the packet sizeused for probing. It is in bytes inclusive IP and ICMP headers

If set to a negative number, every iteration will use a different, randompacketsize upto that number.

-t –cursesUse this option to force mtr to use the curses based terminal interface (if available).

-n –no-dnsUse this option to force mtr to display numeric IP numbers and not try toresolve the host names.

-g –gtkUse this option to force mtr to use the GTK+ based X11 window interface (ifavailable). GTK+ must have been available on the system when mtr was builtfor this to work. See the GTK+ web page atwww DOT gimp DOTorg/gtk/for more information about GTK+.

-p –splitUse this option to set mtr to spit out a format that is suitable for a split-user interface.

-l –rawUse this option to tell mtr to use the raw output format. This format is bettersuited for archival of the measurement results. It could be parsed to bepresented into any of the other display methods.

-a IP.ADD.RE.SS

–address IP.ADD.RE.SSUse this option to bind outgoing packets’ socket to specific interface, sothat any packet will be sent through this interface. NOTE that this optiondoesn’t apply to DNS requests (which could be and could not be what you want).

-i SECONDS

–interval SECONDSUse this option to specify the positive number of seconds between ICMP ECHOrequests. The default value for this parameter is one second.

-4Use IPv4 only.

Page 3: How to use mtr 2

-6Use IPv6 only.

Ok now we see that we have lots of options to play with here.

Ok back to the terminal we are going to look at a target computer with the -r (report mode) and -c (count) set to 1

We only care about the first two columns. The first is the name of the nodes along the route,and the second is the percent of packets that were lost. If we lose packets then the traceroute must find a new way to get to the destination. Sometimes nodes along our route will drop these packets. You can see that our query was didnt have any isues until hop #13 where it clearly failed and had to find a new route.  Remember just like any traceroute the first node returned is the closest to your box and the last is farthest away. The next step we would take is do do individual whois on the hops which failed in order to determine the reasons for the packet loss.

If your distribution  of choice does not have the MTR program installed or it is not available with the package manager it can be downloaded from here

Page 4: How to use mtr 2

MTR (software) From Wikipedia, the free encyclopedia

Jump to: navigation, search

MTR

Developer(s) BitWizard

Initial release 1997; 15 years ago

Stable release0.82 / December 2, 2011; 4 months ago

Written in C

Operating system Unix-like

Type Network

License GNU General Public License Version 2

Website www.bitwizard.nl/mtr/

WinMTR

Developer(s) Appnor

Stable release0.92 / January 31, 2011; 14 months ago

Written in C

Operating system Windows

Type Network

License GNU General Public License Version 2

Website www.winmtr.net

MTR (My traceroute, originally called Matt's traceroute) is computer software which combines the functionality of the traceroute and ping programs in a single network diagnostic tool.[1]

Page 5: How to use mtr 2

MTR probes routers on the route path by limiting the number of hops individual packets may traverse, and listening to responses of their expiry. It will regularly repeat this process, usually once per second, and keep track of the response times of the hops along the path.

Contents

[hide]

1 History 2 Fundamentals 3 Examples 4 WinMTR 5 See also 6 References 7 External links

[edit] History

The original MTR (known as Matt's traceroute) program was written by Matt Kimball in 1997. Roger Wolff took over maintenance of MTR (renamed to My traceroute) in October 1998.[2]

[edit] Fundamentals

MTR is licensed under the terms of the GNU General Public License (GPL) and it works under modern Unix-like operating systems. It normally works under the text console, but it also has an optional GTK+-based graphical interface.

MTR relies on ICMP Time Exceeded (type 11, code 0) packets coming back from routers, or ICMP Echo Reply packets when the packets have hit their destination host. MTR also has a UDP mode (invoked with "-u" on the command line or pressing the "u" key in the curses interface) that sends UDP packets, each with an increasing destination port, toward the destination host. When the UDP mode is used, MTR relies on ICMP port unreachable packets (type 3, code 3) when the destination is reached.

MTR also supports IPv6 and works in a similar manner but instead relies on ICMPv6 messages.

The tool is often used for network troubleshooting. By showing a list of routers traversed, and the average round-trip time as well as packet loss to each router, it allows the user to identify links between two particular routers responsible for certain fractions of the overall latency or packet loss through the network. This can help identify network over utilization problems.[3]

Page 6: How to use mtr 2

[edit] Examples

This example shows MTR running on Linux tracing a route from the host machine (example.lan) to a web server at Yahoo! (p25.www.re2.yahoo.com) across the Level3 network.

My traceroute [v0.71] example.lan Sun Mar 25 00:07:50 2007

Packets PingsHostname %Loss Rcv Snt Last Best Avg Worst 1. example.lan 0% 11 11 1 1 1 2 2. ae-31-51.ebr1.Chicago1.Level3.n 19% 9 11 3 1 7 14 3. ae-1.ebr2.Chicago1.Level3.net 0% 11 11 7 1 7 14 4. ae-2.ebr2.Washington1.Level3.ne 19% 9 11 19 18 23 31 5. ae-1.ebr1.Washington1.Level3.ne 28% 8 11 22 18 24 30 6. ge-3-0-0-53.gar1.Washington1.Le 0% 11 11 18 18 20 36 7. 63.210.29.230 0% 10 10 19 19 19 19 8. t-3-1.bas1.re2.yahoo.com 0% 10 10 19 18 32 106 9. p25.www.re2.yahoo.com 0% 10 10 19 18 19 19

An additional example below shows a recent version of MTR running on FreeBSD. MPLS labels are displayed by default when the "-e" switch is used on the command line (or the "u" key is pressed in the curses interface):

My traceroute [v0.82]dax.prolixium.com (0.0.0.0) Sun Jan 1 12:58:02 2012Keys: Help Display mode Restart statistics Order of fields quit Packets Pings Host Loss% Snt Last Avg Best Wrst StDev 1. voxel.prolixium.net 0.0% 13 0.4 1.7 0.4 10.4 3.2 2. 0.ae2.tsr1.lga5.us.voxel.net 0.0% 12 10.8 2.9 0.2 10.8 4.3 3. 0.ae59.tsr1.lga3.us.voxel.net 0.0% 12 0.4 1.7 0.4 16.0 4.5 4. rtr.loss.net.internet2.edu 0.0% 12 4.8 7.4 0.3 41.8 15.4 5. 64.57.21.210 0.0% 12 5.4 15.7 5.3 126.7 35.0

Page 7: How to use mtr 2

6. nox1sumgw1-vl-530-nox-mit.nox.org 0.0% 12 109.5 60.6 23.0 219.5 66.0 [MPLS: Lbl 172832 Exp 0 S 1 TTL 1] 7. nox1sumgw1-peer--207-210-142-234.nox.org 0.0% 12 25.0 23.2 23.0 25.0 0.6 8. B24-RTR-2-BACKBONE-2.MIT.EDU 0.0% 12 23.2 23.4 23.2 24.9 0.5 9. MITNET.TRANTOR.CSAIL.MIT.EDU 0.0% 12 23.4 23.4 23.3 23.5 0.110. trantor.helicon.csail.mit.edu 0.0% 12 23.7 25.0 23.5 26.5 1.311. zermatt.csail.mit.edu 0.0% 12 23.1 23.1 23.1 23.3 0.1

[edit] WinMTR

WinMTR is an equivalent of mtr for Windows developed by Appnor. Functionally it is very similar, although it does not actually share any code in common with mtr due to the major diffences between the *nix and Windows network stacks.[citation needed]

[edit] See also

Free software portal

traceroute ping PathPing - a network utility supplied in Windows NT and beyond that combines the

functionality of ping with that of traceroute (or tracert)

[edit] References

1. ̂ Upstream Provider Woes? Point the Ping of Blame. (enterpriseitplanet.com)2. ̂ Cisco router configuration and troubleshooting By Mark Tripod (Google Books)3. ̂ Linode Library: Diagnosing Network Issues with MTR

[edit] External links

MTR man page MTR , BitWizard's MTR page with Unix downloads WinMTR , the equivalent of MTR for Windows platforms whatismyip.cc Online Traceroute with GeoIP, uses MTR as backend

MTR es un acrónimo de Multi-Track Recorder y pertenece a la categoría Hardware.

Page 8: How to use mtr 2

How to use the MTR tool to analyse network problems

This guide outlines how to use the MTR tool to analyse network issues that can cause problems like radio buffering. This tool is useful for identifying where a problem may be. The output of MTR should be submitted to us so we can get a better idea of whats causing buffering problems.

What is MTR ?

MTR also known as Matt's traceroute or more recently My traceroute is computer software which combines the functionality of the traceroute and ping programs in a single network diagnostic tool.

MTR probes routers on the route path by limiting the number of hops individual packets may traverse, and listening to responses of their expiry. It will regularly repeat this process, usually once per second, and keep track of the response times of the hops along the path. Read more about MTR here : http://en.wikipedia.org/wiki/MTR_(Software)

Download MTR.

Windows : WinMTR - 0.8

Linux (Debain / Ubuntu): MTR or ('sudo aptitude install mtr')

How and when to use MTR.

The MTR tool should be used when you are getting buffering issues on your radio. You can use the MTR tool to test your connectivity to your radio server. This is done by using the hostname of your server with us. This is usually cp.internet-radio.com or cp2.internet-radio.com or shoutcast.internet-radio.com etc... You should run the MTR tool for at least 20 minutes, preferably longer. Once it has been running for a good amount of time (the longer the better) we need you to email the output to us at [email protected] including your username.

Example of MTR output.

Code: My traceroute [v0.71]source-host.mydomain.com Sun Mar 25 00:07:50 2007Keys: Help Display mode Restart statistics Order of fields quit Packets Pings

Page 9: How to use mtr 2

Hostname %Loss Rcv Snt Last Best Avg Worst 1. hop1.mydomain.com 0% 11 11 1 1 1 2 2. ae-31-51.ebr1.Chicago1.Level3.n 19% 9 11 3 1 7 14 3. ae-1.ebr2.Chicago1.Level3.net 0% 11 11 7 1 7 14 4. ae-2.ebr2.Washington1.Level3.ne 19% 9 11 19 18 23 31 5. ae-1.ebr1.Washington1.Level3.ne 28% 8 11 22 18 24 30 6. ge-3-0-0-53.gar1.Washington1.Le 0% 11 11 18 18 20 36 7. 63.210.29.230 0% 10 10 19 19 19 19 8. t-3-1.bas1.re2.yahoo.com 0% 10 10 19 18 32 106 9. p25.www.re2.yahoo.com 0% 10 10 19 18 19 19