Internet Control Information Protocol (Transfer)

zhaozj2021-02-16  106

Internet Control Information Protocol (ICMP)

1 Introduction

In systems called CateNet, IP protocol is used as a host to the host's datagram. Network connection devices are called gateways. These gateways exchange information for control through gateway to gateway protocol (GGP). Typically, the gateway or destination host will communicate with the source host, for example, an error in the data report during the report. For this purpose, ICMP is used. It uses IP to do the underlying support, as if it is a high-level protocol, and in fact it is part of IP, it must be implemented by other IP modules.

ICMP messages are sent in the following cases: When the datagram cannot reach the destination, when the gateway has lost the cache function, when the gateway can boot the host on a shorter route.

IP is not designed to be desirable to be absolutely reliable, the purpose of this protocol is to return control information when the network has problems, rather than making the IP protocol absolutely reliable, and does not guarantee the data report or control information to return. Some datagrams will still be lost without any reports. The upper protocol must use its own error control program to determine if the communication is correct.

ICMP information usually reports an error in the processing datagram. To avoid information without restrictions, the ICMP message will not be individually transmitted, and the ICMP information is transmitted only when the processing data report is 0.

2. Message format

The ICMP message is sent in a basic IP header. The first byte of the data is an ICMP type field; this domain value determines the format of the remaining data. Any domain labeled "unused" is for future reservations, and must be all 0 during transmission. Unless in individual formats, the Baotou domain is in the following format:

Version: 4

IHL: The internet header size is in units of 32.

Service type: 0

Total length: Leather length and data length.

The identity used in the segment, the paragraph offset: is used in the segment.

Survival period: In seconds, this domain is reduced at each machine to handle datagrams, this value must be greater than the time to transfer its gateway.

Agreement: ICMP = 1

Baotou check code: 16-bit data reverse code and rework. To calculate the check code, this domain should be 0. In the future, this domain can be replaced.

Source address: Create an ICMP information gateway or host address unless it is explained, it can be any gateway address.

Destination address: Information The gateway or host address to be sent.

3. Not reached destination information

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - - - - - - - - - - - - - - - - | Type | Code | Check code | - - - - - - - - - - - - - - - - - | Unused | - - - - - - - - - - - - - - - - - - - - - - - - - - | Internet header data sources report | - - - - - - - - - - - - - - - - - Figure 1

IP domain: destination address, sending the network address of the original datagram data

ICMP domain:

Type: 3

Code:

0 = network is not arrogant;

1 = The host is not up to;

2 = Agreement is not available;

3 = port is not arrival;

4 = Need segment and DF settings;

5 = source routing failed;

Check code: 16-bit data (starting from the ICMP type), the reverse code and rework. To calculate the check code, the check code domain should be zero. These zeros will be replaced by the check code in the future.

Internet Baotou Source Datasheet:

The Internet Baotou plus the head 64 bit of the source data. This data is used to match the host matching information to the corresponding process. If the high-level protocol uses the port number, it should assume that it is in the first 64 bytes of the source data.

Description:

The routing table corresponding to the gateway, if the network specified in the destination domain is not arrogant, if the network distance is unlimited, the gateway will send a dedicated to the host of the host data. Moreover, in some networks, the gateway has the ability to determine whether the host is up to. If the destination is unreachable, it will send an irreparable information to the host of the transmitted source data.

At the destination host, if the IP module is unavailable because the specified protocol module and the process port are not available, the destination host will send an unreachable information to the host of the source data.

Another situation is that when the datagram must be segmented, the "Inseparable" bit is opened, in which case the gateway must discard this datagram and send it to the host of the transmitted source data. Codes 0, 1, 4, and 5 are transmitted by the gateway, and code 2 and 3 are transmitted by the host.

4. Timeout information

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - - - - - - - - - - - - - - - - | Type | Code | Check code | - - - - - - - - - - - - - - - - - | Unused | - - - - - - - - - - - - - - - - - - - - - - - - - - | Internet header data sources report | - - - - - - - - - - - - - - - - -

Figure 2

IP domain:

Destination address: obtained from source data newspapers data.

ICMP domain:

Type: 11

Code:

0 = Transfer timeout;

1 = Segment stage dressing timeout.

Check code: 16-bit data (starting from the ICMP type), the reverse code and rework. To calculate the check code, the check code domain should be zero. These zeros will be replaced by the check code in the future.

