Method for determining packet loss rate, network device, storage medium and program product

By sending probe packets with sequence numbers that are not equal to the target sequence number through the network device at the probe end, the destination end is prompted to reply with the SACK option packet by packet. This solves the problem that existing technologies cannot accurately measure the packet loss rate of one-way links, and achieves accurate measurement at low cost.

CN121603409APending Publication Date: 2026-03-03HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411149820.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing technologies cannot accurately measure the packet loss rate of unidirectional links, and existing active measurement methods require the deployment of dedicated packet loss rate measurement functions at the destination, resulting in high deployment costs or making them impossible to implement.

Method used

By sending TCP synchronization request messages to the destination via the network device at the probe end, and after establishing a TCP connection, sending probe messages with sequence numbers that are not equal to the target sequence number, the destination end is prompted to reply with selective acknowledgment (SACK) response messages packet by packet. The range of non-continuous data segments indicated in the response messages is analyzed to accurately determine the packet loss rate of the one-way link.

Benefits of technology

It enables accurate determination of unidirectional link packet loss rate at the detection end, reduces deployment costs, is applicable to a wide range of network device types, and eliminates the need to deploy a dedicated packet loss rate measurement function at the destination end.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121603409A_ABST
    Figure CN121603409A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method for determining a packet loss rate, network equipment, a storage medium and a program product, and belongs to the technical field of communication. In the method, first network equipment serving as a detection end sends a TCP synchronization request message to second network equipment serving as a destination end, and the TCP synchronization request message comprises an initial serial number, so that TCP connection with the second network equipment is established through the TCP synchronization request message. After the TCP connection is established, the first network equipment sends a plurality of detection messages to the second network equipment in sequence, and the serial number in the first sent detection message is not equal to the sum of the initial serial number and 1, so that the second network equipment can be stimulated to reply a response message comprising an SACK option for each detection message. And the SACK option in the response message can indicate the serial number range of the discontinuous data segment received by the second network equipment, so that the first network equipment can accurately determine the one-way link packet loss rate through the received response message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a method for determining packet loss rate, a network device, a storage medium, and a program product. Background Technology

[0002] In a network, the quality of network communication can be monitored by the packet loss rate between two network devices.

[0003] In related technologies, after a first network device (acting as the probe end) sends a probe message to a second network device (acting as the destination end), the first network device can determine the packet loss rate based on the total number of response messages from the second network device and the total number of probe messages already sent. However, the packet loss rate determined in this way is the total packet loss rate on the bidirectional link between the first and second network devices, and it cannot accurately measure the packet loss rate on a unidirectional link. Summary of the Invention

[0004] This application provides a method, network device, storage medium, and program product for determining packet loss rate, which can accurately determine the packet loss rate of a one-way link. The technical solution is as follows.

[0005] Firstly, a method for determining packet loss rate is provided. In this method, a first network device sends a Transmission Control Protocol (TCP) synchronization request message to a second network device. The TCP synchronization request message includes an initial sequence number. After establishing a TCP connection between the first and second network devices based on the TCP synchronization request message, the first network device sends multiple probe messages to the second network device. Each probe message includes a sequence number and a data segment. The sequence number indicates the starting position of the data segment in the corresponding probe message, and the sequence number in the first probe message sent is not equal to the target sequence number, which is the initial sequence number plus 1. The first network device receives at least one response message. Each response message includes a Selective Acknowledgment (SACK) option, which indicates the sequence number range of non-contiguous data segments received by the second network device. Based on the at least one response message, the first network device determines the one-way link packet loss rate, which includes the forward link packet loss rate and / or the reverse link packet loss rate. The forward link is the link from the first network device to the second network device, and the reverse link is the link from the second network device to the first network device.

[0006] In this embodiment, a first network device, acting as the probe, sends a TCP synchronization request message to a second network device, acting as the destination. The TCP synchronization request message includes an initial sequence number to establish a TCP connection with the second network device. After establishing the TCP connection, the first network device sends a series of probe messages to the second network device. The sequence number in the first probe message is not equal to the target sequence number; the target sequence number is the initial sequence number plus 1. This prompts the second network device to reply with a response message including a selective acknowledgment (SACK) option for each probe message, i.e., prompting the second network device to reply with a response message including the SACK option packet by packet. The SACK option in the response message indicates the sequence number range of non-contiguous data segments received by the second network device. Therefore, the first network device can analyze which probe messages the second network device has received by using the received response messages, and then accurately determine the one-way link packet loss rate based on the analysis results. Therefore, this application provides a scheme for accurately determining the packet loss rate of a one-way link by the probe end. This scheme can be implemented simply by the probe end designing the sequence number in the first probe message based on the initial sequence number. There is no need to deploy a dedicated packet loss rate measurement function at the destination end. Therefore, the deployment cost is low and the application range is wide.

[0007] Based on the method provided in the first aspect, in one possible implementation, the sequence number in the first probe message sent is less than the target sequence number.

[0008] When the sequence number in the first probe packet is less than the target sequence number, due to the TCP sequence number wraparound characteristic, the second network device, upon receiving this probe packet, will assume that the first network device sent a data segment with sequence numbers from the target sequence number to the maximum sequence number, and then sent a data segment with sequence numbers from 0 to the first sequence number minus 1, but the second network device did not receive either of these data segments. Therefore, the second network device will add the SACK option to its response packet to this probe packet. Furthermore, when the sequence number in the first probe packet is less than the target sequence number, regardless of the type of the second network device, the second network device can always reply with a response packet including the SACK option. Therefore, this method has virtually no requirements for the second network device and has a wide range of applications.

[0009] Based on the method provided in the first aspect, in one possible implementation, the multiple probe messages include a first probe message and a second probe message sent sequentially. The first probe message includes a first sequence number, and the second probe message includes a second sequence number. The difference between the second sequence number and the first sequence number is the length of the data segment in the first probe message.

[0010] In this embodiment, the data segments carried by multiple probe packets can be consecutive. Since the number of sequence ranges that can be carried in the SACK option is limited, such as a maximum of 4, when the data segments carried by multiple probe packets are consecutive, the SACK option can carry a wider range of sequence numbers of the most recently received non-consecutive data from the second network device. This helps the first network device to accurately analyze which probe packets the second network device has received.

[0011] Based on the method provided in the first aspect, in one possible implementation, the process by which the first network device determines the unidirectional link packet loss rate based on at least one response message is as follows: Based on the sequence number and data segment length of each of the multiple probe messages, a first sequence number range set is determined, which includes the sequence number range corresponding to the data segment of each of the multiple probe messages; based on the SACK option of each of the at least one response message and the first sequence number range set, a second sequence number range set is determined, which includes the sequence number range corresponding to the data segment of each of the at least one probe message received by the second network device; and based on the second sequence number range set, the unidirectional link packet loss rate is determined.

[0012] In this way, the first network device can analyze which probe packets the second network device has received based on the SACK option of each response packet in at least one response packet and the sequence number range corresponding to the data segment of each probe packet in multiple probe packets, thereby accurately determining the one-way link packet loss rate.

[0013] Based on the method provided in the first aspect, in one possible implementation, the process of determining the second sequence number range set based on the SACK option of each response message in at least one response message and the first sequence range set is as follows: determining the third sequence number range set, which includes the sequence number range carried by the SACK option of each response message in at least one response message; and determining the second sequence number range set based on the intersection between the first sequence number range set and the third sequence number range set.

[0014] Since the SACK option in each response message in at least one response message can indicate the sequence number range of data segments that the second network device has received, the first network device can analyze which probe messages the second network device has received based on the intersection between the first sequence number range set and the third sequence number range set.

[0015] Based on the method provided in the first aspect, in one possible implementation, the process of determining the one-way link packet loss rate based on the second sequence number range set is as follows: determine the total number of sequence number ranges in the second sequence number range set to obtain a first number; determine the total number of multiple probe packets to obtain a second number; and determine the forward link packet loss rate based on the first number and the second number.

[0016] The first network device can analyze which probe packets it has received by the second network device through the sequence number range in the second sequence number range set. Therefore, the total number of sequence number ranges in the second sequence number range set is also the first number, which can represent how many probe packets the second network device has received. Therefore, the forward link packet loss rate can be accurately determined based on the first number and the second number.

[0017] Based on the method provided in the first aspect, in one possible implementation, the process of determining the unidirectional link packet loss rate based on the second sequence range set is as follows: determine the total number of sequence ranges in the second sequence range set to obtain a first number; determine the total number of at least one response message to obtain a third number; and determine the reverse link packet loss rate based on the first number and the third number.

[0018] The first network device can analyze which probe packets the second network device has received by using the sequence number range in the second sequence number range set. The second network device will reply with a response packet for each probe packet received. Therefore, the first network device can analyze which response packets have been lost on the reverse link based on at least one received response packet. Thus, the reverse link packet loss rate can be accurately determined based on the first quantity and the third data.

[0019] Based on the method provided in the first aspect, in one possible implementation, the TCP synchronization request message further includes a first option, the value of which indicates that the first network device supports the SACK function. In this scenario, the process of establishing a TCP connection between the first and second network devices based on the TCP synchronization request message is as follows: the first network device receives a TCP synchronization acknowledgment message from the second network device, the TCP synchronization acknowledgment message including a second option, the value of which indicates that the second network device supports the SACK function.

