Skip to main content

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


Quick Reference: ICMP Message Types

TypeNameDescription
0Echo ReplyResponse to echo request (ping)
3Destination UnreachableDestination cannot be reached
4Source QuenchCongestion control message (deprecated)
5RedirectRoute redirection instruction
8Echo RequestPing request
11Time ExceededTTL expired or fragment timeout
12Parameter ProblemInvalid IP header field
13Timestamp RequestRequest timestamp
14Timestamp ReplyReply with timestamp
15Information RequestRequest network information (obsolete)
16Information ReplyReply 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

  • 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.