An ICMP echo request is identified by exact type and code bytes.

highlighted = computed this step

The first byte names the message

ICMP echo starts with a type byte and a code byte. For the request, the type byte says echo request and the code is zero.

request type=8,code=0\text{request type}=8,\quad \text{code}=0
Request type and codeThe request and reply fields are decoded from exact ICMP bytes.Echo request64 bits / 8 bytes0x0800e5ca12340001byte 0byte 1byte 2byte 300001000000000001110010111001010byte 4byte 5byte 6byte 700010010001101000000000000000001type8code0checksum0xe5caidentifier0x1234sequence1Echo reply64 bits / 8 bytes0x0000edca12340001byte 0byte 1byte 2byte 300000000000000001110110111001010byte 4byte 5byte 6byte 700010010001101000000000000000001type0code0checksum0xedcaidentifier0x1234sequence1

Request type

The request type is 8. The next byte is code 0.

type=8,code=0\text{type}=8,\quad \text{code}=0
Request type and codeThe request and reply fields are decoded from exact ICMP bytes.Echo request64 bits / 8 bytes0x0800e5ca12340001byte 0byte 1byte 2byte 300001000000000001110010111001010byte 4byte 5byte 6byte 700010010001101000000000000000001type8code0checksum0xe5caidentifier0x1234sequence1Echo reply64 bits / 8 bytes0x0000edca12340001byte 0byte 1byte 2byte 300000000000000001110110111001010byte 4byte 5byte 6byte 700010010001101000000000000000001type0code0checksum0xedcaidentifier0x1234sequence1

The checksum rides beside it

The same request carries checksum 0xe5ca. The next chapter recomputes that field from the message bytes.

request checksum=0xe5ca\text{request checksum}=0xe5ca
Request type and codeThe request and reply fields are decoded from exact ICMP bytes.Echo request64 bits / 8 bytes0x0800e5ca12340001byte 0byte 1byte 2byte 300001000000000001110010111001010byte 4byte 5byte 6byte 700010010001101000000000000000001type8code0checksum0xe5caidentifier0x1234sequence1Echo reply64 bits / 8 bytes0x0000edca12340001byte 0byte 1byte 2byte 300000000000000001110110111001010byte 4byte 5byte 6byte 700010010001101000000000000000001type0code0checksum0xedcaidentifier0x1234sequence1

Summary

The request is not inferred from the word ping. Type, code, checksum, identifier, and sequence are all byte fields.

request type=8\text{request type}=8
Request type and codeThe request and reply fields are decoded from exact ICMP bytes.Echo request64 bits / 8 bytes0x0800e5ca12340001byte 0byte 1byte 2byte 300001000000000001110010111001010byte 4byte 5byte 6byte 700010010001101000000000000000001type8code0checksum0xe5caidentifier0x1234sequence1Echo reply64 bits / 8 bytes0x0000edca12340001byte 0byte 1byte 2byte 300000000000000001110110111001010byte 4byte 5byte 6byte 700010010001101000000000000000001type0code0checksum0xedcaidentifier0x1234sequence1