Rfc792-internet Control Information Protocol (ICMP) Chinese version

Source: Internet
Author: User
Introduced
In a system called Catenet, the IP protocol is used as a host to the host datagram service. A network connection device is called a gateway. These gateways exchange information for control through gateways to Gateway protocols (GGP). Typically, a gateway or destination host communicates with the source host, for example, for reporting errors in the datagram process. ICMP is used for this purpose, which uses IP as the underlying support, as if it were a high-level protocol, which is actually part of the IP, and each IP module must implement ICMP.
ICMP messages are sent in the following situations: When the datagram cannot reach its destination, when the gateway has lost its cache function, when the gateway can boot the host on a more short circuit by sending it.
IP is not designed to be absolutely reliable, the purpose of this protocol is to return control information when there is a problem with the network, rather than making the IP protocol absolutely reliable and not guaranteeing that the datagram or control information can be returned. Some datagrams will still be lost in the absence of any reports. The upper layer protocol must use its own error control program to determine whether the communication is correct.
ICMP information is typically reported as an error in processing datagrams. To avoid the unrestricted return of information, ICMP messages are not sent separately in packets, and ICMP information is sent only at the processing datagram offset of 0 o'clock.

"Message Format"
ICMP messages are sent with basic IP hair. The first byte of the data is the ICMP Type field, and the value of this field determines the format of the rest of the data. Any fields marked as "unused" are reserved for future extensions, and must be all 0 in transit. Except in an individual format, the header field is formatted as follows:
. Version: 4
. The ihl:internet header length is in 32-digit units.
. Service Type: 0
. Total length: Length of Baotou and length of data.
. Identifiers (identification), flags (flags), segment offsets: used when staging.
. Life cycle: In seconds, this field reduces the number of times the data is processed per machine, and this value must be greater than the time spent by the gateway to which it is being routed.
. Protocol: ICMP = 1
. Baotou Check code: 16-bit data counter code and then take it instead. To calculate the checksum code, this field should be 0. This domain can be replaced in the future.
. Source Address: A gateway or host address that creates ICMP information, which can be any gateway address, unless stated.
. Destination Address: The gateway or host address to which the information is to be sent.

"Destination Unreachable Information"
  
Figure 1
IP domain: Destination address, network address for sending raw datagram data
ICMP domain:
. Type: 3
. Code:
0 = Network unreachable;
1 = host unreachable;
2 = protocol is not available;
3 = Port not up;
4 = Required section and DF settings;
5 = Source Route failed;
. Check code: 16-bit data (starting from the ICMP type) and then fetch the inverse code. To calculate the checksum code, the checksum Code field should be zero. These zeros will be replaced by the checksum code in the future.
. Internet header + Source datagram:
The Internet header is added with the first 64 digits of the source data. This data is used for host matching information to the appropriate process. If the high-level protocol uses the port number, it should be assumed to be in the first 64 bytes of the source data.
. Description
Corresponding to the gateway's routing table, if the network specified in the destination domain is unreachable, such as the network distance is infinitely far away, the gateway sends the destination Unreachable message to the host sending the source data. Furthermore, in some networks, the gateway has the ability to determine whether the destination host is up to it. If the destination is unreachable, it sends unreachable information to the host sending the source data.
On the destination host, if the IP module cannot submit datagrams because the specified protocol module and process port are not available, the destination host sends unreachable information to the host sending the source data.
The other is when the datagram must be segmented and the "not segmented" bits open, in which case the gateway must discard the datagram and send unreachable information to the host sending the source data.
Code 0,1,4 and 5 are sent by the gateway, while code 2 and 3 are sent by the host.

"Timeout Information"
  
