When traceroute command is issued, the host sends n special packets to n-1 nodes on the way. Each packet is actually numbered and the recipient of that packet responds with a packet itself. The round trip delay is then calculated as the total amount of elapsed time.
As we know when sending UDP ICMP messages a TTL value (time to live) is attached to the packet. That's the mechanism that help identify the destination. How could we know how many nodes we have until we reach our destination? The answer is that, first packet is sent out with TTL equals to 1, meaning that the first node on our route will receive the packet, drop the TTL by 1, then send back a rejection message with its hostname. That's how we get the nodes' names. When the destination host is reached our packet will most likely be rejected (since it is sent on an uncommon port, i.e 33000) and the destination will send back a destination unreachable message, thus informing us that the destination has been reached.
Hiç yorum yok:
Yorum Gönder