CN115706707A - Method, device, storage medium and electronic equipment for measuring network one-way delay - Google Patents

Method, device, storage medium and electronic equipment for measuring network one-way delay Download PDF

Info

Publication number
CN115706707A
CN115706707A CN202110897104.7A CN202110897104A CN115706707A CN 115706707 A CN115706707 A CN 115706707A CN 202110897104 A CN202110897104 A CN 202110897104A CN 115706707 A CN115706707 A CN 115706707A
Authority
CN
China
Prior art keywords
path
packet
time point
paths
sending
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110897104.7A
Other languages
Chinese (zh)
Inventor
朱岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110897104.7A priority Critical patent/CN115706707A/en
Publication of CN115706707A publication Critical patent/CN115706707A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method, a device, a storage medium and electronic equipment for measuring network one-way delay. The method comprises the following steps: sending first data packets from a plurality of first paths to a destination address and receiving first reply packets of the first data packets from the destination address from a first fixed path; determining a first target path from the multiple first paths according to a first time length from the time when each first path sends a first data packet to the time when a first reply packet is received; receiving second data packets sent by the destination addresses from the plurality of second paths, and sending second reply packets of the second data packets to the destination addresses from the second fixed paths; determining a second target path from the plurality of second paths according to a second duration of each second path from the sending time point of the second data packet to the receiving time point of the second reply packet; and determining the one-way delay from the current address to the destination address according to the first target path and the second target path. The invention solves the technical problem of inaccurate measurement of the one-way delay of the network.

Description