Internet Baotou 64 Bit Source Data Newspaper: The Internet Baotou plus the head 64 bits of the source data. This data is used to match the host matching information to the corresponding process. If the high-level protocol uses the port number, it should be assumed to be in the 64 bytes of the source data.

Description:

If the gateway finds that the living cycle domain is zero at the time of processing the data report, this datagram must abandon. The gateway must notify the source host through the timeout information.

This data report must be discarded if the host is assembled during the assembly segmentation. The gateway sends timeout information.

If the paragraph zero is not available, you don't have to send timeout information.

Code 0 is sent by the gateway, and the code 1 is transmitted by the host.

5. Parameter problem message

0 1 2 30 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - | type | Code | check code | - - - - - - - - - - - - - - | Pointer | Unused | - - - - - - - - - - - - - - - - - - - | Internet Baotou 64-bit source Data News Data | - - - - - - - - - -

Figure 3

IP domain:

Destination address: obtained from source data.

ICMP domain:

Type: 12

Code:

0 = The pointer points to the error.

Check code: 16-bit data (starting from the ICMP type), the reverse code and rework. To calculate the check code, the check code domain should be zero. These zeros will be replaced by the check code in the future.

pointer

If Code = 0, point to a problem with a problem.

Internet Baotou 64-bit source Data Newspaper data: Internet Baotou 64-bit source Data Newspaper data: Internet Balance plus the head 64 bits of source data. This data is used to match the host matching information to the corresponding process. If the high-level protocol uses the port number, it should be assumed to be in the 64 bytes of the source data.

Description:

If the net or the host finds that the header parameter is wrong when the data is processed, it must abandon this datagram. A potential reason can be a variable error. The gateway or host will notify the source host through the parameter problem message, which is only sent when the message is abandoned. The pointer points to the discovery of the wrong data report header byte.

Code: Receive 0 from the host or gateway.

6. Source congestion message

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - - - - - - - - - - - - - - - - | Type | Code | Check code | - - - - - - - - - - - - - - - - - | Unused | - - - - - - - - - - - - - - - - - - - - - - - - - - | Internet header 64 bits of the original datagram data | - - - - - - - - - - - - - - - - - Figure 4

IP domain:

Destination address: Address and source network of source data newspapers.

ICMP domain:

Type: 4

Code: 0

Check code: 16-bit data (starting from the ICMP type), the reverse code and rework. To calculate the check code, the check code domain should be zero. These zeros will be replaced by the check code in the future.

Internet Baotou 64-bit source Data Newspaper data: Internet Baotou 64-bit source Data Newspaper data: Internet Balance plus the head 64 bits of source data. This data is used to match the host matching information to the corresponding process. If the high-level protocol uses the port number, it should be assumed to be in the 64 bytes of the source data.

Description:

If there is no buffering, the gateway will discard the datagram. If the gateway is done, it will send a source congestion message to the send host. If the received data report is too much unable to process, the destination host will also send the corresponding message to the sending host. This message requires sending a transmission rate to reduce the transmission rate, and the gateway returns the source congestion message to each abandoned message. After receiving this message, the sending host should reduce the transmission rate until the gateway is not received. Source congestion message. After that, the source host can increase the transmission rate until the source conglings message of the destination host is received.

The gateway or host will not wait until the limit is exceeded, but it is time to send this message when it is close to its own processing limit, which means that the data report that initiates the source congestion message can still be handled. Code: Receive 0 from the host or gateway.

Redirect message

0 1 2 30 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - | type | Code | check code | - - - - - - - - - - - - - - - - - - - - - | gateway Internet address | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Internet header 64 bits of the original datagram data | - - - - - - - - - - - - - - -

Figure 5

IP domain:

Destination address: Address and source network of source data newspapers.

ICMP domain:

Type: 5

Code:

0 = Redirect the network data report;

1 = Redirect the data report;

2 = Detailed duplicate network and service types;

3 = Redirect the network and host types of datagrams.

Check code:

16-bit data (starting from the ICMP type) reverse code and rework. To calculate the check code, the check code domain should be zero. These zeros will be replaced by the check code in the future.

Gateway Internet Address:

The gateway address (which is specified in the Internet Data Network Domain of Source Data).

Internet Baotou 64-bit source Data News Data:

