Method for detecting Path MTU and node equipment

By shaking the TCP handshake with the peer node device to determine the MSS value and sending a specific message, the maximum non-shattered TCP MSS of the link is detected, which solves the problem of data packet sharding caused by improper negotiation of TCP MSS, and improves the reliability and efficiency of data transmission.

CN119996332APending Publication Date: 2025-05-13NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510221066.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In the TCP protocol, if the switch or intermediate link gateway does not modify the TCP MSS in the link, it may lead to data packet sharding, reorganization, shard loss and inconsistent arrival order of shard packets, reducing link transmission efficiency.

Method used

The first maximum message segment size MSS value is determined by the TCP handshake message with the peer node device, and a matching message and ACK+PUSH message are sent to the peer node device, and a feedback message is received to determine the Path MTU.

Benefits of technology

Effectively detect the true maximum non-shattering TCP MSS of the overall link, avoid data packet sharding, and improve the reliability and robustness of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996332A_ABST
    Figure CN119996332A_ABST
Patent Text Reader

Abstract

The present specification provides a method and node device for detecting a Path MTU, the method comprising: determining a first maximum message segment size (MSS) value through a TCP handshake message with an opposite end node device, sending a first message matching the first MSS value to the opposite end node device, and sending a first ACK + PUSH message to the opposite end node device, the first ACK + PUSH message carrying the first MSS value, and receiving a feedback message sent by the opposite end node equipment for the first ACK + PUSH message, and when the feedback message carries the first MSS value, determining the Path MTU according to the first MSS value. Through the method, fragmentation and recombination of the intermediate link can be reduced, and the transmission efficiency of the whole link is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method and node device for detecting Path MTU. Background Art

[0002] TCP: TCP (Transmission Control Protocol) Transmission Control Protocol; TCP is a connection-oriented, reliable transport layer protocol. It is used to segment and manage data transmitted over the network to ensure that the data arrives at the destination intact and in order. The TCP protocol is widely used in data transmission scenarios that require high reliability, such as World Wide Web browsing, email, and file transfer.

[0003] MTU: MTU (Maximum Transmission Unit) Maximum Transmission Unit; MTU refers to the maximum data packet size transmitted in the network, in bytes. The size of MTU limits the maximum number of bytes that the network layer can transmit in a single data frame. Choosing a suitable MTU value is important for performance optimization and reducing segmentation overhead. On Ethernet, the commonly used MTU value is 1500 bytes.

[0004] Path MTU: Path MTU (Path Maximum Transmission Unit) refers to the maximum data packet size that can be carried between the source host and the destination host in the network path.

[0005] TCP MSS: TCP MSS (TCP Maximum Segment Size); TCP MSS is the number of bytes of the maximum data segment negotiated by TCP through the SYN packet option during connection establishment, excluding the TCP and IP headers. MSS is negotiated and determined by the two ends initiating the connection to ensure that IP fragmentation will not occur during the transmission process, which is beneficial to optimize network performance. Usually, the value of MSS is MTU minus the size of IP and TCP headers (usually 40 bytes). Background of the invention and the closest prior art.

[0006] TCP is a connection-oriented, reliable transport layer protocol, widely used in data transmission scenarios that require high reliability. When using the TCP protocol to transmit data packets, a parameter needs to be confirmed: TCP MSS; TCP MSS can be adjusted by the TCP sender and receiver and the gateway device of the entire link, and the minimum MSS in the handshake between the two parties is ultimately determined. However, if there are switches in some links or the intermediate link gateway does not modify the TCP MSS, the TCP MSS negotiated by the TCP parties may still be greater than the maximum TCP MSS of the entire link. If data packets are actually transmitted, there may be problems such as message fragmentation, reassembly, fragment loss, and inconsistent arrival order of fragmented messages, which directly lead to technical problems such as reduced overall link transmission efficiency. Summary of the invention

[0007] To overcome the problems existing in the related art, this specification provides a method and node device for detecting Path MTU.

[0008] According to a first aspect of an embodiment of this specification, a method for detecting Path MTU is provided, the method being applied to a local node device, the method comprising:

[0009] Determine a first maximum segment size MSS value through a TCP handshake message with a peer node device;

