8.3. ICMP

The Internet Control Message Protocol (ICMP) is a protocol that is integrated with IP for error reporting and transmitting control information. For example, the ICMP Ping feature uses ICMP to test Internet connectivity.

ICMP Types and Codes

ICMP messages are delivered in IP packets, and includes a Message Type that specifies the format of the ICMP message and a Code that is used to further qualify the message. For example, the message type Destination Unreachable uses the Code parameter to specify the exact reason for the error.

Either all ICMP message types can be accepted by a service (with 256 possible types) or it is possible to filter the types using the MessagesTypes property of the ICMP service.

Specifying Codes

If a type is selected then the codes for that type can be assigned to the MessageTypes property of the ServiceICMP or ServiceICMPv6 object in the same way that port numbers are specified. For example, if the Destination Unreachable type is selected with the comma delimited code list 0,1,2,3 then this will filter Network unreachable, Host unreachable, Protocol unreachable and Port unreachable.

When a message type is selected but no code values are given then all codes for that type is assumed.

ICMP Message Types

The message types that can be selected are as follows:

Echo Request
Sent by PING to a destination in order to check connectivity.
Destination Unreachable

The source is told that a problem has occurred when delivering a packet. There are codes from 0 to 5 for this type:

  • Code 0: Net Unreachable
  • Code 1: Host Unreachable
  • Code 2: Protocol Unreachable
  • Code 3: Port Unreachable
  • Code 4: Cannot Fragment
  • Code 5: Source Route Failed

Redirect

The source is told that there is a better route for a particular packet. Codes assigned are as follows:

  • Code 0: Redirect datagrams for the network
  • Code 1: Redirect datagrams for the host
  • Code 2: Redirect datagrams for the Type of Service and the network
  • Code 3: Redirect datagrams for the Type of Service and the host

Parameter Problem
Identifies an incorrect parameter on the datagram.
Echo Reply
The reply from the destination which is sent as a result of the Echo Request.
Source Quenching
The source is sending data too fast for the receiver, the buffer has filled up.
Time Exceeded
The packet has been discarded as it has taken too long to be delivered.