[0020] In the above manner, the first network device can determine that both the local end and the second network device support the SACK function during the handshake process of establishing a TCP connection with the second network device, thereby realizing the method for determining the packet loss rate provided in the embodiments of this application.

[0021] Based on the method provided in the first aspect, in one possible implementation, the TCP synchronization request message further includes a first maximum segment size (MSS), which indicates the MSS supported by the first network device. In this scenario, the process of establishing a TCP connection between the first and second network devices based on the TCP synchronization request message is as follows: the first network device receives a TCP synchronization acknowledgment message from the second network device, which includes a second MSS, indicating the MSS supported by the second network device; the first network device determines the smaller of the first and second MSS as the target MSS; wherein the length of the data segment in each of the multiple probe messages is less than or equal to the target MSS.

[0022] In this way, the first network device can negotiate a MSS supported by both parties during the handshake process of establishing a TCP connection with the second network device, so as to ensure that the probe packets sent by the first network device can be correctly parsed by the second network device.

[0023] Secondly, a network device for determining packet loss rate is provided, the network device having the functionality to implement the method behavior for determining packet loss rate described in the first aspect above. The network device includes at least one module for implementing the method for determining packet loss rate provided in the first aspect above.

[0024] Thirdly, a network device is provided, the network device comprising a processor and a memory, the memory storing a program supporting the network device in executing the method for determining the packet loss rate provided in the first aspect, and storing data related to implementing the method for determining the packet loss rate provided in the first aspect. The processor is configured to execute the program stored in the memory.

[0025] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a network device, cause the network device to perform the method for determining packet loss rate described in the first aspect.

[0026] Fifthly, a computer program product containing instructions is provided, which, when run on a network device, causes the network device to perform the method for determining packet loss rate described in the first aspect.

[0027] The technical effects achieved by the corresponding technical means in the second to fifth aspects mentioned above are similar, and will not be repeated here. Attached Figure Description

[0028] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;

[0029] Figure 2 This is a schematic diagram of another application scenario provided by an embodiment of this application;

[0030] Figure 3 This is a schematic diagram of the hardware structure of a network device provided in an embodiment of this application;

[0031] Figure 4 This is a schematic diagram of the hardware structure of a switch provided in an embodiment of this application;

[0032] Figure 5 This is a flowchart illustrating a method 500 for determining packet loss rate provided in an embodiment of this application;

[0033] Figure 6 This is a schematic diagram of a three-way handshake for establishing a TCP connection, provided in an embodiment of this application.

[0034] Figure 7 This is a schematic diagram of a TCP packet format provided in an embodiment of this application;

[0035] Figure 8 This is a schematic diagram illustrating the format of a TCP synchronization request message and the first probe message sent, provided in an embodiment of this application.

[0036] Figure 9 This is a schematic diagram of a receiving buffer provided in an embodiment of this application;

[0037] Figure 10 This is a schematic diagram of a probe message and a response message provided in an embodiment of this application;

[0038] Figure 11 This is a schematic diagram of another probe message and response message provided in an embodiment of this application;

[0039] Figure 12 This is a schematic diagram of another probe message and response message provided in an embodiment of this application;

[0040] Figure 13 This is a schematic diagram of the structure of a network device for determining packet loss rate provided in an embodiment of this application. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0042] Network measurement allows for real-time detection of network congestion and identification of network performance bottlenecks, providing timely insights into network operation. As a crucial aspect of network measurement, determining link packet loss rate is essential for critical network management functions such as anomaly detection, troubleshooting, and service-level agreement (SLA) compliance monitoring.

[0043] Methods for determining link packet loss rate fall into two categories: passive measurement and active measurement. In passive measurement, devices at both ends of the tested link directly observe service traffic and calculate the packet loss rate by comparing the number of sent and received packets. In active measurement, a selected measurement point sends pre-designed probe packets to the measurement destination and receives response packets from the destination. The packet loss rate is calculated by comparing the number of sent probe packets with the number of received response packets. Passive measurement does not require injecting probe flows and does not introduce additional network load. However, passive measurement requires collecting a large amount of service traffic for analysis, which can easily lead to the leakage of user privacy data. Therefore, most solutions for determining packet loss rate employ active measurement.

[0044] In active measurement methods, the party sending the probe message is called the probe end, and the party receiving the probe message is called the destination end. Currently, active measurement methods can be divided into the following two categories:

[0045] Active Measurement Method 1: After sending probe packets to the destination, the probe notifies the destination of the total number of probe packets sent. The destination determines the packet loss rate of the unidirectional link from the probe to the destination based on the total number of received probe packets and the total number of probe packets sent by the probe, and returns the determined packet loss rate to the probe. Active Measurement Method 1 requires the deployment of corresponding packet loss measurement functionality at the destination, resulting in high deployment costs. Furthermore, if the destination is a third-party device, it may be impossible to deploy the corresponding packet loss measurement functionality at the destination, leading to packet loss measurement failure. Active Measurement Method 1 can also be referred to as a dual-end deployed active measurement method.

[0046] Active measurement method two: After the probe sends probe packets to the destination, the destination only needs to return a response packet for each received probe packet to the probe. The probe then uses the received response packets to calculate the packet loss rate. However, active measurement method two can only determine the total packet loss rate for bidirectional links and cannot accurately determine the packet loss rate for unidirectional links. Active measurement method two can also be referred to as a single-endpoint active measurement method.

[0047] Based on this, embodiments of this application provide a method for determining packet loss rate. In this method, a first network device, acting as a probe, sends a TCP synchronization request message to a second network device, acting as a destination. The TCP synchronization request message includes an initial sequence number to establish a TCP connection with the second network device. After establishing the TCP connection, the first network device sends a series of probe messages to the second network device sequentially. The sequence number in the first probe message is not equal to the target sequence number; the target sequence number is the initial sequence number plus 1. This prompts the second network device to reply with a response message including a selective acknowledgment (SACK) option for each probe message, i.e., prompting the second network device to reply with a response message including the SACK option packet by packet. The SACK option in the response message indicates the sequence number range of non-contiguous data segments received by the second network device. Therefore, the first network device can analyze which probe messages the second network device has received by the received response messages, and then accurately determine the one-way link packet loss rate based on the analysis results. Therefore, this application provides a scheme for accurately determining the packet loss rate of a one-way link by the probe end. This scheme can be implemented simply by the probe end designing the sequence number in the first probe message based on the initial sequence number. There is no need to deploy a dedicated packet loss rate measurement function at the destination end. Therefore, the deployment cost is low and the application range is wide.

[0048] The basic principle of determining the packet loss rate using the above technical solution in this application embodiment is as follows: A TCP connection is established between the first network device and the second network device through a handshake. During the first handshake, the first network device sends a TCP synchronization request message to the second network device. The TCP synchronization request includes an initial sequence number, which indicates that the sequence number in the first message sent by the first network device to the second network device after the TCP connection is established should be the initial sequence number plus 1, i.e., the target sequence number. Based on this, after the TCP connection is established between the first network device and the second network device, if the sequence number in the first probe message sent by the first network device is not equal to the target sequence number, the second network device will consider that the probe message sent by the first network device to the second network device has been lost when it receives the probe message. This results in the second network device not receiving the data segment with the sequence number between the initial sequence number and the sequence number in the first probe message. For example, if the sequence number in the first probe message is called the first sequence number, the second network device will consider that the data segment with the sequence number in the range of (initial sequence number, first sequence number) has been lost when it receives the probe message. Therefore, it will carry the SACK option in the response message corresponding to the probe message. For probe packets sent by the first network device after the initial probe packet, since the second network device has not received any data segments with sequence numbers between the initial sequence number and the sequence number in the first probe packet, the second network device will reply with a response packet for each received probe packet, and each response packet will carry the SACK option. This allows the second network device to reply with a response packet including the SACK option packet one by one.

[0049] It should be noted that, in this embodiment of the application, the serial number range (A, B) means that this serial number range does not include serial number A and serial number B. The serial number range [A, B] means that this serial number range includes both serial number A and serial number B.

[0050] Furthermore, in this application's embodiments, the unidirectional link includes a forward link and / or a reverse link. The forward link is the link from the first network device to the second network device, and the reverse link is the link from the second network device to the first network device. In scenarios where the unidirectional link includes a forward link, the first network device can accurately determine the forward link packet loss rate using the method provided in this application's embodiments. In scenarios where the unidirectional link includes a reverse link, the first network device can accurately determine the reverse link packet loss rate using the method provided in this application's embodiments. In scenarios where the unidirectional link includes both a forward link and a reverse link, the first network device can accurately determine not only the forward link packet loss rate but also the reverse link packet loss rate using the method provided in this application's embodiments.

[0051] The following section provides a detailed introduction to this technical solution from multiple perspectives, including application scenarios, hardware devices, software devices, and methodologies.

[0052] The following are examples illustrating the application scenarios of embodiments of this application.