Figure 2
IP domain:
Destination address: From source datagram data.
ICMP domain:
. Type: 11
. Code:
0 = transmission timeout;
1 = The staging stage timed out.
. Check code: 16-bit data (starting from the ICMP type) and then fetch the inverse code. To calculate the checksum code, the checksum Code field should be zero. These zeros will be replaced by the checksum code in the future.
. Internet Header + 64-bit source datagram data: The Internet header plus the first 64 digits of the source data. This data is used for host matching information to the appropriate process. If the high-level protocol uses the port number, it should be assumed to be in the first 64 bytes of the source data.
. Description
This datagram must be discarded if the gateway discovers a lifetime domain of zero when processing the data. The gateway must also notify the source host through timeout information.
This datagram must be discarded if the host has failed to assemble the data within the specified time due to the missing segment in the assembly segment data. The gateway sends timeout information.
If segment 0 is unavailable, timeout information is not sent.
Code 0 is sent by the gateway, and code 1 is sent by the host.

"Parameter Problem message"

  
Figure 3
IP domain:
Destination Address: From the source data.
ICMP domain:
. Type: 12
. Code:
0 = The pointer is pointing to an error.
. Check code: 16-bit data (starting from the ICMP type) and then fetch the inverse code. To calculate the checksum code, the checksum Code field should be zero. These zeros will be replaced by the checksum code in the future.
. Pointer:
If code = 0, point to the problematic byte.
. Internet Header + 64-bit source datagram data: Internet Header + 64-bit source datagram data: The Internet header plus the first 64 bits of the source data. This data is used for host matching information to the appropriate process. If the high-level protocol uses the port number, it should be assumed to be in the first 64 bytes of the source data.
. Description
The gateway or host must discard the datagram if it finds that the header parameter is faulty and does not complete its work while processing the data. A potential cause can be a variable error. The gateway or host notifies the source host through a parameter problem message, which is sent only if the message is discarded.
The pointer points to the datagram header byte that found the error (possibly in the middle of the option). For example, 1 indicates that the service type has an error, and if so, 20 indicates the type of the first option has an error.
Code 0 may be received from a host or gateway.

"Source Congestion message"
  
Figure 4
IP domain:
Destination Address: The address of the source datagram data and the source network.
ICMP domain:
. Type: 4
. Code: 0
. Check code: 16-bit data (starting from the ICMP type) and then fetch the inverse code. To calculate the checksum code, the checksum Code field should be zero. These zeros will be replaced by the checksum code in the future.
. Internet Header + 64-bit source datagram data: Internet Header + 64-bit source datagram data: The Internet header plus the first 64 bits of the source data. This data is used for host matching information to the appropriate process. If the high-level protocol uses the port number, it should be assumed to be in the first 64 bytes of the source data.
. Description
If no buffer is accommodated, the gateway discards the datagram, and if the gateway does so, it sends the source congestion message to the sending host. If too many datagrams are received that cannot be processed, the destination host sends the corresponding message to the sending host. This message requires the sending rate to reduce the send speed, the gateway to each discarded message back to the source congestion message, after receiving this message, the sending host should reduce the sending rate, until no longer receive the gateway sent the source congestion message. After this, the source host can increase the sending rate until the source congestion message of the destination host is received.
The gateway or host does not wait until it has exceeded the limit to send this message, but rather close to its own processing limit to send this message, which means that datagrams that cause the source congestion message can still be processed.
Code 0 may be received from a host or gateway.

"REDIRECT Message"
  
Figure 5
IP domain:
Destination Address: The address of the source datagram data and the source network.
ICMP domain:
. Type: 5
. Code:
0 = Data datagram for redirected networks;
1 = datagram of redirected host;
2 = Redirect datagrams for network and service types;
3 = datagrams that redirect network and host types.
. Check code:
The 16-bit data (starting with the ICMP type) is reversed and fetched instead. To calculate the checksum code, the checksum Code field should be zero. These zeros will be replaced by the checksum code in the future.
. Gateway Internet Address:
The gateway address (which is specified in the Internet destination network domain of the source datagram data) should be sent.
. Internet Header + 64-bit source datagram data:
The Internet header is added with the first 64 digits of the source data. This data is used for host matching information to the appropriate process. If the high-level protocol uses the port number, it should be assumed to be in the first 64 bytes of the source data.
. Description
The gateway sends a redirect message under the following circumstances. A gateway (G1) receives datagrams from a gateway-connected network that checks the routing table for the address (X) of the next Gateway (G2). If the G2 and the specified receiving host are on the same network, and the redirect message is sent, this message suggests that the sending host send the datagram directly to the gateway G2, as this is closer, while the gateway G1 continues to send the datagram forward.
Because the IP source Routing and destination address fields in datagrams are optional, even better routes are sometimes impossible to discover.
Code 0,1,2 and 3 may be sent from the gateway.

