Friday, April 6, 2012

How to Use the Traceroute Command

     Traceroute is a command which can show you the path a packet of information takes from your computer to one you specify. It will list all the routers it passes through until it reaches its destination, or fails to and is discarded. In addition to this, it will tell you how long each 'hop' from router to router takes.
    In Windows, select Start > Run > Type cmd or Start > Programs > Accessories > Command Prompt.  This will give you a window like the one below.

    Enter the word tracert, followed by a space, then the domain name.

    The following is a successful traceroute from a my machine in Thailand to liverpoolfc.tv:


     Firstly it tells you that it's tracing the route to liverpoolfc.tv, tells you the IP address of that domain, and what the maximum number of hops will be before it times out.
Next it gives information about each router it passes through on the way to its destination.
1 is the internet gateway on the network this traceroute was done from (an ADSL modem in this case)

2 - 5 are the ISP the origin computer is connected to (totbb.net)
6 - 8 are also in the xtra network
9 - 10 are all routers on the sg.bb.gin.ntt.net network (the domain that is the internet gateway Sigapore side)
11 - 13 are all uk.bb.gin.ntt.net in the UK (a telecom supplier in the UK)
14 - 15 are on the UK network 
and finally, line 16 is the computer liverpoolfc.tv is hosted on (liverpoolfc.tv)

      This is extremely useful when trying to find out why a website is unreachable, as you will be able to see where the connection fails. If you have a website hosted somewhere, it would be a good idea to do a traceroute to it when it is working, so that when it fails, you can do another traceroute to it (which will probably time out if the website is unreachable) and compare them. Be aware though, that it will probably take a different route each time, but the networks it passes through will generally be very similar. 
If the example above had continued to time out after line 9, you could suspect that sg.bb.gin.ntt.net was the problem, and not liverpoolfc.tv.

     If it timed out after line 1, you would know there was a problem connecting to your ISP (in this case you would not be able to access anything on the internet).
    It is generally recommended that if you have a website that is unreachable, you should use both the traceroute and ping commands before you contact your ISP to complain. More often that not, there will be nothing to your ISP or hosting company can do about it.

0 comments:

Post a Comment