ICMP Packet Format

ICMP header comes after IPv4 and IPv6 packet header. 

ICMPv4 Packet Format

In the ICMP packet format, the first 32 bits of the packet contain three fields:

Type (8-bit): The initial 8-bit of the packet is for message type, it provides a brief description of the message so that receiving network would know what kind of message it is receiving and how to respond to it. Some common message types are as follows:

  • Type 0 – Echo reply
  • Type 3 – Destination unreachable
  • Type 5 – Redirect Message
  • Type 8 – Echo Request
  • Type 11 – Time Exceeded
  • Type 12 – Parameter problem

Code (8-bit): Code is the next 8 bits of the ICMP packet format, this field carries some additional information about the error message and type.

Checksum (16-bit): Last 16 bits are for the checksum field in the ICMP packet header. The checksum is used to check the number of bits of the complete message and enable the ICMP tool to ensure that complete data is delivered.

The next 32 bits of the ICMP Header are Extended Header which has the work of pointing out the problem in IP Message. Byte locations are identified by the pointer which causes the problem message and receiving device looks here for pointing to the problem.

The last part of the ICMP packet is Data or Payload of variable length. The bytes included in IPv4 are 576 bytes and in IPv6, 1280 bytes.

Internet Control Message Protocol (ICMP)

Internet Control Message Protocol is known as ICMP. The protocol is at the network layer. It is mostly utilized on network equipment like routers and is utilized for error handling at the network layer. Since there are various kinds of network layer faults, ICMP can be utilized to report and troubleshoot these errors.

Since IP does not have an inbuilt mechanism for sending error and control messages. It depends on Internet Control Message Protocol(ICMP) to provide error control. In this article, we are going to discuss ICMP in detail along with their uses, messages, etc.

Similar Reads

What is ICMP?

ICMP is used for reporting errors and management queries. It is a supporting protocol and is used by network devices like routers for sending error messages and operations information. For example, the requested service is not available or a host or router could not be reached....

Uses of ICMP

ICMP is used for error reporting if two devices connect over the internet and some error occurs, So, the router sends an ICMP error message to the source informing about the error. For Example, whenever a device sends any message which is large enough for the receiver, in that case, the receiver will drop the message and reply to the ICMP message to the source....

How Does ICMP Work?

ICMP is the primary and important protocol of the IP suite, but ICMP isn’t associated with any transport layer protocol (TCP or UDP) as it doesn’t need to establish a connection with the destination device before sending any message as it is a connectionless protocol....

ICMP Packet Format

ICMP header comes after IPv4 and IPv6 packet header....

ICMP in DDoS Attacks

In Distributed DOS (DDoS) attacks, attackers provide so much extra traffic to the target, so that it cannot provide service to users. There are so many ways through which an attacker executes these attacks, which are described below....

Types of ICMP Messages

Type Code        Description 0 – Echo Reply 0 Echo reply 3 – Destination Unreachable 0 Destination network unreachable 1 Destination host unreachable 2 Destination protocol unreachable 3 Destination port unreachable 4 Fragmentation is needed and the DF flag set 5 Source route failed 5 – Redirect Message 0 Redirect the datagram for the network 1 Redirect datagram for the host 2 Redirect the datagram for the Type of Service and Network 3 Redirect datagram for the Service and Host 8 – Echo Request 0 Echo request 9 – Router Advertisement 0 Use to discover the addresses of operational routers 10 – Router Solicitation 0 11 – Time Exceeded 0 Time to live exceeded in transit 1 Fragment reassembly time exceeded. 12 – Parameter Problem 0 The pointer indicates an error. 1 Missing required option 2 Bad length 13 – Timestamp 0 Used for time synchronization 14 – Timestamp Reply 0 Reply to Timestamp message...

Advantages of ICMP

Network devices use ICMP to send error messages, and administrators can use the Ping and Tracert commands to debug the network. These alerts are used by administrators to identify issues with network connectivity. A prime example is when a destination or gateway host notifies the source host via an ICMP message if there is a problem or a change in network connectivity that needs to be reported. Examples include when a destination host or networking becomes unavailable, when a packet is lost during transmission, etc. Furthermore, network performance and connection monitoring tools commonly employ ICMP to identify the existence of issues that the network team has to resolve. One quick and simple method to test connections and find the source is to use the ICMP protocol, which consists of queries and answers....

Disadvantages of ICMP

If the router drops a packet, it may be due to an error; but, because to the way the IP (internet protocol) is designed, there is no way for the sender to be notified of this problem. Assume, while a data packet is being transmitted over the internet, that its lifetime is over and that the value of the time to live field has dropped to zero. In this case, the data packet is destroyed. Although devices frequently need to interact with one another, there isn’t a standard method for them to do so in Internet Protocol. For instance, the host needs to verify the destination’s vital signs to see if it is still operational before transmitting data....

Frequently Asked Question on ICMP – FAQs

What is ICMP used for?...