ICMP codes and types

The ICMP header contains two fields that are used to identify the type of control message being sent. These fields are the Type and Code fields, each having a size of eight bits.

Some notable Type and Code values are listed below:

  • Type 0 Code 0 - Echo Reply
  • Type 3 Code 0 - Destination network unreachable
  • Type 3 Code 1 - Destination host unreachable
  • Type 3 Code 4 - Fragmentation required, and DF flag set
  • Type 8 Code 0 - Echo Request (used to ping)
  • Type 11 Code 0 - TTL expired in transit

For a complete list of Type and Code values, take a look at the related IANA link below.

To examine the ICMP types and codes within ping responses on a Cisco IOS device, take a look at Ping - debug commands.

Links:

https://forum.networklessons.com/t/infrastructure-access-list/1270/10?u=lagapides

https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml

https://datatracker.ietf.org/doc/html/rfc792