[0010] Sending a first message matching the first MSS value to the opposite node device, and sending a first ACK+PUSH message to the opposite node device, where the first ACK+PUSH message carries the first MSS value;

[0011] A feedback message sent by the opposite node device in response to the first ACK+PUSH message is received, and when the feedback message carries the first MSS value, a Path MTU is determined according to the first MSS value.

[0012] The determining of the first maximum message segment size MSS value through a TCP handshake message with the peer node device includes:

[0013] Receive a first TCP handshake message sent by the opposite node device;

[0014] Obtain a TCP Option field in the first TCP handshake message, and when the TCP Option field carries an identifier for indicating a negotiated MSS value, obtain a second MSS value carried in the TCP Option field;

[0015] The received second MSS values ​​and the MSS value of the local node device are screened to obtain the smallest MSS value as the first MSS value.

[0016] The determining of the first maximum message segment size MSS value through a TCP handshake message with the peer node device includes:

[0017] A second TCP handshake message is sent to the opposite node device, wherein the TCP Option field of the second TCP handshake message carries an identifier for indicating the negotiated MSS value and the MSS value of the local node device, so that the opposite node device determines the first MSS value according to the MSS value of the local node device.

[0018] The sending a first message matching the first MSS value to the opposite node device includes:

[0019] The outer IP packet of the TCP data segment of the first packet is marked as not fragmentable.

[0020] The packet length of the first ACK+PUSH message is smaller than the packet length of the first message.

[0021] wherein, a feedback message sent by the opposite node device for the first ACK+PUSH message is received, and when the feedback message also carries the first identifier, the local node device reduces the first MSS value according to a preset ratio to obtain a reduced third MSS value, and executes sending a first message matching the third MSS value to the opposite node device, and sending a third ACK+PUSH message to the opposite node device, wherein the third ACK+PUSH message carries the third MSS value;

[0022] A feedback message sent by the opposite node device in response to the third ACK+PUSH message is received, and when the feedback message carries the third MSS value, a Path MTU is determined according to the third MSS value.

[0023] It can be seen from the above embodiments that by sending the determined first MSS value to the peer node device, and when the peer node feedback carries the first MSS value, the actual maximum non-fragmented TCP MSS of the entire link can be detected, ensuring that the TCP link transmits data packets without fragmentation, thereby improving the reliability and robustness of data transmission.

[0024] According to a second aspect of an embodiment of this specification, a node device is provided, the node device comprising:

[0025] An acquisition module, used to acquire a first maximum message segment size MSS value through a TCP handshake message with a peer node device;

[0026] A sending module, configured to send a first message matching the first MSS value to the opposite node device, and send a first ACK+PUSH message to the opposite node device, wherein the first ACK+PUSH message carries the first MSS value;

[0027] The receiving module is configured to receive a feedback message sent by the opposite node device in response to the first ACK+PUSH message, and when the feedback message carries the first MSS value, determine the Path MTU according to the first MSS value.

[0028] The acquisition module is specifically used to receive a first TCP handshake message sent by a peer node device, obtain a TCP Option field in the first TCP handshake message, and when the TCP Option field carries an identifier for indicating a negotiated MSS value, obtain a second MSS value carried in the TCP Option field, perform size screening on the received second MSS values ​​and the MSS value of the local node device, and obtain the smallest MSS value as the first MSS value.

[0029] Wherein, the acquisition module is also used to send a second TCP handshake message to the opposite node device, wherein the TCP Option field of the second TCP handshake message carries an identifier for indicating the negotiated MSS value and the MSS value of the local node device, so that the opposite node device determines the first MSS value according to the MSS value of the local node device.

[0030] The sending module is specifically used to set a non-fragmentable mark on the outer IP message of the TCP data segment of the first message.

[0031] The packet length of the first ACK+PUSH message is smaller than the packet length of the first message.

[0032] The receiving module is further configured to receive a feedback message sent by the opposite node device for the first ACK+PUSH message. When the feedback message also carries the first identifier, the local node device reduces the first MSS value according to a preset ratio to obtain a reduced third MSS value, and enables the sending module to send the first message matching the third MSS value to the opposite node device, and send a third ACK+PUSH message to the opposite node device, wherein the third ACK+PUSH message carries the third MSS value.

