Understanding the purpose of ICMP

Early on, scientists developed protocols that drove internet traffic. In addition, they identified potential issues that might prevent traffic from reaching its destination, especially when using IP, as it doesn't guarantee delivery and has no way of communicating network problems with end devices. ICMP overcomes the deficiencies of IP by sending query messages and generating error reports on possible issues that may require attention.

The network layer is responsible for addressing and routing traffic. IP is a best-effort, unreliable protocol. As a result, ICMP is essential for data delivery and must be implemented by every IP module. ICMP communicates issues that prevent data delivery. Common errors include the network or port being unreachable. ICMP can also issue queries such as an echo request/reply, which is used in the ping network utility.

Because there are two IP versions, there are two versions of ICMP, which have roles that are specific to their respective IP version:

  • IPv4 uses ICMPv4
  • IPv6 uses ICMPv6

An ICMP packet is nested within an IP packet, as shown in the following diagram:

ICMP message within an IP packet

All ICMP messages have a common structure that begins with the type, code, and checksum, as shown along the top of the following diagram:

ICMP message

The three fields are consistent in an ICMP header. After the header, you'll find the data payload, where the contents will depend on the ICMP type and code. Let's start with the three header fields, as outlined in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.255.134