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

How Traceroute Works

Part 3: How Data Packets Finally Reach Destination Host

In part 2 of this traceroute tutorial, Computer A sent the second set of packets to the Internet and reached the router E .The router E discarded the packet and sent an ICMP notification packet back to Computer A with the message that the TTL expired from the router. Now, let’s see how the data packets finally reach the destination Computer B.

The Traceroute process continue. Let’s see how Computer A send the third set of data packets.

3. Computer A Send Third Set of Packets

Let’s see what happen to the third set of packets (original TTL=3):

  • 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 2.
  • Since the TTL of the second set of packets are 2. 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 1.
  • Since the TTL of the second set of packets are 1. Router E will not discard the packets. Router E will check it’s router table and send the packets to the next router (router-H).
  • Router H receive the packets and reduce the TTL by one. The TTL of the second set of packets will become 0.
  • The router H 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 third hop is and HOW LONG it takes to get there.

The scenario is shown in the diagram below:

how traceroute works

The Traceroute process continue…

4. Computer A Send Fourth Set of Packets

Let’s see what happen to the fourth set of packets (original TTL=4):

  • 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 3.
  • Since the TTL of the second set of packets are 3. 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 2.
  • Since the TTL of the second set of packets are 2. Router E will not discard the packets. Router E will check it’s router table and send the packets to the next router (router-H).
  • Router H receive the packets and reduce the TTL by one. The TTL of the second set of packets will become 1.
  • Since the TTL of the fourth set of packets are 1. Router H will not discard the packets. Router H will check it’s router table and send the packets to the next router (computer-B). Please note that the router in the network of computer-B will actually receive the packets.
  • The router in the network of computer A 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 fourth hop is and HOW LONG it takes to get there.
  • Computer A received the response from Computer B and will stop sending packets.

The final scenario is shown in the diagram below:

traceroute tutorial

As you can see that the traceroute program record down the whole story.

Internet knowledge base