[0033] The receiving module is configured to receive a feedback message sent by the opposite node device in response to the third ACK+PUSH message, and when the feedback message carries the third MSS value, determine the Path MTU according to the third MSS value.

[0034] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.

[0036] Figure 1 It is a logical schematic diagram of a method for detecting Path MTU according to an exemplary embodiment of this specification.

[0037] Figure 2 This is a schematic diagram of the interaction of a TCP path mtu shown in this specification according to an exemplary embodiment. DETAILED DESCRIPTION

[0038] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.

[0039] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0040] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0041] Currently, RFC1191 defines a mechanism for detecting the minimum TCP MSS of the entire link, that is, the maximum non-fragmented TCP PATH MTU of the entire link; the details are as follows:

[0042] (1) The TCP source sets the DF (do not fragment) mark in the outer IP packet of the TCP data segment it sends.

[0043] (2) If the outbound interface MTU value of a router on the TCP path is smaller than the length of the IP message, the message will be discarded and an ICMP error message will be sent to the TCP source, which will carry the outbound interface MTU value.

[0044] (3) The TCP source end can find out the current minimum one-way MTU value on the TCP path by parsing the ICMP error message.

[0045] (4) The length of the subsequent data segment sent by the TCP source does not exceed the MSS. MSS = minimum MTU value - IP header length - TCP header length.

[0046] When the MSS has reached the minimum 32 bytes specified by the system, if an ICMP error message that reduces the MSS is received again, the system will allow the message sent by the TCP connection to be fragmented.

[0047] The router that generates the ICMP error message may not support RFC 1191. The outbound interface MTU field value in the ICMP error message it generates is 0. For this kind of message, the TCP source will obtain a value smaller than the current path MTU according to the MTU table specified in RFC 1191 as the basis for calculating the TCP MSS. The contents of the MTU table are (in bytes): 68, 296, 508, 1006, 1280, 1492, 2002, 4352, 8166, 17914, 32000, 65535 (Since the system specifies the minimum TCP MSS as 32, the corresponding minimum MTU is actually 72 bytes).

[0048] The aging mechanism of Path MTU is as follows:

[0049] When the TCP source receives the ICMP error message, in addition to reducing the PATH MTU value, it also starts an aging timer for the PATH MTU value.

[0050] When the timer expires, the system will increase the MSS value of TCP in sequence according to the MTU table specified in RFC 1191.

[0051] If no ICMP error message is received within 2 minutes after the MSS is increased, the MSS will continue to increase until it reaches the MSS value announced by the peer during the TCP three-way handshake phase.

[0052] From the above content, it can be seen that the detection of TCP PATH MTU depends on each gateway node of the entire link to respond to the corresponding ICMP error message. If there are devices that do not respond to ICMP error messages, such as routers and switches, it is necessary to continue the detection through timeout waiting. For large or extra-large networks, the timeout waiting time will be long, which will affect business processing.

[0053] To solve the above technical problems, the present disclosure provides a method for detecting Path MTU, which is applied to a local node device, such as Figure 1 As shown, the method includes:

[0054] S101 determines a first maximum segment size MSS value through a TCP handshake message with a peer node device;

[0055] S102: sending a first message matching the first MSS value to the opposite node device, and sending a first ACK+PUSH message to the opposite node device, where the first ACK+PUSH message carries the first MSS value;

[0056] S103: receiving a feedback message sent by the opposite node device in response to the first ACK+PUSH message, and when the feedback message carries the first MSS value, determining the Path MTU according to the first MSS value.

[0057] Through the technical solution provided by the present disclosure, when ICMP error information cannot be sent stably in the intermediate link, it is not necessary to wait for a long time to obtain the minimum TCP MSS of the entire link, that is, PATH MTU.

[0058] At the same time, through the technical solution provided by the present invention, it is possible to no longer rely on the ICMP error messages replied by the intermediate link gateway devices to adjust the maximum non-fragmented TCP PATH MTU between the TCP Client and the TCP Server; instead, the maximum non-fragmented Path MTU of the entire link is confirmed by sending non-fragmented TCP messages of real length.

[0059] Specifically, when executing step S101, the local node device can receive the first TCP handshake message sent by the opposite node device, obtain the TCP Option field in the first TCP handshake message, and when the TCP Option field carries an identifier for indicating the negotiated MSS value, obtain the second MSS value carried in the TCP Option field, perform size screening on the received second MSS values ​​and the MSS value of the local node device, and obtain the smallest MSS value as the first MSS value.

