- 2071 Shrawan · 4 marks
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
| Category | Message | Type |
|---|---|---|
| Error reporting | Destination unreachable | 3 |
| Time exceeded (TTL = 0) | 11 | |
| Parameter problem | 12 | |
| Redirect | 5 | |
| Source quench (obsolete) | 4 | |
| Query | Echo request / reply | 8 / 0 |
| Timestamp request / reply | 13 / 14 | |
| Router solicitation / advertisement | 10 / 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)