A network performance detection method and device based on TWAMP and a storage medium

CN116319449BActive Publication Date: 2026-10-30SUZHOU SHENGKE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310144727.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2026-10-30
Estimated Expiration
2043-02-21

AI Technical Summary

Technical Problem

用户感知到这条流量对应的业务出问题了,但是通过TWAPM并没能检测出来

Benefits of technology

[0061]通过本发明的TWAMP检测方法,具体是将TWAMP检测报文编辑为TCP类型,可以更加精确地检测出TCP普通数据报文所经过链路的情况,包括延迟、抖动、丢包率等,既能达到检测的效果,还不影响原有的普通数据报文的转发。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116319449B_ABST
    Figure CN116319449B_ABST
Patent Text Reader

Abstract

The application discloses a TWAMP-based network performance detection method and device and a storage medium. The TWAMP detection packet is edited as a TCP type, and the situation of a TCP ordinary data packet passing through a link, including delay, jitter, and packet loss rate, can be detected more accurately, so that the detection effect is achieved, and the forwarding of the original ordinary data packet is not affected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of IP link performance measurement technology, specifically relating to a network performance testing method, device and storage medium based on TWAMP. Background Technology

[0002] TWAMP (Two-Way Active Measurement Protocol) is a performance measurement technology for IP links that can perform bidirectional performance statistics in both directions.

[0003] like Figure 1 The following are the steps for existing TWAMP detection:

[0004] (1) Device S1, acting as the sender, constructs a test request and performs a test at regular intervals, sending one test request message to the receiver (Responder) for each test. The characteristics of the test request message are as follows: MACSA:mac1, MACDA:mac2, IPSA:ip1, IPDA:ip2, UDP L4SrcPort:udpport3, UDP L4DstPort:udpport4. Device S1 calculates (assuming the IP protocol used here has undergone a hash algorithm) that the test request message needs to be forwarded through the p11-p21 link connecting device S1 and device S2.

[0005] (2) Device S2, acting as the Responder, receives the test message and identifies the Test-request message based on its IPSA, IPDA, UDPL4SrcPort, and UDPL4DstPort. It then constructs a reflected message (Test-response) and reflects it back to the Sender. The characteristics of the Test-response message are, for example, MACSA:mac2, MACDA:mac1, IPSA:ip2, IPDA:ip1, UDPL4SrcPort:udpport4, and UDPL4DstPort:udpport3. Device S2 calculates (assuming the IP protocol used here has undergone a hash algorithm) that the Test-response message needs to be forwarded through the p11-p21 link connecting Device S1 and Device S2.

[0006] (3) When the sender receives the reflected message, it identifies the Test-response message based on the IPSA, IPDA, UDP L4SrcPort, and UDPL4DstPort of the message. Based on the number of Test-response messages received and the time it takes to receive the Test-response messages, it calculates the loss rate, round-trip time, and latency jitter of the Test-request messages, thereby determining the quality of the link between the source and destination ends and between the destination and source ends.

[0007] Layer 3 switch S1 and Layer 3 switch S2 exchange Test-request and Test-response messages. By analyzing the number of messages sent and received, as well as the content carried in the messages, the packet loss rate and latency of the link between S1 and S2 can be determined. This function is a standard feature of the standard TWAMP protocol.

[0008] like Figure 2 As shown, the existing TWAMP packet loss measurement process is as follows:

[0009] 1. At time t0: The sender begins sending packets (continuously sending test messages Test-request at the specified packet sending interval) and counting in the first packet sending statistics cycle, and begins receiving packets (receiving test-response messages reflected back from the responder) and counting in the first packet receiving statistics cycle.

[0010] 2. At time t1: The Sender receives the first Test-response message reflected back from the Responder.

[0011] 3. At time t2: The first packet sending statistics period (t0~t2) ends, and the Sender counts the number of Test-request messages sent during the first packet sending period.

[0012] 4. At time t3: The first packet reception statistics period (t0~t3) ends. The Sender counts the number of Test-response messages received during the first packet reception period and calculates the packet loss rate of the first packet sending period. At the same time, the packet sending and counting of the second packet sending statistics period, as well as the packet reception and counting of the second packet reception statistics period, begin.

[0013] The formula for calculating packet loss rate is:

[0014] Packet loss rate = (Number of packets sent in the nth period – Number of packets received in the nth period) / Number of packets sent in the nth period