[0053] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application. For example... Figure 1 As shown, this application scenario includes a first network device as the probe and a second network device as the destination. The first and second network devices communicate with each other via a wired or wireless connection.

[0054] In this system, a first network device establishes a TCP connection with a second network device via a handshake. During the initial handshake, the first network device sends a TCP synchronization request message to the second network device, carrying an initial sequence number. After establishing the TCP connection, the first network device sends multiple probe messages. The sequence number in the first probe message is not equal to the target sequence number; the target sequence number is the initial sequence number plus 1. This prompts the second network device to reply with a response message including the SACK option, packet by packet. When the second network device receives a probe message, it detects a discontinuous data segment in the received data segment based on the initial sequence number. Therefore, it replies with a response message carrying the SACK option. The first network device determines the one-way link packet loss rate based on at least one received response message.

[0055] Figure 1 The first network device and the second network device shown can be any type of communication device in the network. Figure 2 This is a schematic diagram of another application scenario provided by an embodiment of this application. For example... Figure 2 As shown, this application scenario mainly involves four types of communication devices: user terminals, campus switches, gateways, and application servers. Examples of each of these four types of network devices are provided below.

[0056] (1) User terminal

[0057] The user end refers to data streaming devices such as computers, laptops, or mobile phones with the application client installed.

[0058] (2) Campus Switch

[0059] Users within the park access the network through the park switch, which can aggregate all park traffic to the gateway.

[0060] (3) Gateway

[0061] A gateway is used to provide packet forwarding functionality between a local area network (LAN) and a wide area network (WAN), or between a LAN and a leased enterprise network. For example, a gateway provides a Layer 3 interface service for accessing a WAN. A gateway can be an access router (AR).

[0062] (4) Application Server

[0063] An application server refers to a server deployed in a public cloud or a data center built by the application vendor. Application servers handle traffic uploaded by users. For example, an application server might act as a cloud storage service, storing content uploaded by users. Alternatively, an application server might act as an audio / video server, forwarding audio / video streams uploaded by users, or downloading video from a video provider and returning the downloaded video to the user after receiving a video download request from a user.

[0064] exist Figure 2 In the application scenario shown, the first network device and the second network device can be any two devices capable of communicating.

[0065] For example, the first network device can be a user terminal, and the second network device can be a campus switch. In this scenario, the method provided in this application embodiment allows the user terminal to accurately determine the one-way link packet loss rate between the user terminal and the campus switch. Optionally, the first network device can be a campus switch, and the second network device can be a user terminal. In this scenario, the method provided in this application embodiment allows the campus switch to accurately determine the one-way link packet loss rate between the campus switch and the user terminal.

[0066] For example, the first network device can be a gateway, and the second network device can be an application server. In this scenario, the method provided in this application embodiment enables the gateway to accurately determine the packet loss rate of the one-way link between the gateway and the application server. Optionally, the first network device can be an application server, and the second network device can be a gateway. In this scenario, the method provided in this application embodiment enables the application server to accurately determine the packet loss rate of the one-way link between the application server and the gateway.

[0067] For example, the first network device can be a gateway, and the second network device can be a campus switch. In this scenario, the method provided in this application embodiment allows the gateway to accurately determine the packet loss rate of the one-way link between the gateway and the campus switch. Optionally, the first network device can be a campus switch, and the second network device can be a gateway. In this scenario, the method provided in this application embodiment allows the campus switch to accurately determine the packet loss rate of the one-way link between the campus switch and the gateway.

[0068] Figure 2 This example illustrates the application scenario of the first network device acting as the probe in this application embodiment. Optionally, the first network device can be a communication device in other types of communication architectures. For example, the first network device can also be a router, firewall, wireless access point, base station, industrial control computer, network storage device, IoT device (such as a smart camera), etc., which will not be listed here. In any scenario, the second network device is any device capable of communicating with the first network device.

[0069] It should be noted that in any of the above scenarios, the first network device has a transmission control protocol (TCP) stack. Through the TCP stack, the first network device can independently write and send TCP format messages, such as the aforementioned TCP synchronization request message and probe message, to implement the method for determining packet loss rate provided in the embodiments of this application.

[0070] The following provides examples illustrating the basic hardware structures involved in the embodiments of this application.

[0071] Figure 3 This is a schematic diagram of the hardware structure of a network device provided in an embodiment of this application. The network device can be, for example, a... Figure 2 The user terminal, campus switch, gateway, router, or application server in the application scenario shown can optionally be network devices from other communication scenarios, such as firewalls. Figure 3 As shown, the network device 300 includes a processor 301 and a memory 302, and the memory 301 and memory 302 are connected via a bus 303. Figure 3 The processor 301 and memory 302 are described independently. Alternatively, the processor 301 and memory 302 may be integrated together.

[0072] The memory 302 is used to store computer programs, including the operating system and program code. The memory 302 can be various types of storage media, such as ROM, RAM, EEPROM, CD-ROM, flash memory, optical storage, registers, optical disc storage, disk storage, or other magnetic storage devices.

[0073] The processor 301 is a general-purpose processor or a dedicated processor. The processor 301 may be a single-core processor or a multi-core processor. The processor 301 includes at least one circuit to perform the actions executed by the first network device in the method provided in this application embodiment. For example, the network device 300 performs the following process: determining a one-way link packet loss rate based on the at least one response message, the one-way link packet loss rate including a forward link packet loss rate and / or a reverse link packet loss rate, wherein the forward link is a link from the first network device to the second network device, and the reverse link is a link from the second network device to the first network device.

[0074] Optionally, the network device 300 further includes a network interface 304, which is connected to the processor 301 and the memory 302 via a bus 303. The network interface 304 enables the network device 300 to communicate with other communication devices to perform the send / receive operations performed by the first network device in this embodiment. Taking the network device 300 as an example... Figure 2 Taking the user terminal in the application scenario shown as an example, Figure 3 The network interface 304 communicates with the campus switch to send TCP synchronization request messages and multiple probe messages to the campus switch. The TCP synchronization request message includes an initial sequence number. Each probe message includes a sequence number and a data segment. The sequence number in each probe message is used to indicate the starting position of the data segment in the corresponding probe message. The sequence number in the first probe message sent in the multiple probe messages is not equal to the target sequence number. The target sequence number is the initial sequence number plus 1. At least one response message is received. Each response message includes a SACK option. The SACK option is used to indicate the sequence number range of non-contiguous data segments that the second network device (i.e., the campus switch) has received.

[0075] Optionally, the network device 300 also includes an input / output (I / O) interface 305, which is connected to the processor 301 and the memory 302 via a bus 303. The processor 301 can receive input commands or data through the I / O interface 305. The I / O interface 305 is used for the network device 300 to connect input devices, such as a keyboard and mouse. Optionally, in some possible scenarios, the network interface 304 and the I / O interface 305 described above are collectively referred to as a communication interface.

[0076] Optionally, the network device 300 also includes a display 306, which is connected to the processor 301 and the memory 302 via a bus 303. The display 306 can be used to display intermediate and / or final results generated by the processor 301 executing the above methods. In one possible implementation, the display 306 is a touch screen to provide a human-machine interface.

[0077] Wherein, bus 303 can be any type of communication bus used to interconnect internal devices of network device 300. For example, a system bus. This embodiment of the application illustrates the interconnection of the aforementioned devices inside network device 300 via bus 303 as an example. Optionally, the aforementioned devices inside network device 300 may communicate with each other using connection methods other than bus 303, such as interconnecting the aforementioned devices inside network device 300 via internal logical interfaces of network device 300.

[0078] The aforementioned devices can be disposed on separate chips, or at least partially or entirely on the same chip. Whether to dispose of the devices independently on different chips or integrate them on one or more chips often depends on the needs of the product design. This application does not limit the specific implementation of the aforementioned devices. Figure 3 The network device 300 shown is merely an example. In the implementation process, the network device 300 includes other components, which will not be listed one by one in this article.

[0079] Figure 4 This is a schematic diagram of the hardware structure of a switch provided in an embodiment of this application. The switch can be, for example, a... Figure 2 The campus switch in the illustrated application scenario. For example... Figure 4 As shown, the switch 400 includes a central processing unit (CPU) 401, a dedicated hardware chip 402, and at least one network interface 403. The CPU 401 and the dedicated hardware chip 402 can be collectively referred to as processors.

[0080] CPU 401 refers to a general-purpose central processing unit with high scalability and flexibility. A CPU 401 can be a single-core processor or a multi-core processor.

[0081] The dedicated hardware chip 402 is a high-performance processing hardware module. The dedicated hardware chip 402 includes at least one of application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or network processor (NP).

[0082] At least one network interface 403 includes, for example, Figure 4Network interfaces 1, 2, 3...n are defined in the diagram. Network interface 403 uses any transceiver-like device to communicate with other devices or communication networks to implement the send / receive operations performed by the first network device in this embodiment. Taking switch 400 as an example... Figure 2 Taking the campus switch in the application scenario shown as an example, Figure 4 Network interface 1 communicates with the user terminal to send TCP synchronization request messages and multiple probe messages to the user terminal. The TCP synchronization request message includes an initial sequence number. Each probe message includes a sequence number and a data segment. The sequence number in each probe message is used to indicate the starting position of the data segment in the corresponding probe message. The sequence number in the first probe message sent in the multiple probe messages is not equal to the target sequence number. The target sequence number is the initial sequence number plus 1. At least one response message is received. Each response message includes a SACK option. The SACK option is used to indicate the sequence number range of non-contiguous data segments that the second network device (i.e., the user terminal) has received.

