Traceroute is a simple tool to show the network route from your computer to a remote destination. It does this by utilizing the IP protocol's time to live (TTL) field in order to elicit an ICMP TIME_EXCEEDED response from each gateway along the path.

If you just want to know how long it takes to get between your computer and a remote destination, it is much better to use the ping tool, since that will send more packets and will be much better at showing fluctuations in the round-trip time taken (see outputs below). That is why I will be using a computer in Austin, TX, U.S.A., which is using a VPN in Amsterdam, Netherlands, as this helps highlight the difference.

Time To Live (TTL)

The TTL field can be confusing because, with respect to ping and traceroute, it does not actually represent "time" but the number of hops the packet can traverse before dying. Having a TTL ensures that packets don't somehow keep traversing the net in an infinite loop. TTL with regards to a DNS server configuration, does mean the a "true" time period that a result should be cached for before the domain needs to be requeried.

Installation On Ubuntu 14.04

Traceroute 1.9.2

sudo apt-get install inetutils-traceroute -y

Traceroute 2.0.19

sudo apt-get install traceroute -y
For the purposes of this tutorial, I am using traceroute 2.0.19. You can check your version with:
traceroute --version

Running Traceroute

Find the path between you and a remote address, simply enter the IP address, or the domain name, of the server you wish to find the path to after the traceroute command. E.g.


Example Traceroute Output

traceroute to (, 30 hops max, 60 byte packets
 1 (  328.239 ms  328.166 ms  328.159 ms
 2 (  328.165 ms  328.168 ms  328.216 ms
 3 (  328.279 ms (  328.098 ms  328.085 ms
 4 (  328.139 ms  328.173 ms (  328.053 ms
 5 (  487.713 ms (  328.096 ms  487.737 ms
 6 (  666.192 ms  187.284 ms (  213.305 ms
 7 (  178.400 ms (  378.281 ms (  213.019 ms
 8 (  378.162 ms  213.208 ms  378.012 ms
 9 (  212.993 ms (  213.113 ms (  212.844 ms
10 (  212.970 ms (  212.861 ms  212.852 ms
11 (  377.852 ms (  377.845 ms (  377.747 ms
12 (  592.627 ms  557.859 ms (  557.865 ms
If 30 hops (the default maximum) is not enough to get to your destination, you can increase it with the
flag. E.g
traceroute -m 60
The three numbers after the IP address of the gateway are the roundtrip times the three packets took. If you're wanting to check latencies, it is better to use ping instead.

Example Ping Output

PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=50 time=166 ms
64 bytes from icmp_seq=2 ttl=50 time=169 ms
64 bytes from icmp_seq=3 ttl=50 time=409 ms
64 bytes from icmp_seq=4 ttl=50 time=625 ms
64 bytes from icmp_seq=5 ttl=50 time=530 ms
64 bytes from icmp_seq=6 ttl=50 time=168 ms
64 bytes from icmp_seq=7 ttl=50 time=483 ms
64 bytes from icmp_seq=8 ttl=50 time=458 ms
64 bytes from icmp_seq=9 ttl=50 time=521 ms
64 bytes from icmp_seq=10 ttl=50 time=160 ms
--- ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9011ms
rtt min/avg/max/mdev = 160.952/369.554/625.686/174.005 ms

I'm Seeing Stars!

If you see start to see the

character in your traceroutes, it means there is a problem with the route to the host.

Technically, the
characters are called asterisks


No comments:

Post a Comment