[0060] In the specific implementation, TCP negotiates the TCP MSS of both parties during the handshake phase. Both parties carry the TCP Option: Maximum Segment Size. After the handshake is successful, the minimum value is taken, which is the maximum MSS of the subsequent messages sent.

[0061] To implement the technical solution in this disclosure, this disclosure defines TCP Option, which is as follows:

[0062] Kind: 252 (random and non-repeating); definition name: Path MTU Disc; length 1 byte;

[0063] Length: 6; length 1 byte;

[0064] Send value: The TCP MSS of the message sent by the sender this time, length 2 bytes;

[0065] Receive value: The TCP MSS of the message received by the sender this time, with a length of 2 bytes.

[0066] Among them, Kind is used to represent the identifier of the negotiated MSS value, that is, when each node device in the network agrees to receive a message carrying the agreed Kind value, it means that the technical solution in the present disclosure is executed.

[0067] In executing step S101, it is defined that the two parties of TCP negotiation carry the above-defined Option during handshake, indicating that both parties support this capability: if only one party supports this capability, it falls back to the original TCP Path MTU detection (that is, it is performed in the current way); if both parties support this capability, the maximum non-fragmented TCP pathmtu of the link is detected according to steps S101-S103.

[0068] At the same time, the local node device can send a second TCP handshake message to the opposite node device, wherein the TCP Option field of the second TCP handshake message carries an identifier for indicating the negotiated MSS value and the MSS value of the local node device, so that the opposite node device determines the first MSS value according to the MSS value of the local node device.

[0069] In executing step S102, the TCP source end (ie, the local node device) sets a DF (do not fragment) mark on the outer IP packet of the TCP data segment sent.

[0070] The local node device can construct a first message according to the first MSS value, for example, create a first message according to the first MSS value, wherein the message content of the first message is set to all 0s. At the same time, when sending the first message, the local node device also sends a first ACK+PUSH message to the opposite node device, and the first ACK+PUSH message carries the TCP Option defined above, wherein the TCP Option carries the first MSS value (in other examples, it may also carry the PathMTU determined according to the first MSS value).

[0071] In this embodiment, the packet size of the first ACK+PUSH message is smaller than the first message, that is, the first message sent by the local node device to the opposite node device is a large packet message (the packet size corresponds to the first MSS value), and the first ACK+PUSH message is a small packet message.

[0072] By sending the above two messages, the peer node device may feedback two results:

[0073] First, when the opposite node device can process the first message and the first ACK+PUSH message, it parses the corresponding MssAck Option. If it finds that the corresponding first message is received, it means that the TCP message of this length can be completely transmitted in the overall link. This first MSS is used as the maximum non-fragmentable TCP Path MTU of the link. Then, a feedback message is sent in response to the first ACK+PUSH message, carrying the TCP Path MTU received this time. At the same time, the opposite node device may not send the first message to the application layer to avoid wasting device resources or causing the device to misprocess the first message.

[0074] Secondly, when the opposite node device can process the first message and the first ACK+PUSH message, it parses the corresponding MssAck Option. If it finds that the corresponding first message is not received, it means that the Path of the overall link is too large, so that the opposite node device cannot process the first message, and MTU adjustment is required; the opposite node device does not perform TCP packet loss retransmission confirmation, and directly responds to the local node device by sending a feedback message, carrying the TCP path mtu received this time, and carrying a first identifier, where the first identifier is used to inform the local node device that MTU adjustment is required. For example, the first identifier can be represented by 0.

[0075] In step S103, after receiving the feedback message sent by the peer node device, the local node parses the Option carried in the feedback message. When the Option in the feedback message carries the first MSS value, for example, the Mss Ack in the Option carries the first MSS value, it indicates that the maximum non-fragmented MSS in the TCP link has been detected as the first MSS value, and the local node device can determine the Path MTU according to the first MSS value. If the feedback message carries a first identifier (for example, 0), it indicates that the first MSS value (MTU) needs to be adjusted (reduced), and the adjustment ratio can be defined by the administrator, for example, refer to the content of RFC1911 for decremental detection: 68, 296, 508, 1006, 1280, 1492, 2002, 4352, 8166, 17914, 32000, 65535.

