Thursday, November 11, 2010
How Traceroute works.....
I know it's easy and everybody knows it...:) but still i just want to remember the icmp code numbers..:)
The "traceroute" program uses ICMP messaging and the time to live (TTL) field in the IP header. It works by sending a packet to the intended host with a TTL value of 1.
which the next hop will drop and send back an ICMP error message to the sending host.
TYPE 11 ( time-to-live exceeded
CODE 0 ( Time to live exceeded in transmit)
Then the traceroute program will send a message with a TTL of 2, then 3, etc. This way it will get information about each router using the information received in the ICMP packets. To get information about the receiving host, the message is sent to a port that is not likely to be serviced by that host. A ICMP "port unreachable" error message is generated and sent back.
See the attached picture and we can get an idea on this flow.
Subscribe to:
Posts (Atom)