Internet Control Message Protocol (ICMP)

ICMP is used by a router or remote host to communicate why transmission has failed back to the origin of the transmission.

Untitled

Untitled

Type field

Eight bits long, which specifies what type of message is being delivered.

ex. destination unreachable or time exceeded.

Code field

Indicates a more specific reason for the message than just the type.

ex. destination unreachable, there are individual codes for things like destination network unreachable, and destination port unreachable

ICMP Checksum

Rest of header

32-bit field. Optionally used by some of the specific types and codes to send more data.

Data Payload

payload for an ICMP packet exist entirely so that the recipient of the message knows which of their transmissions caused the error being reported. It contains the entire IP header and the first eight byte of the data payload section of the offending packet.

ICMP wasn’t really invented for humans to interact with but between network computers automatically.

Ping

Ping lets you send a special type of ICMP message called an Echo Request.

An ICMP echo request essentially just as a destination. If the destination is up and running and able to communicate on the network, it’ll send back an ICMP echo reply message type. You can invoke the ping command from the command line of any modern operating system.