Method, device, storage medium and electronic equipment for measuring network one-way delay
Technical Field
The invention relates to the field of computers, in particular to a method, a device, a storage medium and electronic equipment for measuring network one-way delay.
Background
In the prior art, in the process of measuring the network one-way delay, a data packet may be sent to a receiving address through a sending address, the receiving address immediately returns a reply packet to the sending address after receiving the data packet, and the one-way delay of the network is obtained by subtracting the time for sending the data packet from the time for receiving the reply packet by dividing 2. However, the above method causes inaccurate measurement of the one-way delay of the network because the routing load configuration and the like may be different.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a storage medium and electronic equipment for measuring network one-way delay, which at least solve the technical problem of inaccurate measurement of network one-way delay.
According to a first aspect of the embodiments of the present invention, there is provided a method for measuring network one-way delay, including: sending a first packet from a plurality of first paths to a destination address and receiving a first reply packet of the first packet from the destination address from a first fixed path; determining a first target path from the plurality of first paths according to a first time length from the time when each first path sends the first data packet to the time when the first reply packet is received; receiving second data packets sent by destination addresses from a plurality of second paths, and sending second reply packets of the second data packets to the destination addresses from a second fixed path; determining a second target path from the plurality of second paths according to a second duration of each second path from the sending time point of the second data packet to the receiving time point of the second reply packet; and determining the one-way delay from the current address to the destination address according to the first target path and the second target path.
According to another aspect of the embodiments of the present invention, there is provided an apparatus for measuring network one-way delay, including: a first transmitting unit configured to transmit a first packet from a plurality of first paths to a destination address and receive a first reply packet of the first packet from the destination address from a first fixed path; a first receiving unit, configured to determine a first target path from the multiple first paths according to a first duration from when each of the first paths sends the first data packet to when the first reply packet is received; a second sending unit, configured to receive second packets sent by destination addresses from multiple second paths, and send second reply packets of the second packets to the destination addresses from second fixed paths; a second receiving unit, configured to determine, according to a second duration of each of the second paths from the sending time point of the second data packet to the receiving time point of the second reply packet, a second target path from the multiple second paths; and the determining unit is used for determining the one-way delay from the current address to the destination address according to the first target path and the second target path.
According to yet another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is configured to execute the above method for measuring network one-way delay when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the method for measuring network one-way delay through the computer program.
In the embodiment of the invention, a first data packet is sent to a destination address from a plurality of first paths, and a first reply packet of the first data packet is received from the destination address from a first fixed path; determining a first target path from the plurality of first paths according to a first time length from the time when each first path sends the first data packet to the time when the first reply packet is received; receiving second data packets sent by destination addresses from a plurality of second paths, and sending second reply packets of the second data packets to the destination addresses from a second fixed path; determining a second target path from the plurality of second paths according to a second duration of each second path from the sending time point of the second data packet to the receiving time point of the second reply packet; according to the method for determining the one-way delay from the current address to the destination address according to the first target path and the second target path, because in the method, in the process of determining the one-way delay of the network, the optimal path for sending the data packet from the current address to the destination address can be determined, then the optimal path for sending the data packet from the destination address to the current address is determined, and the one-way delay of the network is determined by using the optimal path, the one-way delay is determined more accurately through the optimal path, and therefore, the accuracy of determining the one-way delay of the network is improved. And further the technical problem that the measurement of the network one-way delay is inaccurate is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of an alternative method of measuring network one-way delay in accordance with an embodiment of the present invention;
FIG. 2 is a flow diagram of an alternative method of measuring network one-way delay according to an embodiment of the present invention;
FIG. 3 is a system diagram of an alternative method of measuring one-way delay of a network in accordance with an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an alternative apparatus for measuring network one-way delay according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Round-Trip Time (RTT) refers to the length of Time it takes for a network request to travel from an origin to a destination and back to the origin. RTT is an important indicator of determining the operational condition of a connection on a local network or a larger Internet.
One-Way Delay (OWD) refers to the length of time a network request takes from an origin to a destination, compared to RTT, which does not include the length of time it takes to return from the destination to the origin.
Route load balancing (ECMP), equal Cost Multi-path, i.e. there are multiple paths with the same Cost to the same destination address. When the device supports the equivalent route, the three-layer forwarding flow sent to the destination IP or the destination network segment can be shared by different paths to realize the load balance of the network, and when some paths have faults, other paths are used for replacing the forwarding processing, thereby realizing the route redundancy backup function.
And Ping: a method of testing RTT. And recording the sending time of the data packet by sending the test data packet to the opposite terminal, requiring the opposite terminal to immediately reply after receiving the packet, and recording the receiving time again after the to-be-sent party receives the packet returned from the opposite terminal. The RTT is obtained by subtracting the sending time from the receiving time.
According to a first aspect of the embodiments of the present invention, there is provided a method for measuring network one-way delay, optionally as shown in fig. 1, the method includes:
s102, sending first data packets from a plurality of first paths to a destination address and receiving first reply packets of the first data packets from the destination address from a first fixed path;
s104, determining a first target path from the plurality of first paths according to a first duration from the time when the first data packet is sent to the time when the first reply packet is received by each first path;
s106, receiving second data packets sent by the destination addresses from the plurality of second paths, and sending second reply packets of the second data packets to the destination addresses from the second fixed paths;
s108, determining a second target path from the plurality of second paths according to a second duration of each second path from the sending time point of the second data packet to the receiving time point of the second reply packet;
s110, determining the one-way delay from the current address to the destination address according to the first target path and the second target path.
Alternatively, the above method may be applied, but not limited to, in a process of measuring a one-way delay of a network. In the process of measuring the network one-way delay, the data packet may be transmitted by a sender and a receiver of the data packet, so as to measure the network one-way delay between the sender and the receiver. For example, the current address is used as a sender of the data packet, the destination address is used as a receiver of the data packet, the current address can send the data packet to the destination address, and the destination address returns a reply packet to the current address immediately after receiving the data packet. The current address obtains the RTT by recording the time point of sending the data packet to the time point of receiving the reply packet. Whereas if OWD is to be determined, merely dividing by RTT by 2 is inaccurate. In this embodiment, the current address may send the first data packet to the destination address through a plurality of first paths, and receive a first reply packet returned by the destination address from one first fixed path. Then for each path, a corresponding RTT may be obtained. And according to the RTT, determining an optimal first target path from the plurality of first paths. Similarly, the destination address may also send the second packet to the current address through multiple second paths, and after receiving the second packet, the current address sends the second reply packet to the destination address through a second fixed path. There is one RTT for each second path. And selecting the optimal second target path from the plurality of second paths according to the RTT. And finally, sending the data packet and receiving the reply packet according to the first target path and the second target path, thereby calculating the one-way delay.
Optionally, in this embodiment, the content of the data packet sent by the different path may be different between the first data packet and the second data packet. For example, the packet content of the first packet sent by path 1 in the first path may be different from the packet content of the first packet sent by path 2 in the first path. And the second packet sent by path 3 in the second path may be different from the second packet sent by path 4 in the second path.
Optionally, in this embodiment, the current address may send the first packet to the destination address through a plurality of first paths, and the sending delays of different paths may be different. And receiving the first reply packet through the same first fixed path, so that the RTT of different first paths can be acquired. The destination address may also send the second packet to the current address via a plurality of second paths, and the sending delays of different paths may be different. And receiving the second reply packet through the same second fixed path, so that the RTTs of different second paths can be obtained. Selecting a path with the minimum RTT from different first paths as a first target path, selecting a path with the minimum RTT from second paths as a second target path, determining the minimum RTT according to the first target path and the second target path, and dividing the minimum RTT by 2 so as to determine the most accurate OWD.
By the embodiment, in the process of determining the network one-way delay, the optimal path for sending the data packet from the current address to the destination address can be determined, then the optimal path for sending the data packet from the destination address to the current address is determined, the one-way delay of the network is determined by using the optimal path, and the determination of the one-way delay through the optimal path is more accurate, so that the accuracy of determining the network one-way delay is improved.
As an alternative embodiment, the sending the first packet from the plurality of first paths to the destination address and receiving the first reply packet of the first packet from the first fixed path from the destination address includes:
taking each first path as a current path, and executing the following operations on the current path:
sending a first data packet to a destination address under a current path;
recording a first sending time point of a first data packet;
receiving a first reply packet of a first data packet of a current path from a first fixed path;
a first reception time point at which the first reply packet is received is recorded.
Optionally, in this embodiment, the current address sends the first packet to the destination address, and the first packet may be sent through a plurality of first paths. The contents of the first packets of the plurality of first paths may be different. And sending the first data packet through different first paths, wherein the OWDs of the first data packet received by the destination address are different. When the current address sends the first data packet, recording a first sending time point of each first path for sending the first data packet, then sending the first data packet to a destination address, and immediately returning the destination address to the first reply packet. And if the current address records a first receiving time point of the first reply packet, determining the RTT corresponding to the first path.
As an optional implementation manner, determining, according to a first duration from the sending of the first data packet to the receiving of the first reply packet by each of the first paths, the first target path from the plurality of first paths includes:
determining the difference value between a first receiving time point and a first sending time point of the current path as a first time length of the current path;
and determining the path with the minimum first time length in the plurality of first paths as a first target path.
Optionally, in this embodiment, after the current address sends the first data packet to the destination address through the first path and receives the first reply packet sent by the destination address through the first fixed path, the difference between the first receiving time point when the first reply packet is received and the first sending time point when the first data packet is sent may be used as the RTT between the current address and the destination address. And the RTT is minimum, which means that the delay of the first path transmission is minimum. Therefore, the first path is a path for sending the data packet to the destination address by the best current address.
As an optional implementation manner, the receiving the second packets sent by the destination addresses from the multiple second paths, and sending the second reply packet of the second packet from the second fixed path to the destination address includes:
taking each second path as a current path, and executing the following operations on the current path:
receiving a second data packet sent by a destination address under the current path;
and sending a second reply packet of the second data packet of the current path to the destination address from the second fixed path.
Optionally, in this embodiment, the destination address sends the second packet to the current address, and the second packet may be sent through a plurality of second paths. The contents of the second packets of the plurality of second paths may be different. And sending the second data packet through a different second path, wherein the OWDs of the second data packet received by the current address are different. And when the destination address sends the second data packet, recording a second sending time point of each second path for sending the second data packet, then sending the second data packet to the current address, and immediately returning a second reply packet to the current address. And the destination address records a second receiving time point of the second reply packet, so that the RTT corresponding to the second path can be determined.
As an optional implementation manner, the determining, according to the second duration of each second path from the sending time point of the second data packet to the receiving time point of the second reply packet, the second target path from the plurality of second paths includes:
acquiring a second sending time point of a second data packet of the current path and a second receiving time point of a second reply packet of the current path received by the destination address;
determining the difference value between the second receiving time point and the second sending time point as a second time length of the current path;
and determining the path with the minimum second time length in the plurality of second paths as a second target path.
Optionally, in this embodiment, after the destination address sends the second data packet to the current address through the second path and receives the second reply packet sent by the current address through the second fixed path, a difference between a second receiving time point when the second reply packet is received and a second sending time point when the second data packet is sent may be used as the RTT between the current address and the destination address. And the RTT is minimum, which means that the delay of the second path transmission is minimum. Therefore, the second path is a path for transmitting the data packet to the current address by the optimal destination address.
As an alternative embodiment, as shown in fig. 2, the determining the one-way delay from the current address to the destination address according to the first target path and the second target path includes:
s202, a third data packet is sent to a destination address from the first target path;
s204, recording a third sending time point of a third data packet;
s206, receiving a third reply packet of a third data packet returned by the destination address from the second target path;
s208, recording a third receiving time point of the third reply packet;
and S210, determining a half of the difference value between the third receiving time point and the third sending time point as the one-way delay from the current address to the destination address.
Optionally, in this embodiment, after the first destination path and the second destination path are determined, data may be transmitted through the first destination path and the second destination path, so as to calculate the minimum RTT. The current address can send a third data packet to the destination address through the first target path and record a third sending time point, the destination address immediately returns a third reply packet after receiving the third data packet, and the current address records a third receiving time point of the third reply packet when receiving the third reply packet. And subtracting the third sending time point from the third receiving time point, and determining the shortest RTT between the current address and the destination address. The RTT is divided by 2, and the obtained value is determined as OWD from the current address to the destination address.
In this embodiment, for ECMP, the router uses five tuples (source IP, source port, protocol, destination IP, and destination port) of the network as the basis of multipath load balancing. Thus, a fixed five tuple means that in an ECMP scenario there is a fixed, specific router to handle the traffic, which means a relatively fixed time cost.
Different data can be sent to different ECMP routes through different quintuple attempts, and a quintuple path with the optimal RTT can be obtained by measuring the RTT of the ECMP routes.
Fixing the one-way delay of the back packet by fixing the quintuple of the back packet; obtaining an optimal RTT by means of different attempts to unpack the quintuple; since the wrap around OWD can be considered fixed, optimal RTT-fixed wrap around OWD = optimal decapsulation OWD, the quintuple is an optimal decapsulation quintuple (labeled a). Similarly, doing so on the reverse link as well, the optimal quintuple (labeled B) in reverse can be obtained. And ping-pong the packet by taking A as a packet sending quintuple and B as a packet returning quintuple, and finding out the RTT which can be regarded as the optimal RTT. Let the RTT/2 be the more accurate OWD.
The flow chart is shown in fig. 3. In fig. 3, aping B, a uses 10001-10003 ports ping B20000 ports and let B return to a:10000 with 20000 ports as the source address of the packet return. The quintuple at this time is (A: 10001-10020) -UDP → (B: 20000). The optimal pentad in this range is available, such as: (A: 10003) -UDP → (B: 20000). The five-element group of the back package is as follows: (B: 20000) -UDP → (A: 10000). The semantics of the optimal quintuple are: the five-tuple with the lowest depacketization delay on the fixed back-packet path.
In the reverse direction, B ping A is made to wrap back the quintuple A:20000-UDP- > B:10000, and the optimal quintuple (B: 10013) -UDP → (A: 20000) is obtained.
In this case, when A ping B is performed using (A: 10003) -UDP → (B: 20000) and B round-robin using (B: 10013) -UDP → (A: 20000), the optimum RTT can be calculated, and the RTT/2 is closer to the true OWD.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for implementing the method for measuring network one-way delay, as shown in fig. 4, the apparatus includes:
a first sending unit 402, configured to send a first packet to a destination address from a plurality of first paths and receive a first reply packet of the first packet from the destination address from a first fixed path;
a first receiving unit 404, configured to determine a first target path from the multiple first paths according to a first duration from when the first data packet is sent to when the first reply packet is received through each first path;
a second sending unit 406, configured to receive second data packets sent by the destination addresses from multiple second paths, and send second reply packets of the second data packets to the destination addresses from a second fixed path;
a second receiving unit 408, configured to determine, according to a second duration of each second path from the sending time point of the second data packet to the receiving time point of the second reply packet, a second target path from the multiple second paths;
the determining unit 410 is configured to determine a one-way delay from the current address to the destination address according to the first target path and the second target path.
Alternatively, the above apparatus can be applied, but not limited to, in a process of measuring a one-way delay of a network. In the process of measuring the network one-way delay, the data packet may be transmitted by a sender and a receiver of the data packet, so as to measure the network one-way delay between the sender and the receiver. For example, the current address is used as a sender of the data packet, the destination address is used as a receiver of the data packet, the current address can send the data packet to the destination address, and the destination address returns a reply packet to the current address immediately after receiving the data packet. The current address obtains the RTT by recording the time point of sending the data packet to the time point of receiving the reply packet. Whereas if OWD is to be determined, simply dividing RTT by 2 is not accurate. In this embodiment, the current address may send the first data packet to the destination address through a plurality of first paths, and receive a first reply packet returned by the destination address from one first fixed path. Then for each path, a corresponding RTT may be obtained. And according to the RTT, determining an optimal first target path from the plurality of first paths. Similarly, the destination address may also send a second packet to the current address through a plurality of second paths, and after receiving the second packet, the current address sends a second reply packet to the destination address through a second fixed path. There is one RTT for each second path. And selecting the optimal second target path from the plurality of second paths according to the RTT. And finally, sending the data packet and receiving the reply packet according to the first target path and the second target path, thereby calculating the one-way delay.
Optionally, in this embodiment, the content of the data packet sent by the different path may be different between the first data packet and the second data packet. For example, the packet content of the first packet sent by path 1 in the first path may be different from the packet content of the first packet sent by path 2 in the first path. And the second packet sent by path 3 in the second path may be different from the second packet sent by path 4 in the second path.
Optionally, in this embodiment, the current address may send the first packet to the destination address through multiple first paths, and the sending delays of different paths may be different. And receiving the first reply packet through the same first fixed path, so that the RTTs of different first paths can be obtained. The destination address may also send the second packet to the current address via a plurality of second paths, and the sending delays of different paths may be different. And receiving the second reply packet through the same second fixed path, so that the RTTs of different second paths can be obtained. And selecting a path with the minimum RTT from different first paths as a first target path, selecting a path with the minimum RTT from second paths as a second target path, and determining the minimum RTT according to the first target path and the second target path so as to determine the most accurate OWD.
By the embodiment, in the process of determining the network one-way delay, the optimal path for sending the data packet from the current address to the destination address can be determined, then the optimal path for sending the data packet from the destination address to the current address is determined, the one-way delay of the network is determined by using the optimal path, and the determination of the one-way delay through the optimal path is more accurate, so that the accuracy of determining the network one-way delay is improved.
As an optional implementation, the first sending unit includes:
the first processing module is used for taking each first path as a current path and executing the following operations on the current path:
sending a first data packet to a destination address under a current path;
recording a first sending time point of a first data packet;
receiving a first reply packet of a first data packet of a current path from a first fixed path;
a first reception time point at which the first reply packet is received is recorded.
Optionally, in this embodiment, the current address sends the first data packet to the destination address, and the first data packet may be sent through multiple first paths. The contents of the first packets of the plurality of first paths may be different. And sending the first data packet through different first paths, wherein the OWDs of the first data packet received by the destination address are different. When the current address sends the first data packet, recording a first sending time point of each first path for sending the first data packet, then sending the first data packet to a destination address, and immediately returning the first reply packet to the destination address. And if the current address records the first receiving time point of the first reply packet, the RTT corresponding to the first path can be determined.
As an optional implementation manner, the first receiving unit includes:
the first determining module is used for determining the difference value between a first receiving time point and a first sending time point of the current path as a first time length of the current path;
and the second determining module is used for determining the path with the minimum first time length in the plurality of first paths as the first target path.
Optionally, in this embodiment, after the current address sends the first data packet to the destination address through the first path and receives the first reply packet sent by the destination address through the first fixed path, a difference between a first receiving time point at which the first reply packet is received and a first sending time point at which the first data packet is sent may be used as the RTT between the current address and the destination address. And the RTT is minimum, which means that the delay of the first path transmission is minimum. Therefore, the first path is a path for sending the data packet to the destination address by the best current address.
As an optional implementation manner, the second sending unit includes:
the second processing module is used for taking each second path as a current path and executing the following operations on the current path:
receiving a second data packet sent by a destination address under the current path;
and sending a second reply packet of the second data packet of the current path to the destination address from the second fixed path.
Optionally, in this embodiment, the destination address sends the second packet to the current address, and the second packet may be sent through a plurality of second paths. The content of the second packets of the plurality of second paths may be different. And sending a second data packet through a different second path, wherein the OWDs of the second data packet received by the current address are different. And when the destination address sends the second data packet, recording a second sending time point of each second path for sending the second data packet, then sending the second data packet to the current address, and immediately returning a second reply packet to the current address. And the destination address records a second receiving time point of the second reply packet, so that the RTT corresponding to the second path can be determined.
As an optional implementation, the second sending unit includes:
the acquisition module is used for acquiring a second sending time point of a second data packet of the current path and a second receiving time point of a second reply packet of the current path received by the destination address;
a third determining module, configured to determine a difference between the second receiving time point and the second sending time point as a second duration of the current path;
and the fourth determining module is used for determining the path with the minimum second time length in the plurality of second paths as a second target path.
Optionally, in this embodiment, after the destination address sends the second data packet to the current address through the second path and receives the second reply packet sent by the current address through the second fixed path, a difference between a second receiving time point when the second reply packet is received and a second sending time point when the second data packet is sent may be used as the RTT between the current address and the destination address. And the RTT is minimum, which means that the delay of the second path transmission is minimum. Therefore, the second path is a path for transmitting the data packet to the current address by the optimal destination address.
As an optional implementation, the determining unit includes:
a sending module, configured to send a third data packet from the first target path to the destination address;
the first recording module is used for recording a third sending time point of a third data packet;
the receiving module is used for receiving a third reply packet of a third data packet returned by the destination address from the second target path;
the second recording module is used for recording a third receiving time point of the third reply packet;
and the fifth determining module is used for determining half of the difference value between the third receiving time point and the third sending time point as the one-way delay from the current address to the destination address.
Optionally, in this embodiment, after the first destination path and the second destination path are determined, data may be transmitted through the first destination path and the second destination path, so as to calculate the RTT. The current address can send a third data packet to the destination address through the first target path and record a third sending time point, the destination address immediately returns a third reply packet after receiving the third data packet, and the current address records a third receiving time point of the third reply packet when receiving the third reply packet. And subtracting the third sending time point from the third receiving time point, and determining the shortest RTT between the current address and the destination address. Dividing the RTT by 2, and determining the obtained value as the OWD from the current address to the destination address.
In this embodiment, for ECMP, the router uses five tuples (source IP, source port, protocol, destination IP, and destination port) of the network as the basis of multipath load balancing. Thus, a fixed quintuple means that there is a fixed, specific router to take on the traffic in the ECMP scenario, which means a relatively fixed time cost.
Different data can be sent to different ECMP routes through different quintuple attempts, and a quintuple path with the optimal RTT can be obtained by measuring the RTT of the ECMP routes.
Fixing the one-way delay of the loopback packet by fixing the quintuple of the loopback packet; obtaining the optimal RTT by means of different attempts to unpack the quintuple; since the wrap OWD can be considered fixed, the optimal RTT-fixed wrap OWD = optimal decapsulation OWD, the quintuple is an optimal decapsulation quintuple (labeled a). Similarly, doing so on the reverse link as well, the optimal quintuple (labeled B) in reverse can be obtained. And ping-pong the packet by taking A as a packet sending quintuple and B as a packet returning quintuple, and finding out the RTT which can be regarded as the optimal RTT. Let the RTT/2 be the more accurate OWD.
The flow chart is shown in fig. 3. In FIG. 3, A pings B, A uses 10001-10003 ports ping B20000 ports and let B return to A:10000 with 20000 ports as the source address of the packet. The quintuple at this time is (A: 10001-10020) -UDP → (B: 20000). An optimal pentad in this range is available, such as: (A: 10003) -UDP → (B: 20000). The five-element group of the back pack is as follows: (B: 20000) -UDP → (A: 10000). The semantics of the optimal quintuple are: the five-tuple with the lowest depacketization delay on the fixed back-packet path.
In the reverse direction, B ping A is made to wrap back the quintuple A:20000-UDP- > B:10000, and the optimal quintuple (B: 10013) -UDP → (A: 20000) is obtained.
In this case, when A ping B is performed using (A: 10003) -UDP → (B: 20000) and B round-robin using (B: 10013) -UDP → (A: 20000), the optimum RTT can be calculated, and the RTT/2 is closer to the true OWD.
According to yet another aspect of embodiments of the present invention, there is further provided an electronic device for implementing the method for measuring network one-way delay described above, where the electronic device may include a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the steps in the method for measuring network one-way delay of the first aspect described above or the method for measuring network one-way delay of the second aspect described above through the computer program.
According to a further aspect of embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the steps in the method embodiments of measuring network one-way delay of the first and second aspects when executed.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, read-Only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be substantially or partially implemented in the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, or network devices) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is only a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (14)

