ICMP header (pinging)

Started by antares, January 28, 2020, 12:07:35 AM

Previous topic - Next topic

antares

Dear forum memebers,

I am absolutely new here... would you kindly help me with the following question:

My question is about ICMP -  Internet Control Message Protocol. As it is known there are many ICMP types: type 0 is "echo reply" - our common ping, type 14 is timestamp reply.
So when an ICMP  packet is sent over the network - depending on the ICMP type which is mentioned in there (in ICMP header)  - the corresponding action happens from host computer either ping is requested or lets say timestamp reply.

So my question is how does a host computer (ICMP signal recipient computer) knows what to do when receives the ICMP header. Where the instruction is written that when the host PC receives ICMP message /  header for pinging (with type 0 in protocol field) to send a reply... or to send a timestamp reply (if type 14 is specified in ICMP header protocol section).


Thanks and Regards

icecream-guy

there is a TYPE Field in the header and also a CODE field,

meybe this will help
https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol
:professorcat:

My Moral Fibers have been cut.

deanwebb

This brings up why it's a good idea to not just permit all ICMP traffic, but only types needed for particular functions. PING uses 8 for the request, 0 for the reply, 3 and 11 for error messages.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.