"Loopback or loopback response messages"
  
Figure 6
IP domain:
Address:
The source address of the loopback message is the destination address of the loopback response message. To form a loopback response message, you should exchange the source and destination addresses, change the type code to 0, and recalculate the computer checksum code.
ICMP domain:
. Type:
8 represents the loopback message;
0 represents a loopback response message.
Code: 0
. Check code:
The 16-bit data (starting with the ICMP type) is reversed and fetched instead. To calculate the checksum code, the checksum Code field should be zero. These zeros will be replaced by the checksum code in the future.
. Identifiers: If code = 0, the code that helps match the loopback and echo response can be 0.
. Sequence code: If the code = 0, the sequence code that helps match the loopback and echo response can be 0.
. Description
Messages received in the loopback message should be returned in the loopback response message. Identifiers and sequence codes are used by the loopback sender to match the response of the echo request.
Code 0 may be received from a host or gateway.

"Timestamp and timestamp response messages"
  
Figure 7
IP domain:
Address:
The source address of a timestamp message is the destination address of the timestamp response message. To form a timestamp response message, you should exchange the source and destination addresses, change the type code to 14, and recalculate the computer checksum code.
ICMP domain:
. Type:
13 represents a timestamp message;
14 represents a timestamp response message.
. Code: 0
. Check code:
The 16-bit data (starting with the ICMP type) is reversed and fetched instead. To calculate the checksum code, the checksum Code field should be zero. These zeros will be replaced by the checksum code in the future.
. Identifiers: If code = 0, the code that helps match the timestamp and timestamp response can be 0.
. Sequence code: If the code = 0, the code that helps match the timestamp and timestamp response can be 0.
. Description
The received timestamp is appended to the response, which is calculated as one out of 10,000 units, and is timed at midnight at the standard time. The original timestamp is the time before the sender sent it. The receive timestamp is the time that the sender receives, and the delivery time is the time that the loopback person sends.
If the time is invalid in one out of 10,000 seconds, or is not available in standard time, you can populate the data in the timestamp's high byte to indicate that this is not standard data. The identifier and sequence code are matched by the sender's response to the request.
Code 0 may be received from a host or gateway.
Information request or Information 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 destination addresses, change the type code to 16, and recalculate the computer checksum code.
ICMP domain:
. Type:
15 represents information request message;
16 represents the information response message.
. Code: 0
. Check code:
The 16-bit data (starting with the ICMP type) is reversed and fetched instead. To calculate the checksum code, the checksum Code field should be zero. These zeros will be replaced by the checksum code in the future.
. Identifiers: If code = 0, the code that helps match information requests and information responses can be 0.
. Sequence code: If the code = 0, the code that helps match information requests and information responses can be 0.
. Description
This message can be sent as a source network address in the IP header, but at the same time the destination address field is 0 (this means within this network). The response IP module should send a response with a fully specified address. Sending this message is a way for a host to find its own network number. The identifier and sequence code are matched by the sender's response to the request.
Code 0 may be received from a host or gateway.
 
"Message Type Summary"
L 0 Return response
L 3 not to reach
L 4 Source congestion
L 5 redirect
L 8 Send back
L 11 Timeout
L 12 Parameter Problem
L 13 Time stamp
L 14 Time Stamp response
L 15 Information Request
L 16 Information response

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.