[0083] Optionally, network interface 403 includes at least one of a wired network interface or a wireless network interface. The wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface, or a combination thereof. The wireless network interface is, for example, a wireless protected local area networks (WLAN) interface, a cellular network interface, or a combination thereof.

[0084] At least one network interface 403 is connected to a dedicated hardware chip 402, and the dedicated hardware chip 402 is connected to a CPU 401 via an internal connection 404. The internal connection 404 includes a pathway for data transmission between the network interface 403, the dedicated hardware chip 402, and the CPU 401. Optionally, the internal connection 404 is a single board or a bus. For example, the internal connection 404 may be Ethernet, Fibre Channel, PCI-E (Peripheral Component Interconnect Express, PCI Express, a high-speed serial computer bus), RapidIO (a high-performance, low-pin-count, packet-switched interconnect architecture), InfiniBand, or an XAUI bus (an interface extender that connects the Ethernet Media Access Control (MAC) layer to the physical layer).

[0085] Optionally, the switch 400 also includes a content addressable memory (CAM) 405. The CAM 405 may be, for example, a ternary content addressable memory (TCAM). The CAM 405 may be used, for example, to store the address of an attack source. Optionally, the CAM 405 exists independently and is connected to the dedicated hardware chip 402 via the aforementioned internal connection 404. Alternatively, the CAM 405 and the dedicated hardware chip 402 are integrated, meaning the CAM 405 serves as the internal memory of the dedicated hardware chip 402.

[0086] Optionally, the switch 400 also includes a memory 406. The memory 406 may be, for example, a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions; a random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions; an electrically erasable programmable read-only memory (EEPROM); a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.); a magnetic disk storage medium; or any other medium capable of carrying or storing desired program code 408 in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 406 may exist independently and be connected to the CPU 401 via an internal connection 404. Alternatively, the memory 406 and the CPU 401 may be integrated together.

[0087] The memory 406 stores an operating system 407 and program code 408. Optionally, the CPU 401 reads the operating system 407 from the memory 406 and runs the operating system 407. The CPU 401 also reads the program code 408 from the memory 406 and implements the method provided in the embodiments of this application by running the program code 408 on the operating system 407. For example, the switch 400 is... Figure 2In the application scenario shown, during the execution of program code 408, the CPU 401 of the campus switch performs the following process: the switch 400, as the first network device, determines the one-way link packet loss rate based on at least one response message. The one-way link packet loss rate includes the forward link packet loss rate and / or the reverse link packet loss rate. The forward link is the link from the first network device to the second network device, and the reverse link is the link from the second network device to the first network device.

[0088] Optionally, the aforementioned devices are disposed on separate chips, or at least partially or entirely on the same chip. Whether the devices are disposed independently on different chips or integrated on one or more chips often depends on the needs of the product design. This application does not limit the specific implementation of the aforementioned devices.

[0089] The method flow of the embodiments of this application is illustrated below.

[0090] Figure 5 This is a flowchart illustrating a method 500 for determining packet loss rate according to an embodiment of this application. Method 500 is applied to... Figure 1 The first network device shown is used to determine the packet loss rate of the one-way link between the first network device and the second network device. For example... Figure 5 As shown, method 500 includes the following steps 501 to 504.

[0091] Step 501: The first network device sends a TCP synchronization request message to the second network device. The TCP synchronization request message includes the initial sequence number.

[0092] In some embodiments, a TCP connection is established between the first network device and the second network device via a three-way handshake. Optionally, the specific process for establishing a TCP connection via a three-way handshake follows a standard definition.

[0093] Figure 6 This is a schematic diagram illustrating a three-way handshake for establishing a TCP connection, as provided in an embodiment of this application. Figure 6 As shown, during the first handshake, the first network device sends a TCP synchronization (SYN) request message, also known as a TCP SYN message, to the second network device. The TCP synchronization request message includes a SYN field and a sequence number field. Figure 6 The sequence number field is marked as seq. In the TCP synchronization request message, the SYN field is set to 1, i.e., SYN=1, used to request whether the second network device is willing to establish a TCP connection with the first network device. The sequence number field in the TCP synchronization request message is set to the initial sequence number. Figure 6The initial sequence number is marked as x, i.e., seq = x. The initial sequence number included in the TCP synchronization request message is generated by the first network device using a random algorithm. This application embodiment does not provide a detailed description of the method by which the first network device determines the initial sequence number.

[0094] During the second handshake, the second network device replies to the first network device with a TCP acknowledgment (ACK) message, also known as a TCP SYN-ACK message. The TCP acknowledgment message includes a SYN field, an ACK field, a sequence number field, and an acknowledgment number field. The SYN field in the TCP acknowledgment message has a value of 1, indicating that the second network device agrees to establish a TCP connection with the first network device. The ACK field also has a value of 1, indicating that the second network device has received the TCP synchronization request message from the first network device. The sequence number field has a value of y, meaning seq = y, where y is generated by the second network device using a random algorithm. The acknowledgment number field has a value of x+1, indicating that the second network device uses x+1 as the starting sequence number for the data segment the first network device is about to send.

[0095] During the third handshake, the first network device sends a TCP acknowledgment message (TCP ACK message) to the second network device. The TCP acknowledgment message includes an ACK field, a sequence number field, and an acknowledgment number field. The ACK field in the TCP acknowledgment message has a value of 1, indicating that the first network device has received the TCP synchronization acknowledgment message from the second network device. The sequence number field in the TCP acknowledgment message has a value of x+1, meaning seq = x+1, which again notifies the second network device that the first network device is about to send a data segment with a starting sequence number of x+1 (i.e., the destination sequence number). The acknowledgment number field in the TCP acknowledgment message has a value of y+1, meaning the acknowledgment number = y+1, indicating that the first network device is aware that the second network device is about to send a data segment with a starting sequence number of y+1.

[0096] pass Figure 6 The three-way handshake shown completes the establishment of the TCP connection between the first network device and the second network device.

[0097] Furthermore, since the embodiments of this application are based on the SACK mechanism to enable the second network device to reply to probe packets packet by packet, in some implementations, the TCP synchronization request message also includes a first option. The type value of the first option is used to indicate that the first network device supports the SACK function. In this scenario, the implementation method for establishing a TCP connection between the first network device and the second network device based on the TCP synchronization request message can be as follows: the first network device receives a TCP synchronization acknowledgment message from the second network device. The TCP synchronization acknowledgment message includes a second option, and the type value of the second option is used to indicate that the second network device supports the SACK function.

[0098] In the above manner, the first network device can determine that both the local end and the second network device support the SACK function during the handshake process of establishing a TCP connection with the second network device, thereby realizing the method for determining the packet loss rate provided in the embodiments of this application.

[0099] Optionally, in some scenarios, the operations and maintenance personnel can configure whether the second network device supports the SACK function on the first network device. In this scenario, the first network device does not need to determine whether the second network device supports the SACK function during the handshake process.

[0100] In some embodiments, the TCP synchronization request message also includes a first maximum segment size (MSS), which indicates the MSS supported by the first network device. In this scenario, the establishment of a TCP connection between the first and second network devices based on the TCP synchronization request message can be implemented as follows: the first network device receives a TCP synchronization acknowledgment message from the second network device, which includes a second MSS indicating the MSS supported by the second network device; the first network device determines the smaller of the first and second MSS as the target MSS; wherein the length of the data segment in each of the multiple probe messages is less than or equal to the target MSS.

[0101] In this way, the first network device can negotiate a MSS supported by both parties during the handshake process of establishing a TCP connection with the second network device, so as to ensure that the probe packets sent by the first network device can be correctly parsed by the second network device.

[0102] For example, a TCP synchronization request message includes a third option, which carries the first MSS. Correspondingly, a TCP synchronization acknowledgment message includes a fourth option, which carries the second MSS.

[0103] Optionally, in some scenarios, the operations and maintenance personnel can configure the MSS supported by the second network device at the first network device. In this scenario, the first network device does not need to negotiate an MSS supported by both devices through a handshake process.

[0104] Figure 7 This is a schematic diagram of a TCP packet format provided in an embodiment of this application. The packets in the aforementioned three-way handshake process can all be referenced from this diagram. Figure 7 The format shown. For example... Figure 7 As shown, a TCP segment includes the following fields: source port number, destination port number, sequence number, acknowledgment number, header length, reserved, code bits, window size, TCP checksum, urgent pointer, options, and segment.

[0105] The flag field includes nine flags: NS, CWR, ECG, URG, ACK, PSH, RST, SYN, and FIN. The functions of the ACK and SYN flags can be found in [reference needed]. Figure 6 The handshake process is shown below. For information on the functions of other markers, please refer to the relevant content of the TCP protocol; they will not be explained in detail here.