[0076] In this embodiment, when the MSS has reached the minimum 32 bytes specified by the system, if the entire link still cannot remain unfragmented, the system will allow the message sent by the TCP connection to be fragmented.

[0077] Through the above embodiments, the maximum non-fragmented TCP pathmtu of the link between the TCP client and the server can be detected; the client and the server will cache this value, and the lifetime of the maximum non-fragmented TCP pathmtu of the link can be set according to the actual environment. Within the defined aging time, the TCP MSS carried in the first handshake of the subsequent TCP connection is the value of this detection.

[0078] Based on the above embodiments, the present disclosure provides an example of detecting Path MTU between Client and Server. Figure 2 As shown:

[0079] The TCP-Client (local node device) and the TCP Server (opposite node device) determine the first MSS value through handshake. The specific double-send handshake message carries their respective MSS values. Both parties select the smallest one from their own and received MSS as the first MSS value.

[0080] After the handshake is completed, the first MSS value is determined, and the local node device starts sending packets to test the minimum Path MTU of the link, that is, simulating the first message and the first ACK+PUSH message to be sent to the TCP Server.

[0081] The TCP-Client receives the feedback message sent by the TCP Server (the feedback message is the ACK+PUSH message sent by the TCP Server to the TCP-Client), and determines the Path MTU according to the content carried in the feedback message, or further adjusts the first MSS and repeats the above detection process.

[0082] It can be seen from the above embodiments that by detecting the true maximum non-fragmented TCP MSS of the entire link, it is ensured that the TCP link transmits data packets without fragmentation, thereby improving the reliability and robustness of data transmission. At the same time, the problem of link performance degradation caused by the fragmentation and reassembly of TCP data packets is avoided.

[0083] Based on the above method embodiments, the present disclosure further provides a node device, which includes:

[0084] An acquisition module, used to acquire a first maximum message segment size MSS value through a TCP handshake message with a peer node device;

[0085] A sending module, configured to send a first message matching the first MSS value to the opposite node device, and send a first ACK+PUSH message to the opposite node device, wherein the first ACK+PUSH message carries the first MSS value;

[0086] The receiving module is configured to receive a feedback message sent by the opposite node device in response to the first ACK+PUSH message, and when the feedback message carries the first MSS value, determine the Path MTU according to the first MSS value.

[0087] The acquisition module is specifically used to receive a first TCP handshake message sent by a peer node device, obtain a TCP Option field in the first TCP handshake message, and when the TCP Option field carries an identifier for indicating a negotiated MSS value, obtain a second MSS value carried in the TCP Option field, perform size screening on the received second MSS values ​​and the MSS value of the local node device, and obtain the smallest MSS value as the first MSS value.

[0088] Wherein, the acquisition module is also used to send a second TCP handshake message to the opposite node device, wherein the TCP Option field of the second TCP handshake message carries an identifier for indicating the negotiated MSS value and the MSS value of the local node device, so that the opposite node device determines the first MSS value according to the MSS value of the local node device.

[0089] The sending module is specifically used to set a non-fragmentable mark on the outer IP message of the TCP data segment of the first message.

[0090] The packet length of the first ACK+PUSH message is smaller than the packet length of the first message.

[0091] The receiving module is further configured to receive a feedback message sent by the opposite node device for the first ACK+PUSH message. When the feedback message also carries the first identifier, the local node device reduces the first MSS value according to a preset ratio to obtain a reduced third MSS value, and enables the sending module to send the first message matching the third MSS value to the opposite node device, and send a third ACK+PUSH message to the opposite node device, wherein the third ACK+PUSH message carries the third MSS value.

[0092] The receiving module is configured to receive a feedback message sent by the opposite node device in response to the third ACK+PUSH message, and when the feedback message carries the third MSS value, determine the Path MTU according to the third MSS value.

[0093] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0094] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0095] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention claimed herein. The specification is intended to cover any variations, uses or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not claimed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.

[0096] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