[0015] 5. At time t4: The second packet sending statistics period (t2~t4) ends, and Sender counts the number of Test-request messages sent during the second packet sending period.

[0016] 6. At time t5: The second packet reception statistics period (t2~t5) ends. The Sender counts the number of Test-response messages received during the second packet reception period and calculates the packet loss rate for the second packet sending period. At the same time, the packet sending and counting for the next packet sending statistics period, as well as the packet reception and counting for the next packet reception statistics period, begin.

[0017] This process is repeated, calculating the packet loss rate for each cycle, until the measurement is completed.

[0018] like Figure 3 As shown, TWAMP sends test packets periodically, each packet carrying a timestamp. Latency and jitter are calculated based on the timestamps of two adjacent packets. The specific measurement process is as follows:

[0019] 1. The Sender sends a Test-request message to the Responder, and carries the message departure time STxTime in the message.

[0020] 2. When the Test-request message arrives at the Responder, the Responder records the time DRxTime when the Test-request message was received.

[0021] 3. The Responder constructs a Test-response message based on the fields in the Test-request message, and records information such as the timestamp STxTime, DRxTime, and the estimated Test-response message departure time DTxTime in the Test-response message and reflects it back to the Sender.

[0022] 4. When the Test-response message arrives at the Sender, the Sender records the time SRxTime when the Test-response message is received, and calculates the bidirectional link delay Delay1 between the Sender and the Responder based on the four timestamps STxTime, DRxTime, DTxTime and SRxTime.

[0023] The sender sends multiple probe messages at a fixed period, repeating the above process, thereby calculating the bidirectional link delays Delay2 and Delay3 between the sender and the responder, as well as the delay jitter SD-jitter from the source to the destination and the delay jitter DS-jitter from the destination to the source.

[0024] The formula for calculating the bidirectional link delay (Delay) is as follows:

[0025] Delay = (SRxTime – STxTime) - (DTxTime – DRxTime), where Delay is the (bidirectional) delay of the message on the link, excluding the time consumed when the message is processed by the Responder.

[0026] The formula for calculating Average Delay is:

[0027] Average Delay=(Delay1+Delay2+Dealy3+…+DelayN) / N.

[0028] The formula for calculating latency jitter is:

[0029] Jitter = |Delay2 – Delay1|, where Delay2 and Delay1 are the delay times for two consecutive delays.

[0030] The formula for calculating Average Jitter is:

[0031] Average Jitter=(Jitter1+Jitter2+Jitter3+…+JitterN) / N.

[0032] However, in the existing TWAMP detection process described above, assuming that in this environment, the p11-p21 link connecting device S1 and device S2 is functioning correctly, but the p12-p22 link is faulty, since Test-request and Test-response messages follow the p11-p21 path, only the quality of the p11-p21 link can be detected. In the current environment, there is a regular data packet (relative to TWAMP Test-request and Test-response messages), with the following characteristics: MACSA:mac1, MACDA:mac2, IPSA:ip1, IPDA:ip2, IPProtocol:TCP, TCP L4SrcPort:tcpport5, TCP L4DstPort:tcpport6. Assume that the IPprotocol used here, after a hash algorithm, determines that the flow needs to be forwarded through the p12-p22 link connecting S1 and S2. Users perceived that the service associated with this traffic was experiencing a problem, but TWAPM failed to detect it.

[0033] Therefore, to address the technical problem that existing TWAMP detection methods cannot fully simulate the forwarding path of the original packets, it is necessary to provide a TWAMP detection method that improves detection accuracy. Summary of the Invention

[0034] In view of this, the purpose of the present invention is to provide a network performance testing method, device and storage medium based on TWAMP.

[0035] To achieve the above objectives, an embodiment of the present invention provides the following technical solution:

[0036] A network performance testing method based on TWAMP includes:

[0037] S1. Configure the first TWAMP detection information and enable TWAMP transmission detection on the sending end, and download the first TWAMP detection information into its switch chip. Configure the second TWAMP detection information and enable TWAMP reception detection on the receiving end, and download the second TWAMP detection information into its switch chip. Both the first TWAMP detection information and the second TWAMP detection information are configured to have the TWAMP detection packet type as TCP.

[0038] S2. The switch chip at the sending end constructs a test message, performs a test at regular intervals, and sends the test message to the receiving end each time a test is performed;

