Add guide entry for ICMP in network-engineering (#24905)
This commit is contained in:
committed by
Aditya
parent
eb9b154db0
commit
e97de4b4cb
@ -3,13 +3,35 @@ title: ICMP Header
|
||||
---
|
||||
## ICMP Header Format
|
||||
|
||||
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/network-engineering/icmp-header/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
|
||||
Below is the Internet Control Message Protocol (ICMP) header format for IPv4 according to [RFC792](https://tools.ietf.org/html/rfc792):
|
||||
|
||||
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
|
||||

|
||||
|
||||
ICMP for IPv4 is encapsulated within an IPv4 packet and contains a data section that includes a copy of the entire IPv4 header along with at least the first 64 bits (8 bytes) of the original datagram's data. The additional 8 bytes of data is used by the receiving host to match the message to an internal process. IP-in-IP tunneling (encapsulating an IP packet within another IP header), adds additional bytes in the form of the added IPv4 header(s) and may require additional bytes are included in the data portion of the ICMP packet to allow the host to identify the associated process [[RFC1812](https://tools.ietf.org/html/rfc1812#section-4.3.2.3)].
|
||||
|
||||
ICMP packets for IPv4 may not exceed 576 bytes in length, including headers.
|
||||
|
||||
##### Type [8-bits]
|
||||
* Type field refers to the type of ICMP message
|
||||
* Some useful ICMP types include:
|
||||
* `8` - Echo Request
|
||||
* `0` - Echo Reply
|
||||
* `3` - Destination Unreachable
|
||||
* `5` - Redirect Message
|
||||
|
||||
##### Code [8-bits]
|
||||
* Code field provides additional details for the ICMP message
|
||||
* Example Codes for Type 3 Destination Unreachable Requests:
|
||||
* `0` - Net Unreachable
|
||||
* `1` - Host Unreachable
|
||||
* `2` - Protocol Unreachable
|
||||
* `3` - Port Unreachable
|
||||
|
||||
##### Checksum [16-bits]
|
||||
* Calculated from the ICMP header and data as an error detection mechanism to determine if data was changed in transit.
|
||||
* The checksum is the 16-bit [one's complement](https://www.cs.uaf.edu/2004/fall/cs301/notes/node41.html) of the one's complement sum of the ICMP message starting with the Type field. [[RFC792](https://tools.ietf.org/html/rfc792)]
|
||||
|
||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
||||
|
||||
#### More Information:
|
||||
<!-- Please add any articles you think might be helpful to read before writing the article -->
|
||||
|
||||
|
||||
* [IANA assignments of ICMP Types/Codes/Extensions](https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml)
|
||||
|
Reference in New Issue
Block a user