Sunday, May 7, 2023

What is ICMP ?

The ICMP stands for Internet Control Message Protocol. It is a network layer protocol. It is used for error handling in the network layer, and it is primarily used on network devices such as routers. As different types of errors can exist in the network layer, so ICMP can be used to report these errors and to debug those errors. For example, some sender wants to send the message to some destination, but the router couldn't send the message to the destination. In this case, the router sends the message to the sender that I could not send the message to that destination.

The IP protocol does not have any error-reporting or error-correcting mechanism, so it uses a message to convey the information.

The ICMP messages are usually divided into two categories:



  • Error-reporting messages

The error-reporting message means that the router encounters a problem when it processes an IP packet then it reports a message.

  • Query messages

The query messages are those messages that help the host to get the specific information of another host. For example, suppose there are a client and a server, and the client wants to know whether the server is live or not, then it sends the ICMP message to the server.

ICMP Message Format

The message format has two things; one is a category that tells us which type of message it is. If the message is of error type, the error message contains the type and the code. The type defines the type of message while the code defines the subtype of the message.

The ICMP message contains the following fields:


  • Type: It is an 8-bit field. It defines the ICMP message type. The values range from 0 to 127 are defined for ICMPv6, and the values from 128 to 255 are the informational messages.
  • Code: It is an 8-bit field that defines the subtype of the ICMP message
  • Checksum: It is a 16-bit field to detect whether the error exists in the message or not.

No comments:

What is differrence between STP and RSPT ?

  RSTP has faster convergence than STP. This is because  RSTP does not rely on forwarding delay timers , making it faster and more efficient...