当前位置:网站首页>Understand what ICMP Protocol is
Understand what ICMP Protocol is
2022-06-25 06:21:00 【Programmer community】
Messages on the network are not always transmitted and received smoothly , Sometimes it may be due to the gateway MTU It is too small and the message is not allowed to be fragmented, so the message cannot be forwarded by the gateway , Sometimes it may be due to TTL The value is reduced to 0 And cannot continue to send or receive , It is also possible that the message cannot be received by the receiver due to the problem of the header parameters , These problems , You can't simply discard the process . If you discard it without telling the source host , The source host will think that it was sent successfully , This will cause the information of communication parties to be out of sync , And then cause even greater failure . therefore , While discarding the message , The source host must also be informed of the reason for discarding , It is through ICMP The message carries relevant information
ICMP
ICMP
Internet Control Message Protocol, It's on the network layer , yes IP A component of a layer , It is mainly used to transmit error messages and other information that needs attention

icmp The protocol is an integral part of the network layer , therefore icmp Message has ip First floor , I didn't put icmp It's written in icmpHeader+icmpPayload, because icmp There are many types of messages , It's caused icmp The message structure is not identical
What's the difference ? Let's take a look first icmp message General format

All types of icmp All messages have 1 Bytes of Type、1 Bytes of Code and 2 Bytes of Checksum, And then according to Type and Code Values are different , To determine the Message Body Different
- Type
Message type , Used to represent a message
- Code
Code , Provide further information about the message type
- Checksum
The checksum ,icmp Checksums only cover icmp message
- Message Body
The length and content of the field , Depending on the type of message and the code
ICMP Message type
ICMP Echo Request/Response
Used to detect IP Of network connectivity Ping/Tracert, Is that we are cmd Window ping The operation of
ICMP Destination unreachable message
IP Is a best effort delivery mechanism , Datagrams are not easily discarded . When Routing devices Unable to forward or deliver IP The data tell the time , It will send a message unreachable to the destination station to the source station , Then discard the datagram
This is what we mentioned in the preface because of the routing device MTU It is too small and needs to be divided , However IP message DF Flag bit not allowed , This makes it impossible to forward , At this time, the route will discard the message and send a message to the source host at the same time ICMP Destination unreachable message
ICMP Redirect message
ICMP Redirect message is ICMP One of the control messages . Under certain circumstances , When the router detects that a host or network device uses a non optimized route , It sends a message to the host or network device ICMP Redirect message , Request the host or network device to change the route . The router will also forward the initial datagram to its destination
ICMP Time Exceeded
When I received TTL by 0 The message of , Network devices / The host will discard the message , And return a ICMP time exceeded message
ICMP Parameter problem message
If the received packet is found to have a problem with the header parameters , When packet parsing cannot be completed , The Internet / The host will discard the packets , And may return a ICMP The parameter problem message is sent to the source
When the IP Head , perhaps TCP Head , perhaps UDP A parameter error occurred in the header , The receiver is unable to complete the packet parsing , The packets will be discarded , And return a icmp Parameter problem message
ICMP The source side is closed
Used to indicate that the other party or the server in the middle is busy and cannot respond . If the network device does not have enough cache space to store messages to a destination host , These messages will be discarded by the device . here , The network device sends ICMP The source side is closed and the message is sent to the Destination host . If a packet arrives at a host too fast , Too late to be handled by the host , Then the host can also send ICMP The source side is closed , In order to reduce the packet rate
Last , All the above are ICMPv4 agreement , be based on IPv4 Agreed icmp message ,ICMPv6 It has its own definition and format
边栏推荐
- Forecast report on output demand and supply scale of global and Chinese structural ceramics market for semiconductor equipment (2022 Edition)
- Day22 send request and parameterization using JMeter
- SAP ui5 application development tutorial XXIX - Introduction to routing and navigation functions of SAP ui5 trial version
- What happens when redis runs out of memory
- @Detailed explanation of valid annotation usage
- @Principle of preauthorize permission control
- Interview experience - list of questions
- Rhcsa day 4
- Wechat applet simply realizes chat room function
- MV command – move or rename files
猜你喜欢

Day21 JMeter usage basis

BGP - basic concept

Mongodb basic concept learning - Documentation
SAP ui5 Application Development Tutorial Part 30 - parameter transfer in the routing process of SAP ui5

Lesson 9: workspace introduction

CTFSHOW

How to use asemi FET 7n80 and how to use 7n80

Getting started with Silverlight development 1

Socket, network model notes

Day21 performance test process
随机推荐
Curl command – file transfer tool
Mongodb basic concept learning - Documentation
Distributed solar photovoltaic inverter monitoring
Socket, network model notes
DF command – displays disk space usage
Wechat applet authorization login + mobile phone sending verification code +jwt verification interface (laravel8+php)
@Detailed explanation of valid annotation usage
MV command – move or rename files
The sum problem
Highway
Location object
Noi Mathematics: Dirichlet convolution
Es11 new methods: dynamic import(), bigint, globalthis, optional chain, and null value merging operator
SAP ui5 tutorial for beginners part XXVI - detailed steps for using OData service with mock server trial version
[data visualization application] draw spatial map (with R language code)
What does cardinality mean in set
After five years of software testing in ByteDance, I was dismissed in December to remind my brother of paddling
Investment opportunities and operational risk assessment report of China's engineering consulting industry during the 14th Five Year Plan period 2022-2028
SAP ui5 Application Development Tutorial Part 30 - parameter transfer in the routing process of SAP ui5
Add the author watermark plugin v1.4 update to the posts of elegant grass discuz plugin - some forums post errors and bugs have been fixed