Skip to main content

Short note: ICMP

Short answer

ICMP is IP's error-reporting and diagnostic companion, carried inside IP datagrams. It reports unreachable destinations, time exceeded, and redirects, and supports ping via echo request/reply and traceroute via time exceeded messages.

Write a short note on ICMP.

ICMP (Internet Control Message Protocol, RFC 792) is a network-layer companion of IP. IP is unreliable and has no error reporting, so ICMP reports errors and gives diagnostic information. ICMP messages are carried inside IP datagrams (protocol number 1).

Message format

Type (8 bits) | Code (8 bits) | Checksum (16 bits) | message-specific data (for errors: IP header + first 8 bytes of the offending datagram).

Types of messages

CategoryMessageType
Error reportingDestination unreachable3
Time exceeded (TTL = 0)11
Parameter problem12
Redirect5
Source quench (obsolete)4
QueryEcho request / reply8 / 0
Timestamp request / reply13 / 14
Router solicitation / advertisement10 / 9

Uses

  • ping uses echo request/reply to test reachability and round-trip time.
  • traceroute sends packets with increasing TTL; each router returns "time exceeded", revealing the path.
  • Path MTU discovery uses "destination unreachable, fragmentation needed".

ICMP never reports errors about ICMP error messages, to avoid endless loops.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Networks and Security chapter 4 questions →