ICMP – Internet Control Message Protocol

ICMP - Internet Control Message Protocol

ICMP Protocol was introduced to help us better manage networks.
ICMP is a messaging protocol which helps in reporting network issues through its messages.

The messaging about the network issues is done with the help of “Type” and “Code” fields within the ICMP packet.

Type field specifies the type of information carried within the ICMP message.
eg.

And then there could be multiple different sub-types of messages within the same Type field, which are covered using Code field.
eg.

Now, let’s get back to the first example that we discussed in this lesson and mention the correct type and code of the ICMP message sent back to the source.

ICMP Type 3 and Code 0 were chosen because R2 didn’t have a route for the destination inside the Routing Table, so the network was unreachable.

Let’s also explore the “Port Unreachable” example under the same Type 3- Destination Unreachable, but Code 3- Port Unreachable.

Web Server in this case was providing service on port 80, but the request from the client requested service from port 443.
Port 443 was closed on the web server which is why it dropped the packet and sent back an ICMP message reporting about the “Port Unreachable” issue.

In this last section, we will cover about another dimension of ICMP protocol.
ICMP has another function of sending queries using which it can get responses that contain some information.
As an example we will discuss about ICMP Echo Request and ICMP Echo Reply messages.

Ping tool in Computer Networking uses these two ICMP messages to perform IP connectivity checks.
We can ping between devices to confirm that we have bi-directional connectivity between them, like in the following example:
Here, we are pinging from Device1(192.168.1.1) to Device2(192.168.1.2)

If the response comes back to Device 1 then that would confirm bi-directional connectivity between the two devices.

As a live example you can go to your “Command Line Interface” application on your laptop and then ping “google.com”, and you will see replies coming back if you have internet connectivity.

SprintGrad-vm ~ % ping google.com
PING google.com (142.250.183.238): 56 data bytes
64 bytes from 142.250.183.238: icmp_seq=0 ttl=113 time=59.841 ms
64 bytes from 142.250.183.238: icmp_seq=1 ttl=113 time=55.457 ms
64 bytes from 142.250.183.238: icmp_seq=2 ttl=113 time=43.199 ms
64 bytes from 142.250.183.238: icmp_seq=3 ttl=113 time=45.478 ms
64 bytes from 142.250.183.238: icmp_seq=4 ttl=113 time=42.191 ms

— google.com ping statistics —
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 42.191/49.233/59.841/7.090 ms

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x