RFC 792 - Internet Control Message Protocol
Date: September 1981
Status: Internet Standard (STD 5)
Author: J. Postel (ISI)
Updates: RFC 777, RFC 760, IEN 109, IEN 128
Updated by: RFC 950, RFC 4884, RFC 6633, RFC 6918
Abstract
This document defines the Internet Control Message Protocol (ICMP), which is an integral part of the Internet Protocol (IP). ICMP is used by IP nodes to report errors in datagram processing and to exchange control information. It provides essential network diagnostic functionality including error reporting, connectivity testing, and network management features.
Table of Contents
- Introduction
- Message Formats
- Destination Unreachable Message
- Time Exceeded Message
- Parameter Problem Message
- Source Quench Message
- Redirect Message
- Echo or Echo Reply Message
- Timestamp or Timestamp Reply Message
- Information Request or Information Reply Message
- Summary of Message Types
- References
Quick Reference: ICMP Message Types
| Type | Name | Description |
|---|---|---|
| 0 | Echo Reply | Response to echo request (ping) |
| 3 | Destination Unreachable | Destination cannot be reached |
| 4 | Source Quench | Congestion control message (deprecated) |
| 5 | Redirect | Route redirection instruction |
| 8 | Echo Request | Ping request |
| 11 | Time Exceeded | TTL expired or fragment timeout |
| 12 | Parameter Problem | Invalid IP header field |
| 13 | Timestamp Request | Request timestamp |
| 14 | Timestamp Reply | Reply with timestamp |
| 15 | Information Request | Request network information (obsolete) |
| 16 | Information Reply | Reply with network information (obsolete) |
ICMP Message Format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message Body |
| (varies by type) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Key Fields
- Type: Identifies the ICMP message type (8 bits)
- Code: Provides additional context for the message type (8 bits)
- Checksum: Error detection for the ICMP message (16 bits)
- Message Body: Varies depending on the message type
Common Use Cases
Network Diagnostics
Ping (Echo Request/Reply)
$ ping 8.8.8.8
ICMP Echo Request → 8.8.8.8
← ICMP Echo Reply (Type 0)
Traceroute
$ traceroute google.com
Uses ICMP Time Exceeded (Type 11) messages
to discover network path
Error Reporting
Destination Unreachable
- Network unreachable
- Host unreachable
- Protocol unreachable
- Port unreachable
- Fragmentation needed but DF set
Time Exceeded
- TTL expired in transit
- Fragment reassembly time exceeded
Related Resources
- Official Text: RFC 792 (TXT)
- Official Page: RFC 792 DataTracker
- Standard: STD 5
- Related Protocols:
- RFC 791 (IPv4)
- RFC 1122 (Host Requirements)
- RFC 4443 (ICMPv6)
- RFC 4884 (Extended ICMP)
Important Note: ICMP is an essential part of IP networking, providing critical diagnostic and error reporting capabilities. However, many networks filter ICMP messages for security reasons, which can impact network troubleshooting and diagnostic tools.