Writing a Traceroute utility using the ICMP control

How can I write a simple Traceroute utility using the ICMP control ?

Date Entered: 07/16/1998    Last Updated: 07/25/2007

V5 and up come with a TraceRoute component already. There is no need to perform the traceroute using the ICMP control.

You should in principle send out echo requests with an ever increasing TimeToLive property toward the target host until you reach him. The echo requests have MessageType property set to 8. The TimeToLive property should start from 0 and increase at every step. You could thus measuring the time it takes for a reply to come from every hop on the way to the target host.

The DataIn event shows the SourceAddress where the reply comes from.


We appreciate your feedback.  If you have any questions, comments, or suggestions about this entry please contact our support team at kb@nsoftware.com.