This is a series containing notes I made while reading RFCs.
Internet Control Message Protocol (ICMP)
- Used by a gateway or destination to communicate with a source host. To report an error, for example.
- Uses the basic support of IP as if it was a higher-level protocol. Actually a part of IP, is implemented in every IP module.
- Control messages provide feedback about problems in the communication environment.
- Not designed to make IP reliable, IP is not designed to be completely reliable. For main purpose, see previous point.
- No guarantees that a control message will be returned. Datagrams can still be undelivered without being reported by a control message.
- Reliability is implemented in higher-level protocols that use IP (e.g TCP).
- ICMP messages typically report errors in the processing of datagrams.
- No ICMP messages are sent about ICMP messages (to avoid infinite loop).
- ICMP messages only sent about errors in handing fragment zero of fragmented datagrams (the fragment with the fragment offset equal to zero).
- Sent using the basic IP header.
- First octet of the data portion of the datagram is a ICMP type field. Its value determines format of remaining data.
- Protocol number of ICMP is 1.
For values of an ICMP message’s IP header, see the “Message Formats” section of the linked RFC.
For details on ICMP message types see pages 4 to 19 of the linked RFC.