ICMP stands for the Internet Control Message Protocol.
It is a primary protocol in the Internet Protocol Suite. It is used by network devices to relay an error message and management queries. It helps to reroute the message to its right course. The ICMP is the best-known protocol for the PING command in Windows and Unix OS. The ICMP protocol is also considered an essential part of IP. However, it is built upon IP (it relies on IP to transmit its data from one end to another end). Thus ICMP, ICMP must be implemented in all IP modules. The general role of the ICMP is to generate error packets about the network.
The ICMP messages are categorized into two:
- Error reporting messages
- Query messages
The two are further categorized into the types of messages. The ICMP messages are relayed in IP datagrams; The IP header always has number 1 (protocol number) showing of ICMP and the type of service 0 for routine.
ICMP has numeric message codes.
0: Echo reply
3: Destination not reached or unreachable
4: Source quench
5: Redirect – use a different router
8: Echo request
9: Router advert reply
10: Router solicitation
11: Exceeded time
The ICMP header comes after the IPv4\IPv6 packet header it is then termed as IP protocol number 1. The complex protocol contains three fields:
Type – Identifies an ICMP message, if an error or query message
Minor code – it provides more information about the kind where it goes to further into the types of messages within either the query or report messages.
Checksum – helps detect the errors introduced during transmission.
- ICMP may report errors in any IP datagrams in exception of ICMP messages to avoid repetitions.
- ICMP messages are sent only to errors on fragment zero when it comes to IP datagrams that are fragmented, in that, ICMP messages do not refer to IP datagrams having a non-zero field of offset.
The ICMP Structure
Whenever any router ricochets back an ICMP packet to report any errors, it recreates every field in the original IP headers of the packages they are reporting on.
This is a standard packet with lots of data passed through it and has an ICMP section in it. An ICMP tunnel has to be programmed for this to take place. Internet Control Message Protocol can be blocked due to attacks which could be prevented through:
- Website applications
- Detection Systems that detect any intrusion
- Blockage of all the ICMP activities from the main network point.
ICMP, therefore, gives back a little feedback on communications when things go wrong. It is used in exchanging information from one host to another host on the state of the internet and not transferring of data. The conditions provoking the ICMP packet are mostly due to the results found in the IP header of the failed packets. Its messages are carried by IP packets, so it exists at a higher level than operating structures of switches. The ICMP is none existent in any data-carrying packages. The ICMP is used mostly by administrators of networks to enhance internet connections in diagnostic utility.
Related – ICMP vs IGMP