[0106] The options set field includes multiple options. Each option includes a type (kind) subfield and a length (length) subfield. The value of the type subfield indicates the function of the corresponding option, and the value of the length subfield indicates the length of the corresponding option.

[0107] For example, for a certain option, if the value of the type subfield of the option is equal to 4, that is, kind=4, then the option is used to indicate that the device sending the TCP packet supports the SACK function. In this scenario, the kind of the first option in the TCP synchronization request packet is equal to 4, and the kind of the second option in the TCP synchronization acknowledgment packet is equal to 4.

[0108] For example, if an option's type subfield has a value of 2 (i.e., kind = 2), then this option is used to carry the MSS supported by the device sending the TCP packet. In this scenario, the values ​​of the subfields other than the type and length subfields in this option are used to indicate the MSS supported by the device sending the TCP packet.

[0109] Accordingly, in the TCP synchronization request message, the kind of the third option is equal to 2. The values ​​of the subfields in the third option, excluding the type and length subfields, are used to indicate the MSS supported by the first network device. In the TCP synchronization acknowledgment message, the kind of the fourth option is equal to 2. The values ​​of the subfields in the fourth option, excluding the type and length subfields, are used to indicate the MSS supported by the second network device.

[0110] It should be noted that, Figure 7 The formats of the messages involved in the embodiments of this application are used to illustrate the examples. The messages involved in the embodiments of this application, such as TCP synchronization request messages, TCP synchronization confirmation messages, and probe messages and response messages in subsequent steps 502 and 503, can be TCP messages of any format, and will not be illustrated one by one here.

[0111] Step 502: After establishing a TCP connection between the first network device and the second network device based on a TCP synchronization request message, the first network device sends multiple probe messages to the second network device. Each probe message includes a sequence number and a data segment. The sequence number in each probe message is used to indicate the starting position of the data segment in the corresponding probe message. The sequence number in the first probe message sent among the multiple probe messages is not equal to the target sequence number. The target sequence number is the initial sequence number plus 1.

[0112] like Figure 6 As shown, after the TCP connection between the first network device and the second network device is established, the first network device sends multiple probe packets to the second network device in succession. The sequence number in the first probe packet is not equal to the target sequence number. The target sequence number is the initial sequence number plus 1. This can trigger the second network device to reply with a response packet including the selective acknowledgment (SACK) option for each probe packet. That is, it can trigger the second network device to reply with a response packet including the SACK option packet by packet.

[0113] For example, both TCP synchronization request messages and probe messages use... Figure 7 In the scenario shown in the message format, such as Figure 8 As shown, the sequence number field in the TCP synchronization request message takes the value x, meaning the initial sequence number is equal to x. After the first network device establishes a TCP connection with the second network device, the sequence number field in the first probe message sent will not be equal to x+1.

[0114] For ease of explanation, the sequence number in the first probe message sent will be referred to as the first sequence number.

[0115] After the TCP connection between the first network device and the second network device is established, the second network device will configure a receive buffer for the TCP connection. The receive buffer is used to cache data segments in multiple probe packets subsequently sent by the first network device. Figure 9 This is a schematic diagram of a receive buffer provided in an embodiment of this application. Figure 9 As shown, the sequence number corresponding to the first byte in the receive buffer is the target sequence number.

[0116] When the sequence number in the first probe packet sent by the first network device is not equal to the initial sequence number plus 1, that is, the first sequence number is not equal to the target sequence number, the second network device, upon receiving the probe packet, combines... Figure 9 The receive buffer shown assumes that the probe message sent by the first network device to the second network device has been lost, resulting in the second network device not receiving data segments with sequence numbers in the range [target sequence number, first sequence number - 1]. Therefore, the second network device will include a SACK option in its response message to the probe message, and the SACK option is used to indicate the range of sequence numbers of non-contiguous data segments that the second network device has already received. For probe messages sent by the first network device after the first probe message, since the second network device has not received data segments with sequence numbers in the range [target sequence number, first sequence number - 1], the second network device will reply with a response message for each received probe message, and each response message will include the SACK option. This enables the second network device to reply with a response message including the SACK option packet by packet, thereby allowing the first network device to determine the one-way link packet loss rate based on at least one received response message.

[0117] In some embodiments, the sequence number in the first probe message sent is less than the target sequence number.

[0118] When the sequence number in the first probe packet is less than the target sequence number, due to the TCP sequence number wraparound characteristic, the second network device, upon receiving the probe packet, will assume that the first network device sent a data segment with sequence numbers from the target sequence number to the maximum sequence number, and then sent a data segment with sequence numbers from 0 to the first sequence number minus 1. However, the second network device did not receive these data segments. Therefore, the second network device will add the SACK option to its response packet to the probe packet.

[0119] Furthermore, when the sequence number in the first probe message is less than the target sequence number, the second network device can reply with a response message including the SACK option, regardless of its type. Therefore, this method has virtually no requirements for the second network device and has a wide range of applications.

[0120] Optionally, the sequence number in the first probe message can also be greater than the target sequence number. In this scenario, when the second network device receives the probe message, it will assume that the first network device sent a data segment with a sequence number starting from the target sequence number and ending at the first sequence number minus 1. However, the second network device did not receive these data segments. Therefore, the second network device will add the SACK option to its response message to the probe message. Thus, this scenario can also trigger a packet-by-packet reply from the peer.

[0121] In addition, in some embodiments, the multiple probe messages include a first probe message and a second probe message sent sequentially. The first probe message includes a first sequence number, and the second probe message includes a second sequence number. The difference between the second sequence number and the first sequence number is the length of the data segment in the first probe message.

[0122] In this embodiment, the data segments carried by multiple probe packets can be consecutive. Since the number of sequence ranges that can be carried in the SACK option is limited, such as a maximum of 4, when the data segments carried by multiple probe packets are consecutive, the SACK option can carry a wider range of sequence numbers of the most recently received non-consecutive data from the second network device. This helps the first network device to accurately analyze which probe packets the second network device has received.

[0123] For example, if the target sequence number is 1500, the first network device sends three probe packets sequentially, labeled probe packet 1, probe packet 2, and probe packet 3. Figure 10 As shown, the sequence number range corresponding to the data segment in probe message 1 is [1001, 2000], the sequence number range corresponding to the data segment in probe message 2 is [2001, 3000], and the sequence number range corresponding to the data segment in probe message 3 is [3001, 4000]. These three data segments in the probe messages are consecutive.

[0124] like Figure 10As shown, assuming the second network device receives probe message 1, since the sequence number 1001 in probe message 1 is not the same as the target sequence 1500, the second network device assumes that the first network device sent data segments with sequence numbers from 1500 to the maximum sequence number and data segments with sequence numbers from 0 to 1000. However, the second network device did not receive these data segments, that is, the second network device did not receive data segments with sequence numbers in [1500, maximum sequence number] and [0, 1000]. Therefore, the second network device constructs response message 1 for probe message 1. Response message 1 includes the SACK option, and the sequence number range carried by the SACK option is [1001, 2001], which is used to indicate that the second network device received a non-contiguous data segment with sequence numbers in [1001, 2000], where 2001 represents the sequence number of the first byte in the next data segment of the non-contiguous data segment.

[0125] The response message 1 also includes an acknowledgment number, which is the target sequence number and is used to indicate that the data segment received by the second network device is discontinuous starting from the target sequence number.

[0126] Continue to refer to Figure 10 Suppose that after receiving probe message 1, the second network device receives probe message 2. Since the second network device has not yet received the data segment with sequence number in [1500, maximum sequence number] and [0, 1000], the second network device constructs response message 2 for probe message 2. Response message 2 includes the SACK option. The sequence number carried by the SACK option is in the range of [1001, 3001], which is used to indicate that the second network device has received a non-contiguous data segment with sequence number in [1001, 3000], where 3001 represents the sequence number of the first byte of the next data segment of the non-contiguous data segment.

[0127] The response message 2 also includes an acknowledgment number, which is the target sequence number and is used to indicate that the data segment received by the second network device is discontinuous starting from the target sequence number.

[0128] Continue to refer to Figure 10 Suppose that after receiving probe message 1 and probe message 2, the second network device receives probe message 3. Since the second network device has not yet received a data segment with sequence number between [1500, maximum sequence number] and [0, 1000], the second network device constructs response message 3 for probe message 3. Response message 3 includes a SACK option. The sequence number carried by the SACK option is in the range of [1001, 4001], which is used to indicate that the second network device has received a non-contiguous data segment with sequence number in [1001, 4000], where 4001 represents the sequence number of the first byte of the next data segment of the non-contiguous data segment.

[0129] The response message 3 also includes an acknowledgment number, which is the target sequence number and is used to indicate that the data segment received by the second network device is discontinuous starting from the target sequence number.

[0130] Optionally, the data segments carried by multiple probe messages may be non-contiguous. This application does not limit this.