[0039] S3. The sending end calculates that the test message is forwarded from the link to be tested that connects the sending end and the receiving end;

[0040] S4, after receiving the test message, the receiving end identifies the test message based on the first TWAMP detection information in the message, constructs a reflection message, and forwards the reflection message to the sending end.

[0041] S5, the receiving end calculates that the reflected message was forwarded from the link to be detected;

[0042] S6, when the sending end receives the reflected message, it identifies the reflected message according to the second TWAMP detection information, and the sending end determines the quality of the link to be detected based on the number of the received reflected messages and the time of receiving the reflected messages.

[0043] In one embodiment, in step S1, both the first TWAMP detection information and the second TWAMP detection information include IP protocol, TCP source port, and TCP destination port, wherein the IP protocol is of type TCP.

[0044] In one embodiment, the first TWAMP detection information and the second TWAMP detection information further include source MAC information, destination MAC information, source IP information, and destination IP information.

[0045] In one embodiment, step S1 further includes configuring a Layer 3 port address and a MAC address on the sending end before configuring the first TWAMP detection information on the sending end; and configuring a Layer 3 port address and a MAC address on the receiving end before configuring the second TWAMP detection information on the receiving end.

[0046] In one embodiment, in step S3, the sending end uses the IP protocol in the first TWAMP detection information to perform hash calculation; in step S5, the receiving end uses the IP protocol in the second TWAMP detection information to perform hash calculation.

[0047] In one embodiment, in step S6, the sending end calculates the test message loss rate, round-trip time, and latency jitter based on the number of received reflected messages and the time of receiving the reflected messages, thereby determining the quality of the link to be tested.

[0048] On the other hand, the present invention also discloses a network performance testing device based on TWAMP, comprising:

[0049] The configuration unit is used to configure first TWAMP detection information and enable TWAMP transmission detection on the sending end, and download the first TWAMP detection information into its switch chip; and to configure second TWAMP detection information and enable TWAMP reception detection on the receiving end, and download the second TWAMP detection information into its switch chip. Both the first TWAMP detection information and the second TWAMP detection information are configured to have the TWAMP detection packet type as TCP.

[0050] The sending end test unit is used to construct test messages on the switch chip at the sending end and perform a test at regular intervals, and send the test message to the receiving end each time the test is performed.

[0051] The sending end calculation unit is used to calculate and determine that the test message is forwarded from the link to be tested that connects the sending end and the receiving end;

[0052] The receiving end reflection message unit is used to identify the test message according to the first TWAMP detection information of the message after the receiving end receives the test message, construct a reflection message, and forward the reflection message to the sending end.

[0053] The sending end calculation unit is used to calculate and determine that the reflected message was forwarded from the link to be detected;

[0054] The sending end judgment unit is used to identify the reflected message based on the second TWAMP detection information when the reflected message is received, and to judge the quality of the link to be detected based on the number of the received reflected messages and the time of receiving the reflected messages.

[0055] In one embodiment, in the configuration unit, both the first TWAMP detection information and the second TWAMP detection information include IP protocol, TCP source port, and TCP destination port, wherein the IP protocol is of type TCP.

[0056] In another aspect, the present invention also discloses a network performance testing device based on TWAMP, comprising:

[0057] At least one processing unit; and

[0058] At least one storage unit is coupled to the at least one processing unit and stores a computer program for execution by the at least one processing unit, which, when executed by the at least one processing unit, causes the apparatus to perform the method described above.

[0059] In another aspect, the present invention also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a machine, implements the above-described method.

[0060] The present invention has the following beneficial effects:

[0061] The TWAMP detection method of this invention specifically edits the TWAMP detection message into a TCP type, which can more accurately detect the link conditions through which ordinary TCP data packets pass, including latency, jitter, packet loss rate, etc. It can achieve the detection effect without affecting the forwarding of the original ordinary data packets. Attached Figure Description

[0062] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0063] Figure 1 A schematic diagram showing the connection between two existing switching devices S1 and S2;

[0064] Figure 2 A schematic diagram illustrating the principle of calculating the number of lost packets and the packet loss rate for existing TWAMP detection messages;

[0065] Figure 3A schematic diagram illustrating the principle of existing TWAMP for detecting and calculating latency and latency jitter;

[0066] Figure 4 This is a flowchart illustrating the network performance detection method based on TWAMP according to the present invention. Detailed Implementation

[0067] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.

