HOW TRACEROUTE WORKS
Well guys !! Time to take a break from our regular Ethical Hacking posts and learn something new in Networking.
You guys might have used “traceroute” command many a times but have you ever wonder how this works? Lets see when we press ENTER after the above command than what happens at the BackEnd.
Traceroute sends a sequence of UDP packets ( these may be ICMP packets as well ).
Traceroute uses TTL value to determine intermediate routers that comes in between the Source and Destination.
The device decreases the TTL value to 1 and sends it to the Destination. Now what happens when first time the device (Router, PC or Switch) sends the the ICMP packet it sets the TTL value of the packet to 1 (means max. HOP COUNT for that packet will be 1) and as soon as a device recieves a UDP or ICMP packet it decreases its value by 1. so the packet will not be send to the next HOP and reply comes from the first HOP and the device writes the entry on the Command or the Shell PROMPT.
Next time it sends the the packet by increasing the HOP count or TTl value by 1 and now the packet will be forwarded to a next hop count and similarly the 2nd HOP decreases the TTL value by 1 and now the reply comes from the 2nd HOP and so on.
This procedure runs till evry time the HOP count value becomes 0 and the Destination is reached.
The source expects the ECHO REPLY in a particular time limit. When this time limit expires and the reply doesnt comes to the source, it displays a ASTERISK ( * ).
Thats how the Traceroute command works.
If you have any doubts comment below.
Comments
Post a Comment