[0097] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A method for detecting a path maximum transmission unit Path MTU, characterized in that: The method is applied to a local node device, and the method includes: Determine a first maximum segment size MSS value through a TCP handshake message with a peer node device; Sending a first message matching the first MSS value to the opposite node device, and sending a first ACK+PUSH message to the opposite node device, where the first ACK+PUSH message carries the first MSS value; A feedback message sent by the opposite node device in response to the first ACK+PUSH message is received, and when the feedback message carries the first MSS value, a Path MTU is determined according to the first MSS value.

2. The method according to claim 1, characterized in that The determining of the first maximum message segment size MSS value through a TCP handshake message with the opposite node device includes: Receive a first TCP handshake message sent by the opposite node device; Obtain a TCP Option field in the first TCP handshake message, and when the TCP Option field carries an identifier for indicating a negotiated MSS value, obtain a second MSS value carried in the TCP Option field; The received second MSS values ​​and the MSS value of the local node device are screened to obtain the smallest MSS value as the first MSS value.

3. The method according to claim 1, characterized in that The determining of the first maximum message segment size MSS value through a TCP handshake message with the opposite node device includes: A second TCP handshake message is sent to the opposite node device, wherein the TCP Option field of the second TCP handshake message carries an identifier for indicating the negotiated MSS value and the MSS value of the local node device, so that the opposite node device determines the first MSS value according to the MSS value of the local node device.

4. The method according to claim 1, characterized in that: The sending a first message matching the first MSS value to the opposite node device includes: The outer IP packet of the TCP data segment of the first packet is marked as not fragmentable.

5. The method according to claim 1, characterized in that The packet length of the first ACK+PUSH message is smaller than the packet length of the first message.

6. The method according to claim 1, characterized in that receiving a feedback message sent by the opposite node device in response to the first ACK+PUSH message, and when the feedback message also carries the first identifier, the local node device reduces the first MSS value according to a preset ratio to obtain a reduced third MSS value, and executes sending the first message matching the third MSS value to the opposite node device, and sending a third ACK+PUSH message to the opposite node device, wherein the third ACK+PUSH message carries the third MSS value; A feedback message sent by the opposite node device in response to the third ACK+PUSH message is received, and when the feedback message carries the third MSS value, a Path MTU is determined according to the third MSS value.

7. A node device, characterized in that: The node device comprises: An acquisition module, used to acquire a first maximum message segment size MSS value through a TCP handshake message with a peer node device; A sending module, configured to send a first message matching the first MSS value to the opposite node device, and send a first ACK+PUSH message to the opposite node device, wherein the first ACK+PUSH message carries the first MSS value; The receiving module is configured to receive a feedback message sent by the opposite node device in response to the first ACK+PUSH message, and when the feedback message carries the first MSS value, determine the Path MTU according to the first MSS value.

8. The node device according to claim 7, characterized in that: The acquisition module is specifically used to receive a first TCP handshake message sent by the opposite node device, obtain a TCP Option field in the first TCP handshake message, and when the TCP Option field carries an identifier for indicating a negotiated MSS value, obtain a second MSS value carried in the TCP Option field, perform size screening on the received second MSS values ​​and the MSS value of the local node device, and obtain the smallest MSS value as the first MSS value.

9. The node device according to claim 7, characterized in that: The acquisition module is further used to send a second TCP handshake message to the opposite node device, wherein the TCP Option field of the second TCP handshake message carries an identifier for indicating the negotiated MSS value and the MSS value of the local node device, so that the opposite node device determines the first MSS value according to the MSS value of the local node device.

10. The node device according to claim 7, characterized in that: The sending module is specifically used to set a non-fragmentable mark on the outer IP message of the TCP data segment of the first message.

11. The node device according to claim 7, characterized in that: The packet length of the first ACK+PUSH message is smaller than the packet length of the first message.

12. The node device according to claim 7, characterized in that The receiving module is further configured to receive a feedback message sent by the opposite node device in response to the first ACK+PUSH message. When the feedback message also carries the first identifier, the local node device reduces the first MSS value according to a preset ratio to obtain a reduced third MSS value, and enables the sending module to send the first message matching the third MSS value to the opposite node device, and send a third ACK+PUSH message to the opposite node device, wherein the third ACK+PUSH message carries the third MSS value. The receiving module is configured to receive a feedback message sent by the opposite node device in response to the third ACK+PUSH message, and when the feedback message carries the third MSS value, determine the Path MTU according to the third MSS value.