[0068] Because existing technologies have the problem that TWAMP detection cannot fully simulate the forwarding path of the original packet, this invention edits the TWAMP detection packet to TCP type, thereby enabling more accurate detection of the link conditions traversed by ordinary TCP data packets, including latency, jitter, packet loss rate, etc.

[0069] Specifically, such as Figure 4 As shown, the TWAMP-based network performance testing method disclosed in this invention includes the following steps:

[0070] Step 1: Configure the Layer 3 port address and MAC address on the sending end.

[0071] In this embodiment, the Layer 3 port address of device S1 is configured as ip1, and the MAC address of device S1 is configured as mac1.

[0072] Step 2: Configure the first TWAMP detection information on the sending end.

[0073] In this embodiment, the first TWAMP detection information is specifically configured on device S1, which includes the source and destination information of TWAMP detection. In this embodiment, the first TWAMP detection information includes: MACSA (source MAC address), MACDA (destination MAC address), IPSA (source IP address), IPDA (destination IP address), IP Protocol, TCPSrcPort (TCP source port), and TCPDstPort (TCP destination port). It should be noted that this configuration is only one possible scenario; the first TWAMP detection information must include IP Protocol, TCPSrcPort, and TCPDstPort. This is because in existing technical solutions, when specifying TWAMP source and destination information, MACSA, MACDA, IPSA, and IPDA can be specified, or IPSA and IPDA can be specified, with many variations. Compared to existing technical solutions, this invention changes the TWAMP detection message type from UDP to TCP.

[0074] Step 3: Enable TWAMP transmission detection on the sending end.

[0075] In this embodiment, TWAMP sender detection is enabled on device S1.

[0076] Step 4: The transmitting end downloads the first TWAMP detection information to its switch chip.

[0077] In this embodiment, device S1 downloads the above configuration information into the chip.

[0078] Step 5: Configure the Layer 3 port address and MAC address on the receiving end.

[0079] In this embodiment, the Layer 3 port address of device S2 is configured as ip2, and the MAC address of device S2 is configured as mac2.

[0080] Step 6: Configure the second TWAMP detection information on the receiving end.

[0081] In this embodiment, the second TWAMP detection information is specifically configured on device S3, which includes the source and destination information for TWAMP detection. In this embodiment, the second TWAMP detection information also includes: MACSA (source MAC address), MACDA (destination MAC address), IPSA (source IP address), IPDA (destination IP address), IP Protocol, TCPSrcPort (TCP source port), and TCPDstPort (TCP destination port). It should also be noted that this configuration is only one possible scenario; the second TWAMP detection information must include IP Protocol, TCPSrcPort, and TCPDstPort. This is because in existing technical solutions, when specifying TWAMP source and destination information, MACSA, MACDA, IPSA, and IPDA can be specified, or IPSA and IPDA can be specified, with many variations. Compared to existing technical solutions, this invention changes the TWAMP detection message type from UDP to TCP.

[0082] Step 7: Enable TWAMP receiver detection at the receiver.

[0083] In this embodiment, TWAMP Responder detection is enabled on device S2.

[0084] Step 8: The receiving end downloads the aforementioned second TWAMP detection information into its switch chip.

[0085] In this embodiment, device S2 downloads the above configuration information into the chip.

[0086] Step 9: The switch chip at the sending end constructs a test message and performs a test every certain period of time. Each time a test is performed, the test message is sent to the receiving end.

[0087] In this embodiment, device S1 acts as the Sender (i.e., the sending end). The chip constructs a test request and performs a test at regular intervals. Each test sends a Test request message to the Responder (i.e., the receiving end). In this embodiment, the characteristics of the Test request message are, for example, MACSA:mac1, MACDA:mac2, IPSA:ip1, IPDA:ip2, IP protocol:TCP, TCP L4SrcPort:tcpport3, TCP L4DstPort:tcpport4.

[0088] Step 10: The sending end calculates that the test message is forwarded from the link to be tested that connects the sending end and the receiving end.

[0089] In this embodiment, device S1 calculates, specifically using the IP protocol and a hash algorithm, that the Test-request message needs to be forwarded from the p12-p22 link connecting device S1 and device S2.

[0090] Step 10: After receiving the above test message, the receiving end identifies the test message based on the first TWAMP detection information in the message, constructs a reflection message, and forwards the reflection message to the sending end.

