当前位置:网站首页>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
边栏推荐
- SAP ui5 beginner tutorial No. 27 - unit test tool quNit introduction trial version for SAP ui5 application
- Grep command – powerful text search tool
- Huawei machine test question: splicing URL
- C simple operation mongodb
- Sword finger offer II 095 Longest common subsequence
- Analysis report on global and Chinese pharmaceutical excipients industry competition and marketing model 2022-2028
- Technology inventory: Technology Evolution and Future Trend Outlook of cloud native Middleware
- China rehabilitation hospital industry operation benefit analysis and operation situation investigation report 2022
- ctfshow-misc
- What are the reasons why most webmasters choose Hong Kong site group servers?
猜你喜欢
Summary of 6 common methods of visual deep learning model architecture
Linus' speech recordings, which were lost in 1994, were made public
Pre knowledge of asynchronous operation
Uni app wechat applet customer service chat function
Vscode voice notes to enrich information (Part 1)
[hand torn STL] Stack & queue
Day22 send request and parameterization using JMeter
SAP ui5 beginner tutorial 25 - using proxy server to solve the cross domain problem of SAP ui5 application accessing remote OData service trial version
SAP ui5 Application Development Tutorial Part 30 - parameter transfer in the routing process of SAP ui5
Soft exam information system project manager_ Management Science (Operations Research) 2--- senior information system project manager of soft test 034
随机推荐
[interview with a large factory] meituan had two meetings. Was there a surprise in the end?
Go uses channel to control concurrency
Report on the application prospect and investment potential of global and Chinese cell therapy industry 2022-2028
Forecast report on output demand and supply scale of global and Chinese structural ceramics market for semiconductor equipment (2022 Edition)
Asemi fast recovery diode us1m parameters, us1m recovery time, us1m voltage drop
Research Report on demand and Competitive Prospect of global and Chinese welding personal protective equipment industry 2022-2027
50 days countdown! Are you ready for the Landbridge cup provincial tournament?
Optimal Parking
Find command – find and search for files
Explain @builder usage
Detailed explanation of @jsoninclude annotation in Jackson
Echo command – output a string or extract the value of a shell variable
@Detailed explanation of valid annotation usage
Huawei machine test question: splicing URL
C switch nested syntax
JS to realize the encapsulation of the function of obtaining the mouse click position
[v2.0] automatic update system based on motion step API (support disconnection reconnection and data compensation)
SAP ui5 beginner tutorial No. 28 - Introduction to the integration test tool OPA for SAP ui5 applications
Personal blog system graduation project opening report
How to use asemi FET 7n80 and how to use 7n80