Networking-Forums.com

Professional Discussions => Routing and Switching => Topic started by: antares on January 28, 2020, 12:07:35 AM

Title: ICMP header (pinging)
Post by: antares on January 28, 2020, 12:07:35 AM
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
Title: Re: ICMP header (pinging)
Post by: icecream-guy on January 28, 2020, 07:27:03 AM
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
Title: Re: ICMP header (pinging)
Post by: deanwebb on January 28, 2020, 09:01:12 AM
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.