[0091] In this embodiment, device S2, acting as the Responder, receives the test message and identifies the Test-request message based on its MACSA, MACDA, IPSA, IPDA, IP Protocol, TCPSrcPort, and TCPDstPort. It then constructs a reflected message (Test-response) and reflects it back to the Sender. In this embodiment, the Test-response message contains the following MACSA and IPDA values: mac2, mac1, ip2, ip1, TCP protocol: TCP, tcpport4, and tcpport3.

[0092] Step 11: The receiving end calculates that the reflected message was forwarded from the link to be detected.

[0093] In this embodiment, device S2 calculates, specifically using the IP protocol and a hash algorithm, that the Test-response message needs to be forwarded from the p12-p22 link connecting device S1 and device S2.

[0094] Step 12: When the sending end receives the reflected message, it identifies the reflected message based on the second TWAMP detection information, and the sending end determines the quality of the link to be detected based on the number of reflected messages received and the time of receiving the reflected messages.

[0095] In this embodiment, when the sender receives a reflected message, it identifies the Test-response message based on the message's MACSA, MACDA, IPSA, IPDA, IPProtocol, TCPSrcPort, and TCPDstPort. Based on the number of received Test-response messages and the time taken to receive them, the sender calculates the Test-request message loss rate, round-trip time, and latency jitter, thereby determining the quality of the link between the sender and receiver, and between the receiver and sender.

[0096] At this point, the Test-request and Test-response packets detected by TWAMP can travel along the same physical link as ordinary data packets. It should be noted that in some scenarios, even if the TWAMP detection packet and the ordinary data packet travel along the same physical link, the actual internal channel used by the switch may differ due to differences in packet characteristics. This invention still applies to such scenarios. For example, if the TWAMP detection packet and the ordinary data packet choose which internal channel to forward on the same physical link, assuming their selection rule is based on DSCP, since the currently constructed detection packet has the same DSCP as the original data packet, the detection packet and the original data packet will also travel along the same internal channel.

[0097] Therefore, the TWAMP detection method of the present invention, which specifically edits the TWAMP detection message into TCP type, can more accurately detect the condition of the link through which the TCP ordinary data packet passes, including latency, jitter, packet loss rate, etc., achieving the detection effect without affecting the forwarding of the original ordinary data packet.

[0098] Corresponding to the above method, the present invention also discloses a network performance testing device based on TWAMP, comprising:

[0099] The configuration unit is used to configure first TWAMP detection information and enable TWAMP transmission detection on the sending end, and download the first TWAMP detection information into its switch chip; and to configure second TWAMP detection information and enable TWAMP reception detection on the receiving end, and download the second TWAMP detection information into its switch chip. Both the first TWAMP detection information and the second TWAMP detection information are configured to have the TWAMP detection packet type as TCP.

[0100] The sending end test unit is used to construct test messages on the switch chip at the sending end and perform a test at regular intervals, sending the test message to the receiving end each time a test is performed.

[0101] The sending end calculation unit is used to calculate and determine whether the test message is forwarded from the link to be tested that connects the sending end and the receiving end.

[0102] The receiving end reflection message unit is used to identify the test message based on the first TWAMP detection information of the message after the receiving end receives the test message, construct a reflection message, and forward the reflection message to the sending end.

[0103] The sending end calculation unit is used to calculate and determine whether the reflected message was forwarded from the link to be detected.

[0104] The sending end judgment unit is used to identify the reflected message based on the second TWAMP detection information when the reflected message is received, and to judge the quality of the link to be detected based on the number of received reflected messages and the time of receiving the reflected messages.

[0105] The implementation principle of each unit can be referred to the description in the above method, and will not be repeated here.

[0106] This invention also discloses a network performance detection device based on TWAMP, including a storage unit, a processing unit, and a calculator program. The calculator program is stored in the processing unit and can be run within the processing unit. In implementation, when the processing unit executes the calculator program, it can perform various steps in the above method, such as configuring first TWAMP detection information and enabling TWAMP transmission detection at the transmitting end, and downloading the first TWAMP detection information into its switch chip; configuring second TWAMP detection information and enabling TWAMP reception detection at the receiving end, and downloading the second TWAMP detection information into its switch chip, etc.

[0107] For example, the calculator program can be divided into one or more units, which are stored in the storage unit and executed by the storage unit to complete the present invention. The one or more units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the device.

[0108] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processing unit, can implement the above-described method. The computer program includes computer program code, which may be in the form of source code, an executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), etc.

