Table of Contents
In this lesson, we will focus on ICMP Protocol. We will learn what is ICMP meaning, ICMP Header, ICMP Types and more on this network protocol. Internet Control Message Protocol is simply one of the Layer 3 Protocols. In IP networks, devices send Internet Control Message Protocol encapsulated in IP packet. The general role of ICMP Protocol is generate error packets about the network devices and it is used in troubleshooting activities. As a summary, it supports IP routing, diagnostics and error reporting.
Network engineers use ICMP Protocol generally for troubleshooting activities. The main two troubleshooting commands for network engineers , “ping” and “traceroute”, works with Internet Control Message Protocol . In every passed node, TTL value in the IP packet decrease one. And when it is 0, that node sends ICMP message to the sender, about the reachability of the destination.
Internet Control Message Protocol does not guaranteed the delivery. A hundred percent security is not required already.
You can use Subnetting Cheat Sheet for You Subnetting Calculations.
ICMP Message is sent as encapsulated in IP Packet. ICMP Packets uses fixed 8 bytes (64 bits) header and a variable size data part. The size of the data part is changed according to the used type and code values.
In the ICMP Message, firstly there is an ICMP Header in the front. This Internet Control Message Protocol Message , consist of the below areas:
We can devide ICMP Messages into two category accourding to their goals. These Message Categories are:
You can Practice On Various Network Topologies With Packet Tracer Labs Page!
ICMP Header has three main areas as we mentione above: Type, Code and Checksome. Here;
What are these ICMP Type and Code values? Let’s see firtly Type values and their meanings. And then we will talk about the ICMP Code values. The Type values and Internet Control Message Protocol messages are below:
ICMP Type |
Message |
---|---|
0 | Echo reply |
3 | Destination unreachable |
4 | Source quench |
5 | Redirect |
8 | Echo |
9 | Router advertisement |
10 | Router selection |
11 | Time exceeded |
12 | Parameter problem |
13 | Timestamp |
14 | Timestamp reply |
15 | Information request |
16 | Information reply |
17 | Address mask request |
18 | Address mask reply |
30 | Traceroute |
ICMP Code values give detailed information about the error case. One of these error type is Destination Unreachable. ICMP Type 3 Destination Unreachable Codes and descriptions are given below:
Destination Unreachable Code
|
Description
|
---|---|
0 | Net is unreachable |
1 | Host is unreachable |
2 | Protocol is unreachable |
3 | Port is unreachable |
4 | Fragmentation is needed and Don’t Fragment was set |
5 | Source route failed |
6 | Destination network is unknown |
7 | Destination host is unknown |
8 | Source host is isolated |
9 | Communication with destination network is administratively prohibited |
10 | Communication with destination host is administratively prohibited |
11 | Destination network is unreachable for type of service |
12 | Destination host is unreachable for type of service |
13 | Communication is administratively prohibited |
14 | Host precedence violation |
15 | Precedence cutoff is in effect |
Another one is Redirection used for reporting. ICMP Type 5 Redirection Codes and descriptions are given below:
Redirect Code
|
Description
|
---|---|
0 | Redirect datagram for the network (or subnet) |
1 | Redirect datagram for the host |
2 | Redirect datagram for the type of service and network |
3 | Redirect datagram for the type of service and host |
Router Advertisement Code
|
Description
|
---|---|
0 | Normal router advertisement |
16 | Does not route common traffic |
Time Exceeded Code
|
Description
|
---|---|
0 | Time to Live exceeded in transit |
1 | Fragment reassembly time exceeded |
Parameter Problem Code
|
Description
|
---|---|
0 | Pointer indicates the error |
1 | Missing a required option |
2 | Bad length |
ICMP Echo Request Messages (Type 8) and ICMP Echo Reply Messages (Type 0) messages are two messages, that are sent and received in a successfull communication.
ICMPv4 is the ICMP version that is used for IPv4. With the development of IPv6, ICMP also needed to enhanced to support IPv6. This enhancements provide ICMPv6.
ICMPv6 is the IPv6 enabled enhanced version of ICMPv4. Internet Control Message Protocol version 6 has similar functions that ICMPv4 supports. Beside these functions, it also has additional features.
AdditionalIy to the Internet Control Message Protocol version 4 functions, ICMPv6 supports:
In an IPv6 header, if you see the value “58”, this is the ICMPv6 Packet.
In ICMPv6 Packet, like ICMPv4 there are different fields. These fields are similar to version 4. Let’s remember these fields:
We use ICMPv6 with IPv6 Neighbor Solicitation Messages. And we use IPv6 Neighbor Solicitation Message to determine the link-local address of a destination. Here, type 135 represents this IPv6 Neighbor Solicitation Messages. When this message reaches the destination, as a reply, destination sends a IPv6 Neighbor Advertisement Message. Here, the type is 136.
Internet Control Message Protocol version 6 is also used for IPv6 Router Advertisement Messages with type 134. If these messags are response to a Solicitation Message, the type 133 is used.
ICMPv6 has different message types for different message categories like ICMPv4. Here, we can divide ICMPv6 Messages into two category like version 4:
Error Messages ad their type values are below:
Informational Messages are also below:
We can also talk about the IPv6 Neighbour Discovery and ICMPv6. In ICMPv6, there are different type values:
Like ICMPv4, ICMPv6 also has the Code values. You can also check the code values of these different types below:
Type | Code | ||
---|---|---|---|
Value | Meaning | Value | Meaning |
1 | Destination unreachable | 0 | no route to destination |
1 | communication with destination administratively prohibited | ||
2 | beyond scope of source address | ||
3 | address unreachable | ||
4 | port unreachable | ||
5 | source address failed ingress/egress policy | ||
6 | reject route to destination | ||
7 | Error in Source Routing Header | ||
2 | Packet too big | 0 | |
3 | Time exceeded | 0 | hop limit exceeded in transit |
1 | fragment reassembly time exceeded | ||
4 | Parameter problem | 0 | erroneous header field encountered |
1 | unrecognized Next Header type encountered | ||
2 | unrecognized IPv6 option encountered |
128 | Echo Request | 0 | |
129 | Echo Reply | 0 | |
130 | Multicast Listener Query (MLD) | 0 | There are two subtypes of Multicast Listener Query messages:
|
138 | Router Renumbering | 0 | Router Renumbering Command |
1 | Router Renumbering Result | ||
255 | Sequence Number Reset | ||
139 | ICMP Node Information Query | 0 | The Data field contains an IPv6 address which is the Subject of this Query. |
1 | The Data field contains a name which is the Subject of this Query, or is empty, as in the case of a NOOP. | ||
2 | The Data field contains an IPv4 address which is the Subject of this Query. | ||
140 | ICMP Node Information Response | 0 | A successful reply. |
1 | The Responder refuses to supply the answer. | ||
2 | The Qtype of the Query is unknown to the Responder. |
The purpose of ICMP messages is to give information about IP packet processing. This is basically a feedback mechanism. We can check if our ip packet is sent to the destination or not with these messages. This messages are also used for topology change information. If there is a topology change in the network, other devices are informed with these messages.
Sure, Internet Control Message Protocol is used for ping. Another usage of this protocol is with traceroute command. When we need to check the reachability of any destination, we use ping command. In other words, we ping the destination. This means that, our device will send ICMP Echo Request to the destination and receive ICMP Echo Reply from that device if the destination is reachable.
There is no specific port for Internet Control Message Protocol. But, this protocol uses types and codes.
Internet Control Message Protocol is used on network devices that are layer 3 cabaple like routers, hosts. Any errors and updated on these devices are announced with this protocol.
Internet Control Message Protocol is a network layer, layer 3 protocol of OSI Reference Model. It works in layer 3 like IP, OSPF etc.
Leave a Reply