ICMP protocol (Internet Control Message Protocol)

Series Article Directory

Huawei Datacom Learning (3)


Table of contents

foreword

First, what is the ICMP protocol?

2. Example: direct connection between routes to ping each other

Third, understand ICMP messages

​edit

3.1, why do we need to understand this field?

Four, ICMP redirection (path optimization - detour - optimal path)

Five, ICMP error reporting

Summarize


foreword

With the continuous development of Huawei, the technology of data communication is becoming more and more important. Many people have started learning data communication. This article introduces the ICMP protocol, which is the eleventh stop of our data communication kingdom (we are in the article Huawei's ENSP software is used).


First, what is the ICMP protocol?

Internet Control Message Protocol ICMP (Internet Control Message Protocol) is an auxiliary protocol of the IP protocol.

The ICMP protocol is used to transmit various error and control information between network devices, and plays a vital role in collecting various network information, diagnosing and eliminating various network faults, etc.

Function: Help us monitor whether there is any problem with the link, the most common one is whether the direct connection can be pinged.

The ICMP protocol is used to transmit various error and control information between network devices, and plays a vital role in collecting various network information, diagnosing and eliminating various network faults, etc.

2. Example: direct connection between routes to ping each other

Let's capture packets on R3, let's take a look

[AR2]ping 192.168.12.3

  PING 192.168.12.3: 56  data bytes, press CTRL_C to break

   Reply from 192.168.12.3: bytes=56 Sequence=1 ttl=255 time=250 ms

   Reply from 192.168.12.3: bytes=56 Sequence=2 ttl=255 time=30 ms

   Reply from 192.168.12.3: bytes=56 Sequence=3 ttl=255 time=40 ms

   Reply from 192.168.12.3: bytes=56 Sequence=4 ttl=255 time=20 ms

   Reply from 192.168.12.3: bytes=56 Sequence=5 ttl=255 time=20 ms

Interpretation of ICMP message:

There are two messages, request, replay, one question and one answer, which are used to transmit various error and control information between network devices, which is the way two devices send this information to each other, one question and one answer , A asks, is B still there? If B is still there, B will reply, I am, and then B will ask A if you are still there?

Third, understand ICMP messages

00 is a reply message, 80 is a request message, and those in the middle are some abnormal ones, which represent the network failure. If the network is connected, only 00 and 80 can be seen

3.1, why do we need to understand this field?

Because sometimes we encounter a fault, we have to analyze it according to the message, specific to the details of the fault

Four, ICMP redirection (path optimization - detour - optimal path)

ICMP redirect packets are a type of ICMP control packets. Under certain circumstances, when a router detects that a machine uses a non-optimal route, it will send an ICMP redirect message to the host, requesting the host to change the route.

explain:

When host A's gateway is 10.0.0.100, and the gateway is RTB, it means that host A goes out, the first hop of the message must be sent to RTB, but now the destination it wants to visit is server A, because the host The default gateway of A is RTB, so there is no way. The message must be sent to RTB first, and then RTB is sending it to server A. It could have been sent directly to RTA, so at this time, RTB is used as a gateway device, and it will send to our host A sends an ICMP redirect message, so that if host A still finds server A next time, it will directly send a message to server A, which can be understood as giving you directions again and telling you that you want to visit host A next time Server A, please send the message to server A directly, you don't need to send it to me anymore.

Five, ICMP error reporting

ICMP defines various error messages for diagnosing network connectivity problems; from these error messages, the source device can determine the cause of data transmission failure. For example, when a network device cannot access the target network, it will automatically send an ICMP destination unreachable message to the sending device.

Device commands:

<AR2>tracert 192.168.12.3

traceroute to  192.168.12.3(192.168.12.3), max hops: 30 ,packet length: 40,pres

s CTRL_C to break

1 192.168.12.3 30 ms  30 ms  20 ms

<AR2>


Summarize

Congratulations, you have learned the ICMP protocol through this chapter. Huawei Datacom still has many treasures waiting for you to explore, come on! Just to become a better version of myself.

Guess you like

Origin blog.csdn.net/weixin_73466540/article/details/132051849