How to run a traceroute?

Before running a traceroute command, you should understand a network mechanism called “time to live” (TTL). TTL limits how long data can “live” in an IP network. Every packet of data is assigned a TTL value. Every time a data packet reaches a hop, the TTL value is decreased by one.

Another key element to understand is “round-trip time” (RTT). Traceroute ensures each hop on the way to a destination device drops a packet and sends back an ICMP error message. This means traceroute can measure the duration of time between when the data is sent and when the ICMP message is received back for each hop—giving you the RTT value for each hop.

To better illustrate this, let’s say you run a traceroute and specify a maximum of 30 hops. Traceroute will send packets with a TTL of one to the destination server. The first network device the data passes through will decrease the TTL to the value of zero, and a message informing you the packets were dropped is sent. This gives you the RTT for hop number one.

From there, the data packets are sent to the destination server with a TTL of two. As the packets pass through the first hop, the TTL decreases to one. When they pass through the second hop, it decreases to zero. The message is sent again. This gives you the RTT for hop number two.

This process will repeat until the data packets either reach the destination device or it reaches the maximum number of hops. By the end of this test, you will know the number of hops to the destination device, the RTT length for each hop, and the device name and IP address for each hop.