[0109] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions.

[0110] For ease of description, the above apparatus is described in terms of function, divided into various modules. Of course, when implementing one or more embodiments of this specification, the functions of each module can be implemented in one or more software and / or hardware.

[0111] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0112] Those skilled in the art will understand that embodiments of one or more of the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0113] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0114] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0115] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A network performance testing method based on TWAMP, characterized in that, The method includes: S1. Before configuring the first TWAMP detection information on the sending end, configure the Layer 3 port address and MAC address on the sending end; before configuring the second TWAMP detection information on the receiving end, configure the Layer 3 port address and MAC address on the receiving end. Configure the first TWAMP detection information and enable TWAMP transmission detection on the sending end, and download the first TWAMP detection information into its switch chip. Configure the second TWAMP detection information and enable TWAMP reception detection on the receiving end, and download the second TWAMP detection information into its switch chip. Both the first TWAMP detection information and the second TWAMP detection information are configured to have the TWAMP detection packet type as TCP. S2. The switch chip at the sending end constructs a test message and performs a test at regular intervals, sending the test message to the receiving end for each test; wherein, both the first TWAMP detection information and the second TWAMP detection information include IP protocol, TCP source port, and TCP destination port, and the IP protocol is of type TCP; the first TWAMP detection information and the second TWAMP detection information also include source MAC information, destination MAC information, source IP information, and destination IP information; S3. The sending end calculates that the test message is forwarded from the link to be tested connecting the sending end and the receiving end; wherein, the sending end uses the IP protocol in the first TWAMP detection information to perform hash calculation; S4, after receiving the test message, the receiving end identifies the test message based on the first TWAMP detection information in the message, constructs a reflection message, and forwards the reflection message to the sending end. S5, the receiving end calculates that the reflected message was forwarded from the link to be detected; wherein, the receiving end uses the IP protocol in the second TWAMP detection information to perform hash calculation; S6, when the sending end receives the reflected message, it identifies the reflected message according to the second TWAMP detection information, and the sending end determines the quality of the link to be detected based on the number of the received reflected messages and the time of receiving the reflected messages.

2. The network performance testing method based on TWAMP according to claim 1, characterized in that, In step S6, the sending end calculates the test message loss rate, round-trip time, and latency jitter based on the number of received reflected messages and the time of receiving the reflected messages, thereby determining the quality of the link to be tested.

3. A network performance testing device based on TWAMP, employing the network performance testing method based on TWAMP as described in any one of claims 1-2, characterized in that, The device includes: The configuration unit is used to configure first TWAMP detection information and enable TWAMP transmission detection on the sending end, and download the first TWAMP detection information into its switch chip; and to configure second TWAMP detection information and enable TWAMP reception detection on the receiving end, and download the second TWAMP detection information into its switch chip. Both the first TWAMP detection information and the second TWAMP detection information are configured to have the TWAMP detection packet type as TCP. The sending end test unit is used to construct test messages on the switch chip at the sending end and perform a test at regular intervals, and send the test message to the receiving end each time the test is performed. The sending end calculation unit is used to calculate and determine that the test message is forwarded from the link to be tested that connects the sending end and the receiving end; The receiving end reflection message unit is used to identify the test message according to the first TWAMP detection information of the message after the receiving end receives the test message, construct a reflection message, and forward the reflection message to the sending end. The sending end calculation unit is used to calculate and determine that the reflected message was forwarded from the link to be detected; The sending end judgment unit is used to identify the reflected message according to the second TWAMP detection information when the reflected message is received, and to judge the quality of the link to be detected according to the number of the received reflected messages and the time of receiving the reflected messages.

4. The network performance testing device based on TWAMP according to claim 3, characterized in that, In the configuration unit, both the first TWAMP detection information and the second TWAMP detection information include IP protocol, TCP source port, and TCP destination port, and the IP protocol is of type TCP.

5. A network performance testing device based on TWAMP, characterized in that, The device includes: At least one processing unit; and At least one storage unit coupled to the at least one processing unit and storing a computer program for execution by the at least one processing unit, wherein, when executed by the at least one processing unit, the device performs the method according to any one of claims 1 to 2.

6. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a machine, implements the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Method for implementing active measurement protocol based on chip

    CN108390797A

  • Transmitting device, reflecting device and network performance testing method and system

    CN110891285A