Protocol used to communicate Network Layer information between Hosts and Routers.
Often considered part of The Network Layer but architecturally it lies just above as it is contained inside Datagrams, just as TCP/UDP Segments.
Structure
ICMP messages contain:
- Type field
- Code field
- Header and first 8 bytes of the IP Datagram that caused the ICMP message to be generated.
The type and code field combined determine the meaning of the message:
| Type | Code | Description |
|---|---|---|
| 0 | 0 | echo reply (to ping) |
| 3 | 0 | destination network unreachable |
| 3 | 1 | destination host unreachable |
| 3 | 2 | destination protocol unreachable |
| 3 | 3 | destination port unreachable |
| 3 | 6 | destination network unknown |
| 3 | 7 | destination host unknown |
| 4 | 0 | source quench (congestion control) |
| 8 | 0 | echo request |
| 9 | 0 | router advertisement |
| 10 | 0 | router discovery |
| 11 | 0 | TTL expired |
| 12 | 0 | IP header bad |
Implementations
pingtraceroute