Wednesday, February 23, 2022

When can we use Tracert/Traceroute?

Tracert/Traceroute is a command line utility to show the route/path an IP Packet takes while traversing the network to reach the destination.

A network consists of various Layer-2 devices like switches and Layer-3 devices like routers. Layer-3 devices participate here to show the hops' ingress interface IP Addresses from source to the destination.

Tracert can be used to find out bottlenecks in the network as to why the connection to a server can be lagging. It can pinpoint where the problem can lie.

In the below example, we can see the PC 192.168.1.35 has two routes to reach the destination 7.7.7.7.

Below, we can see the tracert output shows it takes the path B. There are five hops to reach the destination 7.7.7.7 via path A and four hops to reach the same via path B.

The reason it takes path B is not because there are less hops. It takes path B due to routing decisions made by the router R1. Routing decisions can be due to static or dynamic routes in router R1.

Suppose we ping the website "ping.com", we can see the response time for the IP Packets are approximately 59 ms but we cannot tell where in the path the maximum latency has occurred.


Tracert shows the path it takes to reach "ping.com" IP Address 13.107.213.35.


We can tell the maximum delay occurs between 3rd hop and 4th hop.

The 5th, 6th and 8th hops do not respond with the IP Address of the ingress interface. Why is that so?
The possible reason could be the Layer-3 devices at 5th, 6th and 8th hops do not allow the communication of ICMP responses, but allow the forwarding of ICMP requests.

So, the tracert/traceroute utility can only be completely useful to check the path an IP Packet takes to reach the destination only when the Layer-3 devices allow the ICMP responses.

Note : TTL time exceeded [ICMP responses] to discussed in the next blog.

No comments:

Post a Comment

Traceroute from Linux OS [In-depth analysis using Wireshark]

Here we will see the packets associated with traceroute when run on Linux OS. Below is the output of traceroute to yahoo.com IP Address 74.6...