Why is ICMP categorized as a layer 3 protocol? [closed]

ICMP is categorized as a layer 3 protocol in the OSI model, but as far as i can tell it does not meet the definition of a network layer protocol.

It does not provide addressing or packet routing (it uses IP for this), so all it does is send information from one node to another node, like a transport protocol. So, given that, why is ICMP categorized as a layer 3 protocol?


ICMP is actually at the "top" of the layer 3. It uses the IP protocol to deliver data to a remote host. In other words, ICMP messages must be encapsulated in IP packets.

Consider it as similar to ARP which could be considered to be "at the top" of layer 2, while using the Ethernet protocol to actually send packets.

ICMP is implemented as a part of the IP layer so ICMP processing can be viewed as occurring parallel to, or as a part of, IP processing. Therefore, in the topic on TCP/IP-based layered network, ICMP is shown as a layer 3 protocol.

@Robbie Mckennie

Which layer ICMP belongs to is a subject of fierce debate. The ICMP header is at layer 4, just like TCP and UDP so people argue that it belongs in layer 4. Others however argue that ICMP is a layer 3 protocol, since it assists IP and has no concept of ports.

For me, classification of a protocol as belonging to a certain layer in the OSI model depends on how protocol works. An example:

BGP is used to route at layer 3, but BGP itself is carried by TCP ( and of course IP )


ICMP (and ICMPv6, IGMP, etc) all manage the Network Layer connections. They are not (typically) used by end users, but by the Operating System. For that reason, it belongs in Layer 3 (Network) even though it relies on IP for addressing and path determination (routing).

The OSI model is largely written from the prospective of connecting users (actual people, or application servers). All the management protocols and whatnot still fit in the OSI model, but will not seem to quite match the language because they not (typically) serving users directly.