IP-ICMP

Reference standard: RFC 792 - Internet Control Message Protocol

ICMP messages typically report errors in the processing of datagrams: for example, when a datagram cannot reach its destination, when the gateway does not have the buffering capacity to forward a datagram, and when the gateway can direct the host to send traffic on a shorter route.

ICMP uses the basic support of IP as if it were a higher level protocol, however, ICMP is actually an integral part of IP. ICMP messages are sent using the basic IP header:

Datagram structure: fields

Bit 0 is the most significant bit.

bits 0 _ _ _ _ _ _ 7 Datagram field
octets 1-n Header
octet n+1 Type of message
octet n+2 Code
octets n+3, n+4 Checksum of the message
octets (n+5)-p Data

Header

bits 0 _ _ _ _ _ _ 7 Header
octet 1, bits 0-3 Version = 4.
octet 1, bits 4-7 IHL
Internet Header Length in 32 bits words which points to the Type of message.
octet 2 Type of service = 0.
octets 3-4 Total length
Length of the datagram, measured in octets, including header and all following data.
octets 5-6 Identification.
octet 7, bits 0-2 Flags
octet 7, bits 3-7
octet 8
Fragment
offset.
octet 9 Time to live in seconds.
As this field is decremented at each machine in which the datagram is processed, the value in this field should be at least as great as the number of gateways which this datagram will traverse.
octet 10 Protocol = 1.
octets 11-12 Header Checksum
A checksum on the header only. The checksum field is the 16 bits one's complement of the one's complement sum of all 16 bits words in the header.
octets 13-14-15-16 Source address : the address of the gateway or host that composes the ICMP message.
octets 17-18-19-20 Destination address : the address of the gateway or host to which the message should be sent.
k octets 21-22-(n-1) Options.
octet n Padding
The internet header padding is used to ensure that the header ends on a 32 bit boundary. The padding is zero.

Type of message

bits 0 _ _ _ _ _ _ 7 Dec Type of message
0 0 0 0 0 0 0 0 0 Echo Reply
0 0 0 0 0 0 1 1 3 Destination Unreachable
0 0 0 0 0 1 0 0 4 Source Quench
0 0 0 0 0 1 0 1 5 Redirect
0 0 0 0 1 0 0 0 8 Echo
0 0 0 0 1 0 1 1 11 Time Exceeded
0 0 0 0 1 1 0 0 12 Parameter Problem
0 0 0 0 1 1 0 1 13 Timestamp
0 0 0 0 1 1 1 0 14 Timestamp Reply
0 0 0 0 1 1 1 1 15 Information Request
0 0 0 1 0 0 0 0 16 Information Reply

 


home     Quick start     Specifications     Connections     Features     How to?     Notes     Search     Site Map

updated:  27-Feb-04