Internet Control Message Protocol (ICMP)) a protocol network that is responsible for reporting errors through the means of generating and sending messages to the source IP address when there are network problems that are encountered by the system. The messages that the ICMP generates indicates that a certain gateway, router, service, or even host that should connect to the internet cannot be reached. Basically, the recipient cannot receive packets during transmission. Any IP network device can send, generate, receive, and process ICMP error messages.
In other words, you can imagine ICMP as a team that produces mechanical parts for vehicles. The best way to assemble a vehicle would be to first manufacture each individual part before sending out each of these parts to the assembly line which would then assemble these into a more complex product. However, as we all know, there will be times in which the production team will be unable to send some of the parts in a scheduled time frame. If ever there are going to be missing parts, then the assembly line will have to notify the production team, hence, the ICMP functions in the same way. Essentially, the ICMP plays the role as the messenger that relays data and information from the recipient to the sender.
This protocol is actually fairly complex. It has numerous other functions than just reporting errors in packet transmissions and hosts that cannot be reached. It also relays echo, as well as echo reply, messages. This is used through a well-known PING command that allows most users to relay an echo to a receiving host. This sends an echo reply whenever an echo is received.
As such, ICMP messages provide a way for the network and the system to notify the source IP address, which is the relaying end, if the remote host, which is the receiving end, is not receiving any packets that have been transmitted.
A router is used in order to transmit the popular "Destination Unreachable" message back to the source host. This would then send it to the device or program that first transmitted the data packets. These error messages would then let the program know that there was an issue with the connectivity of the network. Once the source program has received the information that some of that data packets did not make it to the recipient, it would then re-transmit this information to the recipient.
As a major function, ICMP is not necessarily regularly used by individuals in end-user applications but is used by numerous network administrators in order to troubleshoot any errors present in internet connections through a utility diagnosis like:
The main protocol that the ICMP uses is used by intermediary devices, routers, and even hosts in order to communicate should an error arise and make updates to the necessary routers, intermediary devices and hosts. In this case, the most universally used IPv4 (Internet Protocol version 4) and the much newer IPv6 use similar versions of the ICMP protocol, which are called ICMPv4 and ICMP6, respectively.
In terms of how the ICMP relates to different packet headers, the ICMP header appears after the IPv4 or IPv6 packet header while being recognized by a protocol number. This complex protocol contains three different major components:
The most popular and well-known message from an ICMP datagram is the "Destination Unreachable" message.[1:1] There are several reasons why this message is generated, which includes problems like not being able to reach a network, a host, port, or even a faulty protocol.
Most users have to be aware and also have to take into account that even though the "Destination Unreachable" message is the most common message received, it is not the only message that the ICMP can broadcast. There are other error messages which include:[2:1]
Other messages include Parameter Problem, Address Mask Request and Reply, Timestamp.
Despite all of these roles that the ICMP has to execute, it does have some functional restrictions. The ICMP does not help the source host or IP become more dependable and it does not actually receive or send any data that can be used for the transmission.[5:1] The ICMP simply exists as a way of identifying problems on lost packets and any broken routing.
An ICMP will also not send messages that are about ICMP messages.[2:2] If this was to ever happen, this would cause a feedback loop which would prove to be a detriment to the system as it would create an ICMP message back to the other side. This would then replicate quickly to the point that it would flood the network, rendering it ineffective.