Internet Control Message ProtocolΒΆ
The ICMP messages are used by network devices to exchange information about errors and operational issues.
The messages have type and code fields in the header of the ICMP packet. The rest of the ICMP packet is short since most of the information is carried in the control message type and code fields.
Detailed set of control messages can be found in the RFC 792. Here is a list of the common ones relevant to this content:
Type |
Code |
Description |
---|---|---|
0 |
0 |
echo reply (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 - not used) |
8 |
0 |
echo request (ping) |
9 |
0 |
route advertisement |
10 |
0 |
router discovery |
11 |
0 |
time exceeded (TTL expired) |
12 |
0 |
bad IP header |
ICMP packets are IP packets encapsulated inside Ethernet packets as observed in the lab sessions of this content: