Rfc792-Internet Control Information Protocol (ICMP) Chinese Version

Source: Internet
Author: User
[Introduction]
In a system called catenet, the IP protocol is used as the datagram service from the host to the host. A network connection device is called a gateway. These gateways exchange information for control through the gateway-to-Gateway Protocol (GGP. Generally, the gateway or target host will communicate with the source host, for example, to report errors during the datagram process. For this purpose, ICMP is used. It uses IP as the underlying support, as if it is a high-level protocol, but in fact it is part of the IP, and each IP module must implement ICMP.
ICMP messages are sent in the following situations: when the datagram cannot reach the destination, when the gateway has lost the cache function, when the gateway can direct the host to send on a shorter route.
The IP address is not designed to be absolutely reliable. The protocol is designed to return control information when a network problem occurs, rather than making the IP protocol absolutely reliable, and does not guarantee that data packets or control information can be returned. Some data packets will still be lost without any report. The upper-layer protocol must use its own error control program to determine whether the communication is correct.
ICMP information usually reports errors in the process of handling data packets. To avoid unlimited return of information, ICMP messages are not sent into packets separately, and ICMP messages are sent only when the datagram offset is 0.

Message format]
The ICMP message is sent in the basic IP address header. The first byte of the data is an ICMP domain. The value of this domain determines the format of the remaining data. Any domain marked as "not used" is reserved for future extensions and must all be 0 during transmission. Unless in an individual format, the header domain is in the following format:
. Version: 4
. IHL: the length of the Internet header is measured in 32 characters.
. Service type: 0
. Total Length: the header length and Data Length.
. Identification, flags, and segment offset: used for segmentation.
. Life Cycle: in seconds, this domain is reduced when each machine processes data reports. This value must be greater than the time consumed by the gateway to transmit it.
. Protocol: ICMP = 1
. Packet header Verification Code: The 16-Bit Data reverse code is obtained and then retrieved. Is the calculation verification code, this field should be 0. This domain can be replaced in the future.
. Source Address: the gateway or host address for creating ICMP information. It can be any gateway address unless specified.
. Destination Address: the gateway or host address to be sent.

[Inaccessible target information]
  
Figure 1
IP domain: Destination Address, network address for sending original datagram data
ICMP domain:
. Type: 3
. Code:
0 = inaccessible network;
1 = Host inaccessible;
2 = protocol unavailable;
3 = the port is inaccessible;
4 = required segments and DF settings;
5 = source route failure;
. Verification Code: The 16-bit data (starting from the ICMP type) is obtained based on the reverse code and then the reverse code. To calculate the verification code, the verification code field should be zero. These Zeros will be replaced by verification codes in the future.
. Internet header + Source datagram:
The header of the source data added to the internet packet header is 64-bit. This data is used to match information on the host to the corresponding process. If the High-level protocol uses the port number, it should be assumed that it is the first 64 bytes of the source data.
. Note:
Corresponding to the route table of the gateway, if the network specified in the destination domain is inaccessible, if the network distance is infinitely far, the gateway will send a destination inaccessible message to the host that sends the source data. In addition, in some networks, the gateway can determine whether the target host is accessible. If the destination is inaccessible, it will send an inaccessible message to the host that sends the source data.
On the target host, if the IP module cannot submit a datagram because the specified protocol module and process port are unavailable, the target host will send an inaccessible message to the host that sends the source data.
In another case, when the datagram must be transmitted in segments and the "not segmented" bit is enabled, the gateway must discard the datagram, and sends inaccessible information to the host that sends the source data.
Codes 0, 1, 4, and 5 are sent by the gateway, while codes 2 and 3 are sent by the host.

[Timeout Information]
  
Figure 2
IP domain:
Destination Address: obtained from the source datagram data.
ICMP domain:
. Type: 11
. Code:
0 = Transfer timeout;
1 = multipart loading timeout.
. Verification Code: The 16-bit data (starting from the ICMP type) is obtained based on the reverse code and then the reverse code. To calculate the verification code, the verification code field should be zero. These Zeros will be replaced by verification codes in the future.
. Internet packet header + 64-bit source data: the internet packet header is added with the 64-bit header of the source data. This data is used to match information on the host to the corresponding process. If the High-level protocol uses the port number, it should be assumed that it is the first 64 bytes of the source data.
. Note:
If the gateway finds that the TTL domain is zero when processing the data report, the datagram must be discarded. The gateway must also notify the source host through timeout information.
This datagram must be discarded if the host fails to assemble data within the specified time period due to the loss of the segment when assembling the data report. The timeout message sent by the gateway.
If the segment is unavailable, no timeout information is required.
Code 0 is sent by the gateway, and code 1 is sent by the host.

[Parameter question message]

  
Figure 3
IP domain:
Destination Address: obtained from the source data.
ICMP domain:
. Type: 12
. Code:
0 = pointer pointing error.
. Verification Code: The 16-bit data (starting from the ICMP type) is obtained based on the reverse code and then the reverse code. To calculate the verification code, the verification code field should be zero. These Zeros will be replaced by verification codes in the future.
. Pointer:
If code = 0, point to the problematic byte.
. Internet Baotou + 64-bit source datagram data: Internet Baotou + 64-bit source datagram data: the Internet Baotou is obtained with the 64-bit header of the source data. This data is used to match information on the host to the corresponding process. If the High-level protocol uses the port number, it should be assumed that it is the first 64 bytes of the source data.
. Note:
If the gateway or host finds an error in the header parameter when processing the data report and cannot complete the work, it must discard this datagram. A potential cause can be a variable error. The gateway or host will notify the source host through the parameter question message. This message is sent only when the message is discarded.
The Pointer Points to the packet header byte (which may be in the middle of the option ). For example, 1 indicates that the service type has an error. If there is an option, 20 indicates that the type of the first option has an error.
Code 0 may be received from the host or gateway.

[Source congestion message]
  
Figure 4
IP domain:
Destination Address: the address and source network of the source datagram data.
ICMP domain:
. Type: 4
. Code: 0
. Verification Code: The 16-bit data (starting from the ICMP type) is obtained based on the reverse code and then the reverse code. To calculate the verification code, the verification code field should be zero. These Zeros will be replaced by verification codes in the future.
. Internet Baotou + 64-bit source datagram data: Internet Baotou + 64-bit source datagram data: the Internet Baotou is obtained with the 64-bit header of the source data. This data is used to match information on the host to the corresponding process. If the High-level protocol uses the port number, it should be assumed that it is the first 64 bytes of the source data.
. Note:
If there is no buffer capacity, the gateway will discard the datagram. If the gateway does this, it will send the source congestion message to the sending host. If too many received data packets cannot be processed, the target host will also send the corresponding message to the sending host. This message requires sending and sending to reduce the sending rate. The gateway will return the source congestion message to each discarded message. After receiving this message, the sending host should reduce the sending rate, until the source congestion messages sent by the gateway are no longer received. After that, the source host can increase the sending rate until it receives the source congestion message from the target host.
The gateway or host does not wait until the message reaches the upper limit, but sends the message close to its processing limit. This means that the datagram of the source congestion message can still be processed.
Code 0 may be received from the host or gateway.

[Redirect Message]
  
Figure 5
IP domain:
Destination Address: the address and source network of the source datagram data.
ICMP domain:
. Type: 5
. Code:
0 = redirection of network datagram;
1 = redirect host datagram;
2 = redirection of network and service type datagram;
3 = redirect network and host type data packets.
. Verification Code:
The 16-bit data (starting from the ICMP type) is reversed and retrieved. To calculate the verification code, the verification code field should be zero. These Zeros will be replaced by verification codes in the future.
. Gateway Internet address:
The gateway address should be sent (it is specified in the Internet destination network domain of the source datagram data ).
. Internet Baotou + 64-bit source datagram data:
The header of the source data added to the internet packet header is 64-bit. This data is used to match information on the host to the corresponding process. If the High-level protocol uses the port number, it should be assumed that it is the first 64 bytes of the source data.
. Note:
The gateway sends a redirection message in the following cases. The Gateway (G1) receives the datagram from the network connected to the Gateway. It checks the route table to obtain the address (x) of the next Gateway (G2 ). If G2 and the specified receiving host are on the same network and the redirection message is sent, it is recommended that the sending host directly send the datagram to the gateway G2 because it is closer, at the same time, the gateway G1.
Because the IP source route and destination address domain in the datagram are optional, even better routes cannot be found.
Codes 0, 1, 2, and 3 may be sent from the gateway.

[Response Message]
  
Figure 6
IP domain:
Address:
The source address of the send-back message is the destination address of the send-back Response Message. To form a return response message, you should exchange the source and target addresses, change the type code to 0, and re-calculate the verification code.
ICMP domain:
. Type:
8 indicates the send-back message;
0 indicates the return response message.
Code: 0
. Verification Code:
The 16-bit data (starting from the ICMP type) is reversed and retrieved. To calculate the verification code, the verification code field should be zero. These Zeros will be replaced by verification codes in the future.
. Identifier: if the code is 0, the code that helps match the response can be 0.
. Sequence code: if the code is 0, the sequence code that helps match the return and return responses can be 0.
. Note:
The message received in the return message should be returned in the return response message. The identifier and serial code are used by the sender to help match the response of the send-back request.
Code 0 may be received from the host or gateway.

[Response Message with Timestamp and timestamp]
  
Figure 7
IP domain:
Address:
The source address of the timestamp message is the destination address of the timestamp Response Message. To form a timestamp response message, you should exchange the source and target addresses, change the type code to 14, and re-calculate the verification code.
ICMP domain:
. Type:
13 indicates a timestamp message;
14 represents the timestamp Response Message.
. Code: 0
. Verification Code:
The 16-bit data (starting from the ICMP type) is reversed and retrieved. To calculate the verification code, the verification code field should be zero. These Zeros will be replaced by verification codes in the future.
. Identifier: if the code is 0, the code that helps match the timestamp and timestamp response can be 0.
. Sequence code: if the code is 0, the code that helps match the timestamp and timestamp response can be 0.
. Note:
The received timestamp is appended to the response. The time is calculated in units of one thousandth. The time starts to be timed at midnight. The original timestamp is the time before the sender sends the message. The receipt timestamp is the time when the sender receives the message, and the transfer time is the time when the sender sends the message.
If the time is counted as one thousandth of a second, or cannot be provided as standard, you can fill in the data in the high byte of the timestamp to indicate that this is not the standard data. The identifier and serial number are the responses to the request matched by the sender.
Code 0 may be received from the host or gateway.
Information request or response message
  
Figure 8
IP domain:
Address:
The source address of the information request message is the destination address of the Information Response Message. To form an information response message, you should exchange the source and target addresses, change the type code to 16, and re-calculate the verification code.
ICMP domain:
. Type:
15 indicates the information request message;
16 indicates the Response Message.
. Code: 0
. Verification Code:
The 16-bit data (starting from the ICMP type) is reversed and retrieved. To calculate the verification code, the verification code field should be zero. These Zeros will be replaced by verification codes in the future.
. Identifier: if the code is 0, the code that helps match the information request and response can be 0.
. Sequence code: if the code is 0, the code that helps match the information request and response can be 0.
. Note:
The message can be sent from the source network address in the IP Address Header, but the destination address is 0 (this indicates that the message is in the network ). The response IP module should send a response with the specified address completely. Sending this message is a method for the host to find its network number. The identifier and serial number are the responses to the request matched by the sender.
Code 0 may be received from the host or gateway.
 
[Message Type Summary]
L 0 return response
L 3 inaccessible
L 4 source congestion
L 5 redirection
L 8 delivery
L 11 timeout
L 12 parameter problems
L 13 Timestamp
L 14 timestamp response
L 15 information requests
L 16 response to information

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.