Traceroute

December 2016

Introduction to Traceroute

Traceroute is a network diagnostic tool found on most operating systems, which is used for determining which path a packet has taken. The traceroute command can be used to draw up a map of the routers found between a source machine and a target machine. The traceroute command is different on each operating system.

  • In UNIX/Linux, systems, the traceroute command is:
    traceroute name.of.the.machine
  • In Windows systems, the traceroute command is:
    tracert name.of.the.machine

Output of a traceroute

A traceroute's output describes the names and IP addresses of the chain of routers, each preceded by a sequential number and minimum, average, and maximum response time.

Tracing a route to www.commentcamarche.net [163.5.255.85]
over a maximum of 30 hops:
1 33 ms 32 ms 33 ms raspail-2-81-57-234-254.fbx.proxad.net [81.57.234.254]
2 33 ms 33 ms 33 ms vlq-6k-2-a5.routers.proxad.net [213.228.4.254]
3 33 ms 33 ms 33 ms vlq-6k-2-v802.intf.routers.proxad.net [212.27.50.46]
4 33 ms 33 ms 33 ms th1-6k-2-v806.intf.routers.proxad.net [212.27.50.41]
5 32 ms 34 ms 34 ms cbv-6k-2-v802.intf.routers.proxad.net [212.27.50.34]
6 34 ms 32 ms 33 ms ldc-6k-1-a0.routers.proxad.net [213.228.15.67]
7 35 ms 35 ms 35 ms cogent.FreeIX.net [213.228.3.187]
8 36 ms 36 ms 35 ms NeufTelecom.demarc.cogentco.com [130.117.16.22]
9 36 ms 36 ms 36 ms V3994.c1cbv.gaoland.net [212.94.162.209]
10 34 ms 34 ms 35 ms V4080.core3.cbv.gaoland.net [212.94.161.129]
11 36 ms 35 ms 37 ms 212.94.164.210
12 36 ms 36 ms 36 ms nestor.commentcamarche.net [163.5.255.85]

Route traced.

How a traceroute works

Traceroute works thanks to the TTL field in IP packets. Each IP packet has a time to live field (TTL) which is reduced each time it goes through a router When this field reaches zero, the router determines that the packet has been going around in circles, terminates this packet and sends an ICMP notification to the sender.

For this reason, traceroute sends packets to an unprivileged UDP port which is believed to be unused (port 33434 by default) with a TTL set to 1. The first router encountered will delete the packet and send an ICMP packet which includes the IP address of the router as well as the loop delay. Traceroute then increases the TTL field by 1 at a time, so as to obtain a reply from each router on the pathway, until it gets the reply "ICMP port unreachable" from the target machine.


Related :


Traceroute
Traceroute
Traceroute
Traceroute
Traceroute
Traceroute
Traceroute
Traceroute
This document entitled « Traceroute » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.