1. A method for measuring one-way delay of a network, comprising:
sending a first data packet from a plurality of first paths to a destination address and receiving a first reply packet of the first data packet from the destination address from a first fixed path;
determining a first target path from the plurality of first paths according to a first duration from the time when each first path sends the first data packet to the time when the first reply packet is received;
receiving second data packets sent by destination addresses from a plurality of second paths, and sending second reply packets of the second data packets to the destination addresses from a second fixed path;
determining a second target path from the plurality of second paths according to a second duration of each second path from the sending time point of the second data packet to the receiving time point of the second reply packet;
and determining the one-way delay from the current address to the destination address according to the first target path and the second target path.
2. The method of claim 1, wherein sending a first packet from a plurality of first paths to a destination address and receiving a first reply packet of the first packet from the destination address from a first fixed path comprises:
taking each first path as a current path, and executing the following operations on the current path:
sending the first data packet to the destination address under the current path;
recording a first sending time point of the first data packet;
receiving the first reply packet of the first packet of the current path from the first fixed path;
recording a first receiving time point of receiving the first reply packet.
3. The method of claim 2, wherein the determining a first target path from the plurality of first paths according to a first duration from the sending of the first packet to the receiving of the first reply packet for each of the first paths comprises:
determining a difference value between the first receiving time point and the first sending time point of the current path as the first duration of the current path;
and determining the path with the minimum first time length in the plurality of first paths as the first target path.
4. The method of claim 1, wherein receiving second packets sent from a plurality of second paths at a destination address and sending second reply packets for the second packets from a second fixed path to the destination address comprises:
taking each second path as a current path, and executing the following operations on the current path:
receiving the second data packet sent by the destination address under the current path;
transmitting the second reply packet of the second packet of the current path from the second fixed path to the destination address.
5. The method of claim 4, wherein the determining a second target path from the plurality of second paths according to a second duration of each of the second paths from the sending time point of the second data packet to the receiving time point of the second reply packet comprises:
acquiring a second sending time point of the second data packet of the current path and a second receiving time point of the second reply packet of the current path received by the destination address;
determining a difference value between the second receiving time point and the second sending time point as the second time length of the current path;
and determining the path with the minimum second time length in the plurality of second paths as the second target path.
6. The method according to any of claims 1 to 5, wherein the determining the one-way delay from the current address to the destination address according to the first target path and the second target path comprises:
sending a third data packet from the first destination path to the destination address;
recording a third sending time point of the third data packet;
receiving a third reply packet of the third data packet returned by the destination address from the second target path;
recording a third receiving time point of the third reply packet;
determining a half of a difference between the third receiving time point and the third transmitting time point as a one-way delay from the current address to the destination address.
7. An apparatus for measuring one-way delay of a network, comprising:
a first sending unit, configured to send a first packet to a destination address from a plurality of first paths and receive a first reply packet of the first packet from the destination address from a first fixed path;
a first receiving unit, configured to determine, according to a first duration from when each of the first paths sends the first data packet to when the first reply packet is received, a first target path from the multiple first paths;
a second sending unit, configured to receive second data packets sent by destination addresses from multiple second paths, and send second reply packets of the second data packets to the destination addresses from second fixed paths;
a second receiving unit, configured to determine, according to a second duration of each of the second paths from the sending time point of the second data packet to the receiving time point of the second reply packet, a second target path from the plurality of second paths;
and the determining unit is used for determining the one-way delay from the current address to the destination address according to the first target path and the second target path.
8. The apparatus of claim 7, wherein the first sending unit comprises:
a first processing module, configured to take each of the first paths as a current path, and perform the following operations on the current path:
sending the first data packet to the destination address under the current path;
recording a first sending time point of the first data packet;
receiving the first reply packet of the first packet of the current path from the first fixed path;
recording a first receiving time point of receiving the first reply packet.
9. The apparatus of claim 8, wherein the first receiving unit comprises:
a first determining module, configured to determine a difference between the first receiving time point and the first sending time point of the current path as the first duration of the current path;
a second determining module, configured to determine, as the first target path, a path with a smallest first duration among the plurality of first paths.
10. The apparatus of claim 7, wherein the second sending unit comprises:
a second processing module, configured to take each of the second paths as a current path, and perform the following operations on the current path:
receiving the second data packet sent by the destination address under the current path;
transmitting the second reply packet of the second packet of the current path from the second fixed path to the destination address.
11. The apparatus of claim 8, wherein the second sending unit comprises:
an obtaining module, configured to obtain a second sending time point of the second data packet of the current path and a second receiving time point of the second reply packet of the current path received by the destination address;
a third determining module, configured to determine a difference between the second receiving time point and the second sending time point as the second duration of the current path;
a fourth determining module, configured to determine, as the second target path, a path with a minimum second duration in the plurality of second paths.
12. The apparatus according to any one of claims 7 to 11, wherein the determining unit comprises:
a sending module, configured to send a third data packet from the first target path to the destination address;
the first recording module is used for recording a third sending time point of the third data packet;
a receiving module, configured to receive, from the second target path, a third reply packet of the third data packet returned by the destination address;
the second recording module is used for recording a third receiving time point of the third reply packet;
a fifth determining module, configured to determine a half of a difference between the third receiving time point and the third sending time point as a one-way delay from the current address to the destination address.
13. A computer-readable storage medium, in which a computer program is stored, which computer program, when running, performs the method of any one of claims 1 to 6.
14. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN202110897104.7A 2021-08-05 2021-08-05 Method, device, storage medium and electronic equipment for measuring network one-way delay Pending CN115706707A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110897104.7A CN115706707A (en) 2021-08-05 2021-08-05 Method, device, storage medium and electronic equipment for measuring network one-way delay

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110897104.7A CN115706707A (en) 2021-08-05 2021-08-05 Method, device, storage medium and electronic equipment for measuring network one-way delay

