ICMP Error and Control Messages

It was noted earlier that if a router could not forward a packet for some reasons (for example, the TTL value reaches 0, or the packet length is greater than the network MTU while the DF bit is set), it would have to send an error message back to the source to report the problem. The protocol that handles error and control messages is called the Internet Control Message Protocol (ICMP). Although ICMP messages are encapsulated by IP packets, ICMP is considered to be in the same layer as IP.

Each ICMP message format begins with a type field to identify the message. Some ICMP message types are echo reply, destination unreachable, source quench, redirect, echo request, time exceeded, parameter problem, timestamp request, and timestamp reply. The echo request and echo reply messages are used in the ping program that is often used to determine whether a remote host is alive. Ping is also often used to estimate the round-trip time between two hosts. The ICMP time exceeded message is exploited in the traceroute program. When a packet reaches a router with the value of the TTL equal to 0 or 1 before the packet reaches the destination, the corresponding router will send an ICMP message with type "time exceeded" back to the originating host. The time exceeded message also contains the IP address of the router that issues the message. Thus by sending messages to the destination with the TTL incremented by one per message, a source host will be able to trace the sequence of routers to the destination.

Was this article helpful?

0 0

Post a comment