Traceroute Protocol
- Traceroute offers the option of returning a path to a destination run over either the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). However, modern firewalls block this traffic, and so now ICMP is a better choice for Traceroute packets. ICMP is a companion protocol of the Internet Protocol (IP).
- IP lacks any form of error reporting, and this is provided by ICMP. Traceroute sends an ICMP message, provoking feedback by manipulating the "Time to Live" field of the IP packet. This field nominates the maximum number of hops a packet can take to its destination. Each router passing on the packet reduces this number by 1. If it reaches 0, the router discards the packet and returns an ICMP message to the originator of the packet.
- The failure reporting sent back by intermediate routers enables the Traceroute program to log them. Normally an IP packet only contains the source and destination IP addresses and no indication of any intermediate routers.