[0131] For example, with a target sequence number of 1500, the first network device sequentially sends three probe packets, labeled probe packet 4, probe packet 5, and probe packet 6. Assume the sequence number range for the data segment in probe packet 4 is [1001, 2000], the range for the data segment in probe packet 5 is [3001, 4000], and the range for the data segment in probe packet 6 is [5001, 6000]. That is, the three data segments in the three probe packets are not consecutive. Assume the SACK option can carry a maximum of two sequence ranges.

[0132] In this scenario, when the second network device receives probe packet 4, it replies to the first network device with response packet 4, and the sequence number carried by the SACK option in response packet 4 is in the range of [1001, 2001]. If the second network device receives probe packet 5 after receiving probe packet 4, it replies to the first network device with response packet 5, and the sequence number carried by the SACK option in response packet 5 is in the ranges of [1001, 2001] and [3001, 4001]. If the second network device receives probe message 6 after receiving probe message 4 and probe message 5, since the SACK option can carry a maximum of two sequence ranges, and the sequence number range of the non-contiguous data segment currently received by the second network device is three, namely [1001, 2000], [3001, 4000], and [5001, 6000], the second network device replies to the first network device with response message 6, and the SACK option in response message 6 can only carry two sequence number ranges, namely [3001, 4001] and [5001, 6001].

[0133] Step 503: The first network device receives at least one response message, each of the at least one response message including a SACK option, the SACK option in each response message being used to indicate the sequence number range of non-contiguous data segments received by the second network device.

[0134] The format of the response message can be found by referring to... Figure 7 The message format shown will not be described again here.

[0135] The following is based on Figure 10The three probe messages shown are used as examples to illustrate the response messages received by the first network device.

[0136] For example, such as Figure 10 As shown, after the second network device replies with response messages 1, 2, and 3 respectively, if none of these three response messages are lost on the reverse link, the first network device will receive response messages 1, 2, and 3.

[0137] For example, such as Figure 11 As shown, assuming that after receiving probe packet 1, the second network device receives probe packet 3 instead of probe packet 2, that is, probe packet 2 was lost in the forward link, since the second network device has not yet received the data segment with sequence numbers between [target sequence number, maximum sequence number] and [0, 1000], the second network device constructs response packet 3 for probe packet 3. Response packet 3 includes the SACK option, and the sequence number range carried by the SACK option is [1001, 2001] and [3001, 4001], which is used to indicate that the second network device has received non-contiguous data segments with sequence numbers in [1001, 2000] and non-contiguous data segments with sequence numbers in [3001, 4000].

[0138] In this scenario, if neither response message 1 nor response message 3 is lost on the reverse link, the first network device will receive response message 1 and response message 3.

[0139] For example, such as Figure 12 As shown, assume that the second network device receives probe packet 1, probe packet 2 and probe packet 3, and replies to each of the three probe packets with three response packets. However, response packet 2 is lost on the reverse link. In this case, the first network device only receives response packet 1 and response packet 3. The sequence number carried by the SACK option in response packet 1 is in the range of [10001-2001], and the sequence number carried by the SACK option in response packet 3 is in the range of [10001-4001].

[0140] Step 504: The first network device determines the one-way link packet loss rate based on at least one response message. The one-way link packet loss rate includes the forward link packet loss rate and / or the reverse link packet loss rate. The forward link is the link from the first network device to the second network device, and the reverse link is the link from the second network device to the first network device.

[0141] In some embodiments, the first network device determines the one-way link packet loss rate based on at least one response message in the following ways: Based on the sequence number and data segment length of each of the multiple probe messages, a first sequence number range set is determined, including the sequence number range corresponding to the data segment of each of the multiple probe messages; based on the SACK option of each of the at least one response message and the first sequence number range set, a second sequence number range set is determined, including the sequence number range corresponding to the data segment of each of the at least one probe message received by the second network device; and based on the second sequence number range set, the one-way link packet loss rate is determined.

[0142] In this way, the first network device can analyze which probe packets the second network device has received based on the SACK option of each response packet in at least one response packet and the sequence number range corresponding to the data segment of each probe packet in multiple probe packets, thereby accurately determining the one-way link packet loss rate.

[0143] For example, the first network device sent in sequence Figure 10 The three probe messages shown indicate that the first sequence number range set includes three sequence number ranges, which are: [1001, 2000], [2001, 3000], and [3001, 4000].

[0144] For example, the implementation of determining the second sequence number range set based on the SACK option of each response message in at least one response message and the first sequence range set can be as follows: determine a third sequence number range set, which includes the sequence number range carried by the SACK option of each response message in at least one response message; and determine the second sequence number range set based on the intersection between the first sequence number range set and the third sequence number range set.

[0145] Since the sequence number ranges carried by the SACK option in different response messages may overlap, the third sequence number range set can be determined by sequentially adding the sequence number range carried by the SACK option of each response message in at least one response message to the third sequence number range set. Specifically, for any response message, when adding the sequence number range carried by the SACK option of that response message to the third sequence number range set, if a portion of the sequence number range carried by the SACK option of that response message already exists in the third sequence number range set, then it is not necessary to add that portion of the sequence number range again to the third sequence number range set; only the remaining portion of the sequence number range carried by the SACK option of that response message needs to be added.

[0146] For example, for Figure 10If the first network device receives all three response messages shown, including response message 1, response message 2, and response message 3, the first network device can sequentially add the sequence number range [1001, 2001] carried by the SACK option of response message 1, the sequence number range [1001, 3001] carried by the SACK option of response message 2, and the sequence number range [1001, 4001] carried by the SACK option of response message 3 to the third sequence number range set. When adding the sequence number range [1001, 3001] carried by the SACK option of response message 2 to the third sequence number range set, since the third sequence number range set already contains the sequence number range [1001, 2001], it is only necessary to add the sequence number range [2002, 3001] to the third sequence number range set, resulting in the third sequence number range set being [1001, 2001] and [2002, 3001], or [1001, 3001]. Similarly, after adding the sequence number range [1001, 4001] carried by the SACK option of response message 3 to the third sequence number range set, the third sequence number range set is obtained as [1001, 4001].

[0147] In addition, the second sequence number range set can be determined based on the intersection of the first sequence number range set and the third sequence number range set by traversing each sequence number range in the first sequence number range set and performing the following operation on each sequence number range.

[0148] For all serial numbers in the i-th serial number range, if each serial number belongs to a serial number in the third serial number range set, then the i-th serial number range is taken as a serial number range in the second serial number range set.

[0149] For example, with Figure 11 Taking the scenario shown as an example, the first network device sends three probe packets, namely probe packet 1, probe packet 2, and probe packet 3. Therefore, the first sequence number range set is: ([1001, 2000], [2001, 3000], [3001, 4000]). Figure 11As shown, due to packet loss in the forward link of probe packet 2, the first network device only received response packets 1 and 3 from the second network device. The SACK option of response packet 1 carries a sequence number range of [1001, 2001]. The SACK option of response packet 3 carries sequence number ranges of [1001, 2001] and [3001, 4001], respectively. Therefore, the third sequence number range set is ([1001, 2001], [3001, 4001]). The intersection of the first and third sequence number range sets is [1001, 2000] and [3001, 4000], therefore the third sequence number range includes two sequence number ranges: [1001, 2000] and [3001, 4000], indicating that the second network device only received probe packets 1 and 3.

[0150] After determining the second sequence number range set, the first network device can further determine the one-way link packet loss rate because the second sequence number range set includes the sequence number range corresponding to the data segment of each probe message in at least one probe message received by the second network device.

[0151] The following explanation uses a unidirectional link, including both the forward and reverse links, as an example to illustrate how to determine the packet loss rate of a unidirectional link.

[0152] Scenario 1: A unidirectional link includes a forward link.

[0153] In Scenario 1, the method for determining the one-way packet loss rate based on the second sequence number range set can also be as follows: determine the total number of sequence number ranges in the second sequence number range set to obtain a first number; determine the total number of multiple probe packets to obtain a second number; and determine the forward link packet loss rate based on the first number and the second number.

[0154] The first network device can analyze which probe packets it has received by the second network device through the sequence number range in the second sequence number range set. Therefore, the total number of sequence number ranges in the second sequence number range set, i.e. the first number, can represent how many probe packets the second network device has received. Thus, the forward link packet loss rate can be accurately determined based on the first number and the second number.

[0155] For example, if the first quantity is labeled as n1 and the second quantity as n2, then the forward link packet loss rate can be expressed by the following formula (1):

[0156] Forward link packet loss rate = (n2-n1) / n2(1)

[0157] Scenario 2: A one-way link includes a reverse link.

[0158] In scenario two, the method to determine the one-way packet loss rate based on the second sequence range set can be as follows: determine the total number of sequence ranges in the second sequence range set to obtain the first number; determine the total number of at least one response message to obtain the third number; and determine the reverse link packet loss rate based on the first number and the third number.

[0159] The first network device can analyze which probe packets the second network device has received by using the sequence number range in the second sequence number range set. The second network device will reply with a response packet for each probe packet received. Therefore, the first network device can analyze which response packets have been lost on the reverse link based on at least one received response packet. Thus, the reverse link packet loss rate can be accurately determined based on the first quantity and the third data.