Internet Baotou 64 Bit Source Data Newspaper: The Internet Baotou plus the head 64 bits of the source data. This data is used to match the host matching information to the corresponding process. If the high-level protocol uses the port number, it should be assumed to be in the 64 bytes of the source data.

Description:

The gateway sends a redirected message in the case. The gateway (G1) receives a datagram from the network connected to the gateway, which checks the routing table to get the address (x) of the next gateway (G2). If G2 and the specified receiving host are issued on the same network, the redirect message is issued. This message is recommended to send the host directly to the gateway G2, because this is closer, and the gateway G1 continues to send this datagram. Because the IP source routing in the datagram is optional, even better routes can sometimes be discovered. Code: The gateway sends 0, 1, 2, and 3.

7. Return or return response message

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - - - - - - - - - - - - - - - - | Type | Code | Check code | - - - - - - - - - - - - - - - - - | Identifier | Serial number | - - - - - - - - - - - - - - - - | Data ..... | - - - - - - - - - -

Figure 6

IP domain:

address:

The source address of the return message is the destination address of the return response message. To form a feedback response message, the source and destination address should be exchanged, change the type code to 0, and reconstitute check code.

IP domain:

Types of:

8 represents the return message;

0 represents the return response message.

Code: 0

Check code:

16-bit data (starting from the ICMP type) reverse code and rework. To calculate the check code, the check code domain should be zero. These zeros will be replaced by the check code in the future.

Identifier: If code = 0, the code that helps match the feedback and returning response can be 0.

Sequence code: If code = 0, the sequence code that helps match the feedback and the return response can be 0.

Note: The message received in the return message should return in the returning response message. The identifier and sequence codes are used by the return sender to help match the response request. Code: Collect 0 from the host or gateway.

8. Time stamp and timestamp response message

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - - - - - - - - - - - - - - - - | Type | Code | Check code | - - - - - - - - - - - - - - - - - | Identifier | Serial number | - - - - - - - - - - - - - - - - - - - - - - - - - - - | original timestamp | - - - - - - - - - - - - - - - - - - | Receive time stamp | - - - - - - - - - - - - - - - - - - - - - | Transfer 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, the source and destination address should be exchanged, change the type code to 14, re-press the computer check code. IP domain:

Types of:

13 represents timestamp messages;

14 represents the timestamp response message.

Code: 0

Check code:

16-bit data (starting from the ICMP type) reverse code and rework. To calculate the check code, the check code domain should be zero. These zeros will be replaced by the check code in the future.

Identifier: If code = 0, the code to help match the timestamp and timestamp response can be 0.

Sequence code: If code = 0, help match the timestamp and timestamp response can be 0.

Description:

The received timestamp is attached to the response, and the time is called unit calculation in one million, and the time is started at midnight at midnight. The original timestamp is the time before the sender is sent. The reception timestamp is the time received by the sender, and the transmission time is the time transmitted by the sender.

If the time is invalid in one million seconds, or if it is not available, it can be filled in the data in the high byte of the timestamp to indicate that this is not standard data. The identifier and sequence code are in response to the request of the sender. Code: Receive 0 from the host or gateway.

9. Information request or information response message

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - - - - - - - - - - - - - - - - | Type | Code | Check code | - - - - - - - - - - - - - - - - - | Identifier | Serial number | - - - - - - - - - - - - - - - -

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, the source and destination address should be exchanged, change the type code to 16, and re-compute the check code.

IP domain:

Types of:

15 Representative information request message;

16 represents a message response message.

Code: 0

Check code:

16-bit data (starting from the ICMP type) reverse code and rework. To calculate the check code, the check code domain should be zero. These zeros will be replaced by the check code in the future.

Identifier: If code = 0, the code that helps match the information request and the information response can be 0. Sequence code: If code = 0, the code to help match the information request and the information response can be 0.

Description:

This message can be sent in a source network address in the IP header, but at the same time, the destination address domain is 0 (which means this network). Responding to the IP module should send a fully specified address response. Send this message is a way that the host finds your own network number. The identifier and sequence code are in response to the sender's matching request. Code: Receive 0 from the host or gateway.

Message Type Summary

0 return response

3 purposes not

4th congestion

5 redirection

8-return

11 times

12 parameter problem

13 time stamp

14 time stamp response

15 information request

16 information response

转载请注明原文地址:https://www.9cbs.com/read-10991.html

New Post(0)