Publications (1)

Publication Number Publication Date
CN115706707A true CN115706707A (en) 2023-02-17

Family

ID=85178864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110897104.7A Pending CN115706707A (en) 2021-08-05 2021-08-05 Method, device, storage medium and electronic equipment for measuring network one-way delay

Country Status (1)

Country Link
CN (1) CN115706707A (en)

Similar Documents

Publication Publication Date Title
CN109981457B (en) Message processing method, network node and system
US8477772B2 (en) System and method for determination of routing information in a network
US20060274791A1 (en) Method measuring a delay time metric and measurement system
US11388292B2 (en) Monitoring voice-over-IP performance over the internet
US8117301B2 (en) Determining connectivity status for unnumbered interfaces of a target network device
EP1710976A1 (en) Method of monitoring progress of a signalling message and network monitoring apparatus
US20220029900A1 (en) Detecting sources of computer network failures
US7907599B2 (en) Determination of SIP transport to reduce call setup delays
US11902133B2 (en) Network performance monitoring using an active measurement protocol and relay mechanism
US20060187820A1 (en) Vector routing-revised
CN114584485B (en) Method, apparatus, device and computer readable storage medium for detecting edge network quality
CN105991793B (en) The method and apparatus of message forwarding
CN107852346A (en) The analysis of network performance
EP2586158A1 (en) Apparatus and method for monitoring of connectivity services
CN105634776B (en) method and device for determining message forwarding interface
CN110519103A (en) A kind of Fault Locating Method of heterogeneous network, device and terminal
US11178593B2 (en) Terminal, relay apparatus selection apparatus, communication method, relay apparatus selection method, and program
CN115002008B (en) Method, device, equipment and storage medium for measuring network delay
CN110784378B (en) Method and device for realizing accurate flow balance by using TWAMP (two way operational amplifier)
CN115706707A (en) Method, device, storage medium and electronic equipment for measuring network one-way delay
CN115914081A (en) Method, device, storage medium and electronic equipment for measuring network round trip time
Li et al. Assessing locator/identifier separation protocol interworking performance through RIPE Atlas
CN108337388A (en) Voip communications method and router
Alvarez-Hamelin et al. RFC 9198: Advanced Unidirectional Route Assessment (AURA)
JP5990491B2 (en) Network quality measurement system, method and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination