Fast low-overhead in-band time delay measurement method
By calculating the optimal detection path and recording the transmission time in the SDN network, it solves the high overhead and complexity problems of existing SDN network delay measurement, achieves fast and low-overhead delay measurement, and improves the efficiency and effectiveness of network performance monitoring. Accuracy.
Patent Information
- Application Number
- CN202410684031.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-10
AI Technical Summary
Delay measurement methods in existing SDN networks have high overhead and complex protocols and processes, resulting in poor real-time performance and difficulty in effectively monitoring network performance in high-traffic and large-scale network environments, affecting network performance and reliability.
By calculating the topology of each switch in the network, determine the optimal path for the detection packet, record the transmission time of the detection packet on the path, calculate the delay between switches, and use the Euler path finding algorithm of the Hierholzer algorithm to determine the optimal detection path, reducing bandwidth waste and computational complexity.
It achieves fast and low-overhead delay measurement, improves the accuracy and real-time performance of the measurement, is suitable for high-traffic and large-scale network environments, and reduces network management complexity and bandwidth occupation.
Smart Images

Figure CN118631706A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer networks, and in particular relates to a fast and low-overhead in-band delay measurement method, system, electronic device and computer-readable storage medium. Background Art
[0002] With the continuous development of network communication technology, software defined networking (SDN) as an emerging network architecture has received widespread attention and application in the past few years. SDN provides greater flexibility and programmability for network management and configuration by separating the control plane from the data plane of the network. However, as the scale and complexity of SDN networks increase, the demand for network performance monitoring and optimization is also becoming increasingly significant.
[0003] In traditional SDN networks, latency measurement is one of the key indicators for evaluating network performance and service quality. Latency measurement allows network administrators to monitor the transmission time of data packets from source to destination, thereby helping to identify bottlenecks in the network, improve service quality, and respond to possible problems in a timely manner.
[0004] Latency measurement techniques in SDN networks are divided into two categories, active and passive, depending on whether test probes are used or not. A common feature of active latency measurement in SDN is the sending of test probes through a loop involving the controller. The latter initiates the probes and collects the final results. The SDN controller sends a timestamped probe to the first switch using a PacketOut message. This probe is an Ethernet frame attached to the egress port with the destination link. The first switch then forwards this frame to the second switch, which sends it back to the controller using a PacketIn message. Since the destination address of the frame is a broadcast address, in order to obtain the link latency, the controller captures the probe reception time and subtracts from it the following: its timestamp, its own processing overhead, and the delay of the control channel to each switch. This technique is currently called controller-in-the-loop (CL). The processing overhead of the controller depends on its functionality, so each platform needs to be calibrated by measuring the delay of unused links. The delay between the controller and each switch is measured by taking half the RTT of the statistics request and response messages they exchange. Assuming that the control channel is delay-symmetric, the delay of a path involving multiple switches consists of the measured delays of all its links. These delays are added to the processing overhead multiplied by the number of hops. However, since the probes for each link are not transmitted in sequence along the path, they do not experience exactly the same latency as normal packets, especially if there is highly variable queuing. In fact, the egress port that sends the probe to the controller is not the same port that forwards the packet to the next switch. Typically, each egress port has its separate output queue. In addition, this technique cannot accurately measure end-to-end latency because it does not include the latency between each end host and its nearby switches.
[0005] Altukhov and Chemeritskiy proposed a method to improve the CL technique to eliminate the control channel delay deviation. The latter can be several orders of magnitude larger than the path delay. This scheme is called multi-data loop (MDL) because the idea is to loop the probe multiple times between the first and last switches of the target data path. At the beginning of the loop and regularly after a certain number of iterations, the first switch sends a pulse message containing the number of iterations to the controller. This is achieved by modifying the switch's forwarding table using special rules using OpenFlow's FlowMod message. The controller can then obtain a more accurate measurement of the path RTT by receiving the time between consecutive pulse messages and dividing it by the number of iterations. The advantage of this scheme is that it avoids control channel delays because the pulse message is sent after the probe enters the data path. It also takes into account the queuing delay in the data path. MDL can also calculate the path delay by accumulating the delays of its links. However, this will further increase the network overhead, especially when the delays of many paths need to be measured simultaneously. In addition, since the controller will receive a large number of pulse messages, it may become a performance bottleneck. In this case, the overhead can be alleviated by avoiding redundant measurements of links shared between many paths. The delays of all links in the network are mapped by selecting the minimum number of independent long cycles that cover these links. This is somewhat similar to the CP technique discussed previously. To avoid the exponential explosion of the search based on finding the graph spanning tree, they use a greedy algorithm to combine these basic cycles to maximize their length. However, the number of forwarding rules required for each switch in this method is quite high. It is proportional to the number of cycles and the number of switches on the path. For example, for a low-density five-node graph, a total of about 100 rules are required to map the delays of the links.
[0006] Sinha et al. improve on previous MDL techniques by limiting the number of forwarding rules per switch to only three. They restrict the loop to one link and utilize the IP Time to Live (TTL) field to count their iterations, a scheme known as TTL-based looping (TL). The controller installs three rules in each switch: (i) reduce the TTL of the probe on the source switch and forward it to the next switch, (ii) loop it back to the first switch when it reaches the destination switch, and (iii) send it to the controller when the TTL becomes zero. The controller calculates the link delay by dividing the time difference between the probe emission and reception by the number of iterations. By repeatedly looping over all links, the path delay can be measured. Therefore, this approach suffers from the same drawbacks of previous mechanisms that measure the delay of each link. In other words, it cannot model the exact behavior of packets traveling along consecutive links. Its relative error is not reported. Regarding network-wide delay measurement, the authors formulate a vertex cover problem (VCP) on an undirected graph of the network to measure all its links. In other words, they select the switches that will loop the LLDP packets by finding the minimum vertex cover. This helps minimize the overhead on the control plane and the data plane. For tree-based topologies commonly found in data centers, the authors solve the VCP using a greedy algorithm that performs better than an exponentially exhaustive search.
[0007] Ramanathan et al. proposed the SDProber mechanism for latency measurement in SDN. It generates test probes along the path between measurement points. These points mirror the probes to a collector node which compares their reception time to estimate the latency. SDProber generates a total number of probes within the defined network operator range by limiting the probe rate of the links to limit its overhead. It then computes the shortest path covering all links while satisfying these constraints. Since this computation is NP-hard, the authors propose to use a pseudo-random walk on a weighted directed graph of the network. Link weights are used in the forwarding rules of the switches when selecting the next link to be visited by the probe. A high weight increases the probability of visiting the relevant link in the next iteration of the pseudo-random walk. SDProber uses binary exponential backoff after each iteration to adjust the weights to maintain the probe rate between the configured boundaries. Specifically, for links with normal latency, it halves the weight of the link, while for unchecked links, it doubles the weight. Similarly, it halves (doubles) the weight when the weight crosses the low (high) link boundary. Additionally, the weights of links that have recently experienced high latency are multiplied by a higher factor to enable faster detection of congestion. Weight adjustments will occur indefinitely as long as monitoring continues. This raises the question of the convergence of random walks (i.e., the number of steps required to cover all links when monitoring a period of short duration). The coverage time of a random walk, i.e., the number of steps required to visit each node, is polynomial O(n3 ), where n is the number of nodes. Due to this mechanism, it takes about 50 to 80 seconds to detect the delay of all links. Passive mechanisms for delay estimation in SDN rely on modifying data packets to carry timestamps at one or more measurement points. We choose to classify it as a passive technique because it does not use probes.
[0008] Hira and Wobker provide a usage example through the Inband Network Measurement (INT) specification, which is part of the P4 switch programming language. The measurements are made by OVS switch instances deployed on endpoint hosts. The first switch embeds P4 instructions in packets for network nodes to report their forwarding delays. Each intermediate switch adds a four-byte record in each packet containing the time the packet took to travel between its ingress and egress ports. The last switch collects these one-hop delay records and adds them to calculate the packet end-to-end latency. INT assumes that switch processing and queuing delays dominate transmission and propagation delays. This is correct for data center networks, so clock synchronization is not required, but incorrect for wide area networks. It has the advantage of completely bypassing the SDN control plane. In addition, INT can accurately locate nodes that cause long delays because the latency of each host is available at the last switch in each packet. Nonetheless, every packet is modified at each hop and hardware timestamping is required at high traffic rates to accurately assess latency, otherwise it will increase switch processing time and therefore delivery latency. In addition, the technique incurs a bandwidth overhead that grows linearly with the number of packets and path length.
[0009] Mizrahi and Moses advocate the use of data plane timestamping (DTP) in SDN for three use cases, including latency measurement. DTP adds a timestamp to the header of each packet as it traverses the first switch. It removes this timestamp at the last switch before the packet leaves the network. For latency estimation between any two switches, DTP requires their clocks to be synchronized. It divides the traffic into blocks of fixed time intervals (e.g., 1 minute). For each block, the first switch saves the transmission time of the first packet, while the second switch saves the reception time of this packet. The DTP controller periodically queries these saved times and uses them to calculate the latency at the path aggregation level. DTP has high overhead in terms of storage and processing because each packet needs to be timestamped. This needs to be done in hardware to keep up with high-speed line rates.
[0010] SDN’s central global view of the network facilitates simultaneous latency measurements with lower overhead compared to traditional networks. In mechanisms that rely on a controller, the latter is aware of the links shared between different paths and can therefore measure once and share the results (e.g., MDL and TLL). It can also adjust the probe rate based on the state of the flow and the requirements of the network operator (e.g., OpenNetMon and SDProber). However, in addition to being a single point of failure, the controller can also be a performance bottleneck. Therefore, the rate of measurement messages needs to be adjusted based on the control plane capacity. Similarly, mechanisms that rely on a query engine also plan the execution of multiple measurement queries with a global view of the network to limit the overhead. However, this comes at the cost of reduced accuracy (e.g., PINT) or limited coverage (e.g., Marple).
[0011] In some cases, planning network-wide measurements with minimal overhead requires an exponential search of the network topology, such as finding the set of all spanning trees in many loop techniques, finding the minimum vertex cover in TLL, and finding constraints that satisfy the shortest path in SDProber. Furthermore, such searches are inflexible, as changes to the network may require recalculation.
[0012] Existing delay measurement technologies still face some challenges in some aspects. First, traditional delay measurement methods usually involve complex protocols and processes, resulting in high overhead in the measurement process. This not only increases the complexity of network management, but also reduces real-time performance, making it difficult to respond in time when the network fails or performance degrades. Many existing delay measurement schemes introduce considerable overhead when performing measurements, including the occupation of network bandwidth and excessive consumption of computing resources. This limits the feasibility of these methods in high-traffic and large-scale network environments, affecting the overall performance of SDN networks. Secondly, existing delay measurement technologies have certain limitations in bandwidth utilization and accuracy. The network bandwidth of the air defense and anti-missile tactical integrated communication network can often reach 2Mbps. Under high load conditions, traditional methods may not be able to provide sufficiently accurate delay information, thereby affecting the overall performance of the network and making it difficult to meet the needs of the air defense and anti-missile tactical integrated communication network. Summary of the invention
[0013] The purpose of the present invention is to solve the problems existing in the delay measurement in the traditional SDN network and provide a fast and low-overhead in-band delay measurement method. By introducing innovative technologies, the present invention aims to overcome the limitations of the prior art and bring higher accuracy, real-time and scalability to the delay measurement in the SDN network.
[0014] The present invention is dedicated to realizing the rapid and low-cost delay measurement in SDN networks to improve the efficiency of network performance monitoring and management. Compared with traditional measurement methods, this new delay measurement method is more in line with actual application scenarios, generates lower overhead, and obtains network status more quickly.
[0015] The first object of the present invention is to provide a fast and low-overhead in-band delay measurement method, comprising the following steps:
[0016] S1. Obtain the topology of each switch in the network through the controller;
[0017] S2, according to the topology of each switch in the network obtained in step S1, calculate the optimal path for the detection packet to pass through each switch, that is, the detection path;
[0018] S3, according to the detection path calculated in step S2, sending a detection packet to each switch on the path;
[0019] S4, based on step S3, recording the time when each switch on the path receives and sends the detection packet on the detection packet;
[0020] S5. Recover the detection packet, and calculate the delay between switches based on the time when each switch receives and sends the detection packet recorded in step S4.
[0021] Preferably, step S2 comprises the following steps:
[0022] S21, according to the topology of each switch in the network obtained in step S1, put the switches into the point set S, put all the network cables into the edge set E, and create an empty set E' to put the used edges;
[0023] S22, select the switch S0 connected to the controller as the root switch, and select another switch S1 connected to the root switch, then the initial path is a loop (S0, S1) from the root switch S0 to the above switch S1 and then back to the root switch S0, S1,, S0), put the edges in the loop from the edge set E of step S21 into the used edge set E';
[0024] S23. Based on step S22, if any switch S in the path i ∈S path , and there are still edges (S i ,S j ) in the edge set E, add this edge (S i ,S j ) and its reverse edge (S j ,S i ) Add the used edge set E' from the edge set E;
[0025] S24. Repeat step S23 until the edge set E is an empty set. The path obtained by this operation is the detection path.
[0026] Preferably, step S3 comprises the following steps:
[0027] S31, according to the detection path calculated in step S2, obtain the switch port through which the detection packet passes;
[0028] S32, according to the detection path calculated in step S2 and the switch port calculated in step S31, a flow table for the detection packet is issued to the switch on the detection path, and a port for forwarding the detection packet is specified;
[0029] S33. Send a detection packet to each switch on the path according to the port obtained in step S32.
[0030] Preferably, step S4 comprises the following steps:
[0031] S41, based on step S3, recording the time when the previous switch on the path receives the detection packet on the detection packet to obtain the arrival time of the detection packet;
[0032] S42. Based on step S3, the time of forwarding the detection packet to the next switch on the path is recorded on the detection packet to obtain the detection packet sending time.
[0033] A second object of the present invention is to provide a fast and low-overhead in-band delay measurement system, comprising:
[0034] The controller is used to obtain the topology of each switch in the network, send detection packets to each switch on the path according to the detection path calculated by the delay path calculation module, and recover the detection packets; generate detection packets, send the detection packets to each switch along the path obtained by the delay path calculation module, and recover the detection packets and then hand them over to the delay detection module for calculation;
[0035] The delay path calculation module is used to calculate the optimal path for the detection packet to pass through each switch, that is, the detection path, according to the topology of each switch in the network obtained by the controller;
[0036] The Open vSwitch latency module is used to record the time when each switch on the path receives and sends the probe packet.
[0037] The delay detection module is used to calculate the delay between switches according to the time when each switch receives and sends the detection packet recorded in the recovered detection packet.
[0038] A third object of the present invention is to provide an electronic device, comprising:
[0039] at least one processor; and,
[0040] a memory communicatively connected to the at least one processor; wherein,
[0041] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the above-mentioned fast and low-overhead in-band delay measurement method.
[0042] A fourth object of the present invention is to provide a computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the above-mentioned fast and low-overhead in-band delay measurement method is implemented.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] (1) Compared with the random walk-based SDProber and other algorithms, the present invention uses the method of first calculating the detection path and then performing active detection through the detection path, and uses the delay path calculation module to calculate the optimal detection path, thus avoiding the O(n) time-consuming and time-consuming traditional method. 3 )’s time complexity, which solves the shortcoming of each detection taking too long and is more suitable for the structure of tactical communication networks;
[0045] (2) For the selection of the global search path, this method uses the Euler path finding algorithm based on the Hierholzer algorithm. Compared with the previous methods of finding the set of all spanning trees, finding the minimum vertex cover in TLL, and finding the constraints that satisfy the shortest path in SDProber, this method uses the characteristics of the integrated network to not only determine an optimal detection path, but also measure the delay size of the two directions of a link respectively;
[0046] (4) The present invention calculates the same detection path including multiple links and uses the same detection packet to perform a detection, thereby avoiding bandwidth waste and achieving maximum bandwidth utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A structural diagram of a fast and low-overhead in-band delay measurement method provided by an embodiment of the present invention;
[0048] Figure 2 This is the schematic diagram of the traditional delay measurement;
[0049] Figure 3 is a schematic diagram of the structure of a detection package in an embodiment of the present invention;
[0050] Figure 4 This is a flow chart of the Open vSwitch latency module;
[0051] Figure 5 Schematic diagram of the calculation flow of the delay path calculation module. DETAILED DESCRIPTION
[0052] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] like Figure 2 As shown, the core idea of the traditional delay measurement method is explained below with an example
[0054] (1) Obtain the detection packet transmission time T travel : Assuming there are only two switches S1 and S2, the controller encapsulates the detection data packet through the Packet-Out message and sends it to switch S1, and forwards the detection packet to S2 from the specified port. After S2 receives the data packet, since there is no matching flow table entry, it will trigger the Packet-In message, encapsulate the detection packet and return it to the controller. By analyzing the fields of the detection packet, the controller can obtain the transmission time T of the detection packet on the "controller-S1-S2-controller" path travel .
[0055] (2) Obtaining the round-trip time (RTT) between the controller and the switch: According to the OpenFlow protocol, the controller generates an EchoRequest message and sends it to switches S1 and S2 respectively, and records the time when the Echo Reply message is received to obtain the round-trip transmission time (RTT) between the controller and the switch;
[0056] (3) Based on the measurement results of (1) and (2) above, the delay T between switches S1 and S2 is calculated by the following formula: delay :
[0057]
[0058] Among them, RTT S1 Refers to the round-trip transmission time between the controller and switch S1, RTT S2 Refers to the round-trip transmission time between the controller and switch S2, T travel Refers to the transmission time of the detection packet.
[0059] Through the above analysis, it can be seen that the above-mentioned traditional delay measurement method needs to detect each path when measuring the delay, so more bandwidth is required. In addition, for such multiple detections, the delay of the entire path cannot be obtained at one time, and it is easily affected by environmental noise and interference, which will lead to inaccurate measurement results, thereby affecting the performance of the system. Due to the high complexity and requirements for computing resources, traditional methods may not be able to meet some application scenarios with high real-time requirements, such as real-time communication systems or real-time positioning systems. Traditional methods may have limitations in certain specific environments or application scenarios. For example, in a multipath propagation environment, traditional methods may not be able to accurately measure the delay. Therefore, the present invention proposes a fast and low-overhead in-band delay measurement method.
[0060] like Figure 3 As shown, the detection packet structure in the embodiment of the present invention is a UDP packet (i.e., IP type 17), and the detection packet structure includes source IP, destination IP, sport and dport. Figure 3 The reason why there are two destination IPs is due to line breaks. There is actually only one destination IP. The detection packet can be identified by the OvS switch and the propagation path is controlled by the flow table. The delay information is contained in the UDP payload. The first 4 bytes are the number of timestamps, and each of the following 4 bytes is a timestamp accurate to nanoseconds.
[0061] Example 1
[0062] like Figure 1 As shown, the embodiment of the present invention provides a fast and low-overhead in-band delay measurement method, which is applied to an air defense and anti-missile tactical integrated communication network, and specifically includes the following steps:
[0063] S1. Obtain the topology of each switch in the network through the controller;
[0064] S2. According to the topology of each switch in the network obtained in step S1, the optimal path for the detection packet to pass through each switch is calculated, that is, the detection path, such as Figure 5 As shown, the following steps are included:
[0065] S21, according to the topology of each switch in the network obtained in step S1, put the switches into the point set S, put all the network cables into the edge set E, and create an empty set E' to put the used edges;
[0066] S22, select the switch S0 connected to the controller as the root switch, and select another switch S1 connected to the root switch, then the initial path is a loop (S0, S1) from the root switch S0 to the above switch S1 and then back to the root switch S0, S1,, S0), put the edges in the loop from the edge set E of step S21 into the used edge set E';
[0067] S23. Based on step S22, if any switch S in the path i ∈S path , and there are still edges (S i ,S j ) in the edge set E, add this edge (S i ,S j ) and its reverse edge (S j ,S i ) Add the used edge set E' from the edge set E;
[0068] S24, until the edge set E is an empty set, repeat step S23, and the path obtained by the operation is the detection path;
[0069] S3, according to the detection path calculated in step S2, send a detection packet to each switch on the path, such as Figure 4 As shown, the following steps are included:
[0070] S31, calculating the switch port through which the detection packet passes according to the detection path calculated in step S2;
[0071] S32, according to the detection path calculated in step S2 and the switch port calculated in step S31, a flow table for the detection packet is issued to the switch on the detection path, and the port to which the detection packet is forwarded is specified; specifically, to match the detection packet in the flow table, it is necessary to specify the protocol, MAC address, IP address, UDP port and switch inlet port of the detection packet. When the flow table matches a data packet with exactly the same data as these items, that is, the detection packet, it is forwarded to the next switch in the path through the port calculated in step S31;
[0072] S33. Send a detection packet to each switch on the path according to the port obtained in step S32.
[0073] S4. Based on step S3, the time when each switch on the path receives and sends the detection packet is recorded on the detection packet, which specifically includes the following steps:
[0074] S41, based on step S3, recording the time when the previous switch on the path receives the detection packet on the detection packet to obtain the arrival time of the detection packet;
[0075] S42. Based on step S3, the time of forwarding the detection packet to the next switch on the path is recorded on the detection packet to obtain the detection packet sending time.
[0076] S5 retrieves the detection packet and calculates the delay between switches based on the time when each switch receives and sends the detection packet recorded in step S4. Specifically, for a detection path (S0, S1),…, (S i,S0), the timestamp number field in the detection packet is 2n, and the subsequent data contains 2n timestamps, which are recorded as T 0,out,1 ,T 1,in,0 ,T 1,out,2 ,T 2,in,3 ,…,T 0,in,i ,In this way, the delay of each link can be expressed by formula T 0,1 =T 1,in,0 -T 0,out,1 Calculated.
[0077] As packets pass through the controller, the functions in the Open vSwitch latency module record the timestamp in the payload when receiving and forwarding probe packets, and increment the timestamp count field by 1.
[0078] Example 2
[0079] The fast low-overhead in-band delay measurement method provided by the embodiment of the present invention is basically the same as that of the embodiment 1, except that the steps of step S2 are different. Step S2 in this embodiment is aimed at if the links in the network can be considered to be symmetrical, that is, only the delay in one direction needs to be measured, then a similar algorithm can be used, and only a path needs to be added to the odd node of the network when the algorithm cannot be performed, and the algorithm is continued, and then deleted after the algorithm is completed. Step S2 specifically includes the following steps:
[0080] S21, according to the topology of each switch in the network obtained in step S1, put the switches into the point set S, put all the network cables into the edge set E, create an empty set E' to put the used edges, add an edge between every two odd nodes, and add these virtual edges to the virtual edge set and the edge set;
[0081] S22, select the switch S0 connected to the controller as the root switch, and select another switch S1 connected to the root switch, then the initial path is a loop (S0, S1) from the root switch S0 to the above switch S1 and then back to the root switch S0, S1,, S0), put the edges in the loop from the edge set E of step S21 into the used edge set E';
[0082] S23. Based on step S22, if any switch S in the path i ∈S path , and there are still edges (S i ,S j ) in the edge set E, add this edge (S i ,S j ) and its reverse edge (S j ,S i ) Add the used edge set E' from the edge set E;
[0083] S24, until the edge set E is an empty set, repeat step S23, and the path obtained by the operation, after removing all virtual edges, is the detection path.
[0084] Example 3
[0085] In order to implement the fast low-overhead in-band delay measurement method proposed in Example 1, the embodiment of the present invention provides a fast low-overhead in-band delay measurement system, which specifically includes:
[0086] The controller is used to obtain the topology of each switch in the network, send detection packets to each switch on the path according to the detection path calculated by the delay path calculation module, and recover the detection packets; generate detection packets, send the detection packets to each switch along the path obtained by the delay path calculation module, and recover the detection packets and then hand them over to the delay detection module for calculation;
[0087] The delay path calculation module is used to calculate the optimal path for the detection packet to pass through each switch, that is, the detection path, according to the topology of each switch in the network obtained by the controller;
[0088] The Open vSwitch latency module is used to record the time when each switch on the path receives and sends the probe packet.
[0089] The delay detection module is used to calculate the delay between switches according to the time when each switch receives and sends the detection packet recorded in the recovered detection packet.
[0090] Example 4
[0091] An embodiment of the present invention provides an electronic device, the electronic device comprising:
[0092] at least one processor; and,
[0093] a memory communicatively connected to the at least one processor; wherein,
[0094] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the above-mentioned fast and low-overhead in-band delay measurement method.
[0095] Example 5
[0096] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above-mentioned fast and low-overhead in-band delay measurement method when executed by a processor.
[0097] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A fast and low-overhead in-band delay measurement method, It is characterized in that The following steps are involved: S1. Obtain the topology of each switch in the network through the controller; S2, according to the topology of each switch in the network obtained in step S1, calculate the optimal path for the detection packet to pass through each switch, that is, the detection path; S3, according to the detection path calculated in step S2, sending a detection packet to each switch on the path; S4. Based on step S3, the time when each switch on the path receives and sends the detection packet is recorded on the detection packet; S5. Recover the detection packet, and calculate the delay between switches based on the time when each switch receives and sends the detection packet recorded in step S4.
2. The fast low-overhead in-band delay measurement method according to claim 1, It is characterized in that Step S2 comprises the following steps: S21, according to the topology of each switch in the network obtained in step S1, put the switches into the point set S, put all the network cables into the edge set E, and create an empty set E' to put the used edges; S22, select the switch S connected to the controller 0 As the root switch, select another switch S connected to the root switch 1 , then the initial path is the root switch S 0 To the above switch S 1 Return to the root switch S 0 A loop (S 0 ,S 1 ), S 1 ,,S 0 ), put the edges in the loop from the edge set E in step S21 into the used edge set E'; S23. Based on step S22, if any switch S in the path i ∈S path , and there are still edges (S i ,S j ) in the edge set E, add this edge (S i ,S j ) and its reverse edge (S j ,S i ) Add the used edge set E' from the edge set E; S24. Repeat step S23 until the edge set E is an empty set. The path obtained by this operation is the detection path.
3. The fast low-overhead in-band delay measurement method according to claim 1, It is characterized in that Step S3 includes the following steps: S31, according to the detection path calculated in step S2, obtain the switch port through which the detection packet passes; S32, according to the detection path calculated in step S2 and the switch port calculated in step S31, a flow table for the detection packet is issued to the switch on the detection path, and a port for forwarding the detection packet is specified; S33. Send a detection packet to each switch on the path according to the port obtained in step S32.
4. The fast low-overhead in-band delay measurement method according to claim 1, It is characterized in that Step S4 comprises the following steps: S41, based on step S3, recording the time when the previous switch on the path receives the detection packet on the detection packet to obtain the arrival time of the detection packet; S42. Based on step S3, the time of forwarding the detection packet to the next switch on the path is recorded on the detection packet to obtain the detection packet sending time.
5. A fast and low-overhead in-band delay measurement system, It is characterized in that include: The controller is used to obtain the topology of each switch in the network, send detection packets to each switch on the path according to the detection path calculated by the delay path calculation module, and recover the detection packets; generate detection packets, send the detection packets to each switch along the path obtained by the delay path calculation module, and recover the detection packets and then hand them over to the delay detection module for calculation; The delay path calculation module is used to calculate the optimal path for the detection packet to pass through each switch, that is, the detection path, according to the topology of each switch in the network obtained by the controller; The Open vSwitch latency module is used to record the time when each switch on the path receives and sends the probe packet. The delay detection module is used to calculate the delay between switches according to the time when each switch receives and sends the detection packet recorded in the recovered detection packet.
6. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the fast low-overhead in-band delay measurement method as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the fast and low-overhead in-band delay measurement method according to any one of claims 1 to 4 is implemented.
Citation Information
Cited By
Topology detection method, device, system and equipment for distributed PLC (Programmable Logic Controller) system
CN120474924A
Topology detection methods, devices, systems and equipment for distributed PLC systems
CN120474924B
