ICMP header

ICMP header

 ICMP (Internet Control Message Protocol) is a network layer protocol for notifying communication errors and diagnosing communication status.

ICMP is in the same network layer as IP, but above it. "1" is set to the protocol number of the IP header.

ICMP
IP

 The IP protocol is an unreliable protocol. Even if a transmitted IP packet is discarded or lost, the IP protocol itself has no function to report any communication errors that have occurred.

 Therefore, ICMP was created to compensate for the shortcomings of IP. ICMP can notify communication errors and network status. ICMP messages include messages such as destination unreachable, reroute requests, time exceeded, and timestamp requests/responses.

◆ ICMP header structure

The structure of the ICMP header looks like this:

●Type (8 bits)

Represents the type of ICMP message.

-Code (8 bits)

Used with the Type message.

● ICMP Header Checksum (16 bits)

A checksum for the entire ICMP message, including the ICMP header.

Type list of ICMP header

The ICMP message types are shown in the table below. There are still many other types.

*For more detailed information, please check the link below.

http://www.iana.org/assignments/icmp-parameters

There are two types of ICMP.

  • Error messages that notify errors
  • Query messages that respond to investigation commands such as ping and tracert

*In addition, ICMP error messages are not sent in response to ICMP messages so that error notifications do not fall into an infinite loop.

typefunctiontype
0Echo ReplyQueries
3Destination UnreachableError
FourTransfer suppression indication (Source Quench)Error
FiveRedirect instruction (Redirect)Error
8Echo Request (Echo)Queries
9Router AdvertisementQueries
TenRouter SolicitationQueries
11Time ExceededError
12Packet Parameter ProblemError
13Timestamp retention request (Timestamp)Queries
14Reply to timestamp retention request (Timestamp Reply)Queries
17Address Mask RequestQueries
18Address Mask ReplyQueries

Type 3 code list

The code list for Type 3 is shown in the table below. Other codes still exist.

codeinformationmeaning
0Network Unreachablenetwork unreachable
1Host UnreachableSpecific host unreachable
2Protocol Unreachableprotocol unreachable
3Port Unreachableport unreachable
FourFragmentation Needed and DF setneed fragmentation
FiveSource Route FailedUnable to route as per source route
6Destination Network UnknownI don't know the destination network
7Destination Host UnknownI don't know the destination host
8Source Host IsolatedSender cannot communicate
9Network Administratively ProhibitedDestination network rejects
TenDestination Host Administratively ProhibitedDestination host rejects
11Network Unreachable For TOSNetwork unreachable with requested TOS
12Host Unreachable For TOSHost unreachable at requested TOS
13Communication Administratively Prohibitedcommunication is refused