Internet Knowledge Base | Affordable Web Hosting Plans | Cheap Domain Name Registration

How Traceroute Works

Part 2: How Data Packets Passing Through Routers

Let’s continue with the scenario yesterday that Computer A do a traceroute to computer B. Computer A now sent the first set of packets to the Internet.

1. Computer A Send First Set of Packets

Here’s what happen:

  • The first router (router-A) will receive the packets one by one.
  • The TTL of each packets will be reduced by 1. Therefore the TTL of the first set of packets will become zero.
  • The router then discards the packet and sends an ICMP notification packet to Computer A with the message that the TTL expired from the router.
  • The traceroute program in Computer A then know what is the first hop is and HOW LONG it takes to get there.

The situation can be shown in the diagram below:

How Traceroute Works

2. Computer A Send Second Set of Packets

Now Computer A will send the second set of packets to the Internet. This time the TTL of the second set of packets will be set to 2.

This is as shown as the diagram below:

How Traceroute works

Let’s see what happen to the second set of packets:

  • The first router (router-A) will receive the second set of packets as before.
  • The TTL of each packets will be reduced by 1. Therefore the TTL of the first set of packets will become 1.
  • Since the TTL of the second set of packets are one. Router A will not discard the packets. Router A will check it’s router table and send the packets to the next router (router-E).
  • Router E receive the packets and reduce the TTL by one. The TTL of the second set of packets will become zero.
  • The router E then discards the packet and sends an ICMP notification packet to Computer A with the message that the TTL expired from the router.
  • The traceroute program in Computer A again then know what is the second hop is and HOW LONG it takes to get there.

This is as shown as the diagram below:

Traceroute data packet

In the next part of Traceroute tutorial series, we will discuss how the data packets finally reach the destination Computer B.

Internet knowledge base