[0160] For example, if the first quantity is labeled as n1 and the third quantity is labeled as n3, then the reverse link packet loss rate can be expressed by the following formula (2):

[0161] Forward link packet loss rate = (n1-n3) / n1(2)

[0162] In addition, after determining the one-way link packet loss rate, the first network device can also display or report the one-way link packet loss rate, so that maintenance personnel can analyze the communication quality between the first network device and the second network device based on the one-way link packet loss rate.

[0163] Optionally, in this embodiment of the application, the first network device can determine the bidirectional link packet loss rate while determining the unidirectional link packet loss rate, and then display or report the bidirectional link packet loss rate. The bidirectional link packet loss rate can be determined using the following formula (3):

[0164] Bidirectional link packet loss rate = (n² - n³) / n²(3)

[0165] In summary, in this embodiment, a first network device, acting as the probe, sends a TCP synchronization request message to a second network device, acting as the destination. The TCP synchronization request message includes an initial sequence number to establish a TCP connection with the second network device. After establishing the TCP connection, the first network device sends a series of probe messages to the second network device. The sequence number in the first probe message is not equal to the target sequence number; the target sequence number is the initial sequence number plus 1. This prompts the second network device to reply with a response message including the SACK option for each probe message, i.e., prompting the second network device to reply with a response message including the SACK option packet by packet. The SACK option in the response message indicates the sequence number range of non-contiguous data segments received by the second network device. Therefore, the first network device can analyze which probe messages the second network device has received by using the received response messages, and then accurately determine the one-way link packet loss rate based on the analysis results. Therefore, this application provides a scheme for accurately determining the packet loss rate of a one-way link by the probe end. This scheme can be implemented simply by the probe end designing the sequence number in the first probe message based on the initial sequence number. There is no need to deploy a dedicated packet loss rate measurement function at the destination end. Therefore, the deployment cost is low and the application range is wide.

[0166] The following describes an example of a virtual device in an embodiment of this application.

[0167] Figure 13 This is a schematic diagram of the structure of a network device for determining packet loss rate provided in an embodiment of this application, which has... Figure 13 The network device 1300 with the structure shown is a first network device used to implement the method 500 described in the above embodiments.

[0168] like Figure 13 As shown, the network device 1300 includes the following modules.

[0169] The transceiver module 1301 is used to send Transmission Control Protocol (TCP) synchronization request messages to the second network device. The TCP synchronization request message includes an initial sequence number. For specific implementation details, please refer to [reference needed]. Figure 5 Step 501 in the embodiment.

[0170] The transceiver module 1301 is also used to, after establishing a TCP connection between the first network device and the second network device based on a TCP synchronization request message, send multiple probe messages from the first network device to the second network device. Each probe message includes a sequence number and a data segment. The sequence number indicates the starting position of the data segment in the corresponding probe message, and the sequence number in the first probe message sent is not equal to the initial sequence number. For specific implementation details, please refer to [reference needed]. Figure 5 Step 502 in the embodiment.

[0171] The transceiver module 1301 is further configured to allow the first network device to receive at least one response message, each of the at least one response message including a Selective Acknowledgment (SACK) option, the SACK option being used to indicate the sequence number range of non-contiguous data segments received by the second network device; for specific implementation details, please refer to [reference needed]. Figure 5 Step 503 in the embodiment.

[0172] The first determining module 1302 is used by the first network device to determine the one-way link packet loss rate based on at least one response message. The one-way link packet loss rate includes the forward link packet loss rate and / or the reverse link packet loss rate. The forward link is the link from the first network device to the second network device, and the reverse link is the link from the second network device to the first network device. For specific implementation details, please refer to [reference needed]. Figure 5 Step 504 in the embodiment.

[0173] Optionally, the sequence number in the first probe message sent is less than the initial sequence number.

[0174] Optionally, the multiple probe messages include a first probe message and a second probe message sent sequentially, wherein the first probe message includes a first sequence number and the second probe message includes a second sequence number;

[0175] The difference between the second sequence number and the first sequence number is the length of the data segment in the first probe message.

[0176] Optionally, the first determining module is used for:

[0177] Based on the sequence number and data segment length in each of the multiple probe messages, a first sequence number range set is determined, which includes the sequence number range corresponding to the data segment of each of the multiple probe messages;

[0178] Based on the SACK option of each response message in at least one response message and the first sequence number range set, a second sequence number range set is determined, the second sequence number range set including the sequence number range corresponding to the data segment of each probe message in at least one probe message received by the second network device;

[0179] The packet loss rate of a one-way link is determined based on the second sequence number range set.

[0180] Optionally, the first determining module is used for:

[0181] Determine a third sequence number range set, which includes the sequence number range carried by the SACK option of each response message in at least one response message;

[0182] The intersection of the first sequence number range set and the third sequence number range set is determined to obtain the second sequence number range set.

[0183] Optionally, the first determining module is used for:

[0184] Determine the total number of sequence number ranges in the second sequence number range set to obtain the first number;

[0185] Determine the total number of multiple probe messages to obtain the second number;

[0186] The forward link packet loss rate is determined based on the first and second quantities.

[0187] Optionally, the first determining module is used for:

[0188] Determine the total number of sequence ranges in the second sequence range set to obtain the first number;

[0189] Determine the total number of at least one response message to obtain the third number;

[0190] The reverse link packet loss rate is determined based on the first and third quantities.

[0191] Optionally, the TCP synchronization request message may also include a first option, wherein the value of the type in the first option is used to indicate that the first network device supports the SACK function;

[0192] The transceiver module is also used to receive TCP synchronization acknowledgment messages from the second network device. The TCP synchronization acknowledgment message includes a second option, and the value of the type in the second option is used to indicate that the second network device supports the SACK function.

[0193] Optionally, the TCP synchronization request message may also include a first maximum segment size (MSS), the first MSS being used to indicate the MSS supported by the first network device;

[0194] The transceiver module is also used to receive TCP synchronization acknowledgment messages from the second network device. The TCP synchronization acknowledgment message includes a second MSS, which is used to indicate the MSS supported by the second network device.

[0195] The first network device further includes a second determining module, used to determine the smaller of the first MSS and the second MSS as the target MSS;

[0196] In this context, the length of the data segment in each of the multiple probe messages is less than or equal to the target MSS.

[0197] In summary, in this embodiment, a first network device, acting as the probe, sends a TCP synchronization request message to a second network device, acting as the destination. The TCP synchronization request message includes an initial sequence number to establish a TCP connection with the second network device. After establishing the TCP connection, the first network device sends a series of probe messages to the second network device. The sequence number in the first probe message is not equal to the target sequence number; the target sequence number is the initial sequence number plus 1. This prompts the second network device to reply with a response message including the SACK option for each probe message, i.e., prompting the second network device to reply with a response message including the SACK option packet by packet. The SACK option in the response message indicates the sequence number range of non-contiguous data segments received by the second network device. Therefore, the first network device can analyze which probe messages the second network device has received by using the received response messages, and then accurately determine the one-way link packet loss rate based on the analysis results. Therefore, this application provides a scheme for accurately determining the packet loss rate of a one-way link by the probe end. This scheme can be implemented simply by the probe end designing the sequence number in the first probe message based on the initial sequence number. There is no need to deploy a dedicated packet loss rate measurement function at the destination end. Therefore, the deployment cost is low and the application range is wide.

[0198] Appendix Figure 13 The described device embodiments are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. The functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. Appendix Figure 13 The aforementioned modules can be implemented either in hardware or as software functional units. For example, when implemented in software, the aforementioned transceiver module 1301 and the first determining module 1302 can be implemented by an attached... Figure 3 The processor 301 reads the program code stored in the memory 302 and generates software function modules to implement it. Figure 13 The aforementioned modules can also be implemented separately by different hardware components of the network device. For example, the first determining module 1302 is implemented by the attached... Figure 3 A portion of the processing resources in the processor 301 (e.g., one core in a multi-core processor) are used for implementation, while the transceiver module 1301 is implemented by an auxiliary... Figure 3The network interface 304 and the remaining processing resources in the processor 301 (such as other cores in a multi-core processor) are used to complete the task. Obviously, the above functional modules can also be implemented by a combination of software and hardware. For example, the transceiver module 1301 is implemented by a hardware programmable device, while the first determination module 1302 is a software functional module generated by the processor after reading the program instructions stored in the memory.

[0199] This application also provides a network device, including: a memory, a network interface, and at least one processor. The memory stores program instructions, and the at least one processor reads the program instructions stored in the memory, causing the network device to execute the actions performed by the first network device in the above method embodiment. Optionally, the hardware structure of the network device is as follows: Figure 3 As shown or as Figure 4 As shown.

[0200] This application also provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the actions performed by the first network device in the above method embodiments.

[0201] This application also provides a computer program product, including a computer program, which, when executed by a processor, implements the actions performed by the first network device in the above method embodiments.

[0202] In this application's embodiments, the term "traffic" is also referred to as network traffic or data traffic. Traffic refers to the data transmitted through a network at a given point in time. For example, the traffic received by a device at time T refers to all messages received by the device at time T.

[0203] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0204] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects, and should not be construed as indicating or implying relative importance.

[0205] In the description of the embodiments in this application, unless otherwise stated, "at least one" means one or more. "More than one" means two or more.

[0206] A references B, which means that A is the same as B or A is a simple variation of B.

[0207] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that there are three possible relationships. For example, A and / or B means: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0208] Optionally, in the above embodiments, all or part of the implementation is carried out by software, hardware, firmware, or any combination thereof. Optionally, when implemented using software, it is implemented in the form of a computer program product, which is implemented in whole or in part. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. Optionally, the computer is a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Optionally, the computer instructions are stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Optionally, the computer-readable storage medium is any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. Alternatively, the available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video disks (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0209] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for determining packet loss rate, characterized in that, The method includes: The first network device sends a Transmission Control Protocol (TCP) synchronization request message to the second network device, the TCP synchronization request message including an initial sequence number; After a TCP connection is established between the first network device and the second network device based on the TCP synchronization request message, the first network device sends multiple probe messages to the second network device. Each probe message includes a sequence number and a data segment. The sequence number is used to indicate the starting position of the data segment in the corresponding probe message. The sequence number in the first probe message sent in the multiple probe messages is not equal to the target sequence number. The target sequence number is the initial sequence number plus 1. The first network device receives at least one response message, each of the at least one response message including a Selective Acknowledgment (SACK) option, the SACK option being used to indicate the sequence number range of non-contiguous data segments received by the second network device; The first network device determines the one-way link packet loss rate based on the at least one response message. The one-way link packet loss rate includes the forward link packet loss rate and / or the reverse link packet loss rate. The forward link is the link from the first network device to the second network device, and the reverse link is the link from the second network device to the first network device.

2. The method as described in claim 1, characterized in that, The sequence number in the first probe message sent is less than the target sequence number.

3. The method as described in claim 1 or 2, characterized in that, The plurality of probe messages include a first probe message and a second probe message sent sequentially, wherein the first probe message includes a first sequence number and the second probe message includes a second sequence number; The difference between the second sequence number and the first sequence number is the length of the data segment in the first probe message.

4. The method according to any one of claims 1-3, characterized in that, The first network device determines the one-way link packet loss rate based on the at least one response message, including: Based on the sequence number and data segment length in each of the plurality of probe messages, a first sequence number range set is determined, which includes the sequence number range corresponding to the data segment of each of the plurality of probe messages; Based on the SACK option of each response message in the at least one response message and the first sequence number range set, a second sequence number range set is determined, the second sequence number range set including the sequence number range corresponding to the data segment of each probe message in the at least one probe message received by the second network device; The packet loss rate of the one-way link is determined based on the second sequence number range set.

5. The method as described in claim 4, characterized in that, The step of determining the second sequence number range set based on the SACK option of each response message in the at least one response message and the first sequence range set includes: Determine a third sequence number range set, the third sequence number range set including the sequence number range carried by the SACK option of each response message in the at least one response message; The second sequence number range set is determined based on the intersection between the first sequence number range set and the third sequence number range set.

6. The method as described in claim 4 or 5, characterized in that, Determining the unidirectional link packet loss rate based on the second sequence number range set includes: Determine the total number of sequence number ranges in the second sequence number range set to obtain the first number; Determine the total number of the multiple probe messages to obtain the second number; The forward link packet loss rate is determined based on the first quantity and the second quantity.

7. The method according to any one of claims 4-6, characterized in that, Determining the unidirectional link packet loss rate based on the second sequence range set includes: Determine the total number of sequence ranges in the second sequence range set to obtain the first number; Determine the total number of the at least one response message to obtain the third number; The reverse link packet loss rate is determined based on the first quantity and the third quantity.

8. The method according to any one of claims 1-7, characterized in that, The TCP synchronization request message also includes a first option, wherein the value of the type in the first option is used to indicate that the first network device supports the SACK function; The establishment of a TCP connection between the first network device and the second network device based on the TCP synchronization request message includes: The first network device receives a TCP synchronization acknowledgment message from the second network device. The TCP synchronization acknowledgment message includes a second option, and the value of the type in the second option is used to indicate that the second network device supports the SACK function.

9. The method according to any one of claims 1-8, characterized in that, The TCP synchronization request message also includes a first maximum segment size (MSS), whereby the first MSS is used to indicate the MSS supported by the first network device. The establishment of a TCP connection between the first network device and the second network device based on the TCP synchronization request message includes: The first network device receives a TCP synchronization acknowledgment message from the second network device. The TCP synchronization acknowledgment message includes a second MSS, which is used to indicate the MSS supported by the second network device. The first network device determines the smaller of the first MSS and the second MSS as the target MSS; In each of the plurality of probe messages, the length of the data segment is less than or equal to the target MSS.

10. A network device for determining packet loss rate, characterized in that, The network device includes a first network device, which includes a memory and at least one processor. The memory is used to store program instructions; After the at least one processor reads the program instructions stored in the memory, it causes the first network device to perform the following operations: Send a Transmission Control Protocol (TCP) synchronization request message to the second network device, the TCP synchronization request message including an initial sequence number; After a TCP connection is established between the first network device and the second network device based on the TCP synchronization request message, the first network device sends multiple probe messages to the second network device. Each probe message includes a sequence number and a data segment. The sequence number is used to indicate the starting position of the data segment in the corresponding probe message. The sequence number in the first probe message sent in the multiple probe messages is not equal to the target sequence number. The target sequence number is the initial sequence number plus 1. Receive at least one response message, each of the at least one response message including a Selective Acknowledgment (SACK) option, the SACK option being used to indicate the sequence number range of non-contiguous data segments received by the second network device; Based on the at least one response message, a one-way link packet loss rate is determined, the one-way link packet loss rate including the forward link packet loss rate and / or the reverse link packet loss rate, the forward link being the link from the first network device to the second network device, and the reverse link being the link from the second network device to the first network device.

11. The network device as described in claim 10, characterized in that, The sequence number in the first probe message sent is less than the target sequence number.

12. The network device as described in claim 10 or 11, characterized in that, The plurality of probe messages include a first probe message and a second probe message sent sequentially, wherein the first probe message includes a first sequence number and the second probe message includes a second sequence number; The difference between the second sequence number and the first sequence number is the length of the data segment in the first probe message.

13. The network device as described in any one of claims 10-12, characterized in that, After the at least one processor reads the program instructions stored in the memory, it causes the first network device to perform the following operations: Based on the sequence number and data segment length in each of the plurality of probe messages, a first sequence number range set is determined, which includes the sequence number range corresponding to the data segment of each of the plurality of probe messages; Based on the SACK option of each response message in the at least one response message and the first sequence number range set, a second sequence number range set is determined, the second sequence number range set including the sequence number range corresponding to the data segment of each probe message in the at least one probe message received by the second network device; The packet loss rate of the one-way link is determined based on the second sequence number range set.

14. The network device as described in claim 13, characterized in that, After the at least one processor reads the program instructions stored in the memory, it causes the first network device to perform the following operations: Determine a third sequence number range set, the third sequence number range set including the sequence number range carried by the SACK option of each response message in the at least one response message; The intersection of the first sequence number range set and the third sequence number range set is determined to obtain the second sequence number range set.

15. The network device as described in claim 13 or 14, characterized in that, After the at least one processor reads the program instructions stored in the memory, it causes the first network device to perform the following operations: Determine the total number of sequence number ranges in the second sequence number range set to obtain the first number; Determine the total number of the multiple probe messages to obtain the second number; The forward link packet loss rate is determined based on the first quantity and the second quantity.

16. The network device as described in any one of claims 13-15, characterized in that, After the at least one processor reads the program instructions stored in the memory, it causes the first network device to perform the following operations: Determine the total number of sequence ranges in the second sequence range set to obtain the first number; Determine the total number of the at least one response message to obtain the third number; The reverse link packet loss rate is determined based on the first quantity and the third quantity.

17. The network device as described in any one of claims 10-16, characterized in that, The TCP synchronization request message also includes a first option, wherein the value of the type in the first option is used to indicate that the first network device supports the SACK function; After the at least one processor reads the program instructions stored in the memory, it causes the first network device to perform the following operations: Receive a TCP synchronization acknowledgment message from the second network device. The TCP synchronization acknowledgment message includes a second option, the value of which indicates that the second network device supports the SACK function.

18. The network device as described in any one of claims 10-17, characterized in that, The TCP synchronization request message also includes a first maximum segment size (MSS), whereby the first MSS is used to indicate the MSS supported by the first network device. After the at least one processor reads the program instructions stored in the memory, it causes the first network device to perform the following operations: Receive a TCP synchronization acknowledgment message from the second network device, the TCP synchronization acknowledgment message including a second MSS, the second MSS being used to indicate the MSS supported by the second network device; The smaller of the first MSS and the second MSS is determined as the target MSS; In each of the plurality of probe messages, the length of the data segment is less than or equal to the target MSS.

19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a processor of a network device, implement the method as described in any one of claims 1 to 9.

20. A computer program product containing instructions, characterized in that, When the instruction is executed by the processor of the network device, the method as described in any one of claims 1 to 9 is implemented.