Please Whitelist This Site?
I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)
If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.
If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.
Thanks for your understanding!
Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide
NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.
ICMP Common Message Format and Data Encapsulation
(Page 1 of 2)
As we have seen in the preceding
topics, ICMP is not so much a protocol that performs a specific function
as a framework
for the exchange of error reports and information.
Since each of the message types is used for a different purpose, they
differ in the types of information each contains. This means each ICMP
message has a slightly different format. At the same time, however,
ICMP message types also have a degree of commonalitya portion
of each message is common between message types.
ICMP Common Message Format
The structure of an ICMP message
can be generally thought of as having a common part and a unique
part. The common part consists of three fields that have the same
size and same meaning in all ICMP messages (though the values in the
fields aren't the same for each ICMP message type, of course). The unique
part contains fields that are specific to each type of message.
Interestingly, the common message
format is basically the same for ICMPv4 and ICMPv6. It is described
in Table 87
and Figure 138.
Table 87: ICMP Common Message Format
the ICMP message type. For ICMPv6, values from 0 to 127 are error messages
and values 128 to 255 are informational messages. Common values for
this field are given in the
table in the topic on ICMP message classes and types.
Identifies the subtype of message within each ICMP message
Type value. Thus, up to 256 subtypes can be defined for
each message type. Values for this field are shown in the
individual ICMP message type topics.
checksum field that is calculated in a manner similar to the IP
header checksum in IPv4. It provides error
detection coverage for the entire ICMP message. Note that in ICMPv6,
a pseudo-header of IPv6 header fields is prepended for checksum calculation;
this is similar to the
way this is done in TCP.
Body / Data
Body: Contains the specific fields used to implement each message
type. This is the unique part of the message as I mentioned above.
The message body typically
contains one or several fields that carry information of relevance to
each specific type of ICMP message. For error messages, we see here
one more area of commonality in ICMP messages: all ICMP error messages
include a portion of the original IP datagram that led to the ICMP error
message. This aids in diagnosing the problem that caused the ICMP message
to be generated, by allowing the error to be communicated to higher