WO2025055769A1 - Latency measurement method and apparatus, and device and computer-readable storage medium - Google Patents
Latency measurement method and apparatus, and device and computer-readable storage medium Download PDFInfo
- Publication number
- WO2025055769A1 WO2025055769A1 PCT/CN2024/116298 CN2024116298W WO2025055769A1 WO 2025055769 A1 WO2025055769 A1 WO 2025055769A1 CN 2024116298 W CN2024116298 W CN 2024116298W WO 2025055769 A1 WO2025055769 A1 WO 2025055769A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- message
- timestamp
- path
- delay
- network
- Prior art date
Links
- 238000003860 storage Methods 0.000 title claims abstract description 36
- 238000000691 measurement method Methods 0.000 title claims abstract description 19
- 238000000034 method Methods 0.000 claims abstract description 81
- 238000012545 processing Methods 0.000 claims abstract description 51
- 230000005540 biological transmission Effects 0.000 claims abstract description 25
- 238000001514 detection method Methods 0.000 claims description 175
- 238000005259 measurement Methods 0.000 claims description 53
- 230000015654 memory Effects 0.000 claims description 48
- 238000004590 computer program Methods 0.000 claims description 15
- 238000004891 communication Methods 0.000 abstract description 22
- 230000008569 process Effects 0.000 description 30
- 238000010586 diagram Methods 0.000 description 23
- 230000006870 function Effects 0.000 description 16
- 238000005516 engineering process Methods 0.000 description 14
- 239000003795 chemical substances by application Substances 0.000 description 11
- 230000002159 abnormal effect Effects 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 7
- 230000004044 response Effects 0.000 description 6
- 239000004744 fabric Substances 0.000 description 5
- 239000010410 layer Substances 0.000 description 5
- 239000000243 solution Substances 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 3
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 238000005538 encapsulation Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 239000013307 optical fiber Substances 0.000 description 3
- 230000008447 perception Effects 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 230000002776 aggregation Effects 0.000 description 2
- 238000004220 aggregation Methods 0.000 description 2
- 239000012792 core layer Substances 0.000 description 2
- 238000007405 data analysis Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000001934 delay Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000000523 sample Substances 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000012800 visualization Methods 0.000 description 2
- RZVAJINKPMORJF-UHFFFAOYSA-N Acetaminophen Chemical compound CC(=O)NC1=CC=C(O)C=C1 RZVAJINKPMORJF-UHFFFAOYSA-N 0.000 description 1
- 235000008694 Humulus lupulus Nutrition 0.000 description 1
- 101100352764 Mus musculus Podn gene Proteins 0.000 description 1
- 241001025261 Neoraja caerulea Species 0.000 description 1
- 241000238633 Odonata Species 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000011065 in-situ storage Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 239000012085 test solution Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012384 transportation and delivery Methods 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
Definitions
- the present application relates to the field of communication technology, and in particular to a delay measurement method, device, equipment and computer-readable storage medium.
- the present application provides a delay measurement method, apparatus, device, and computer-readable storage medium to accurately measure the network delay on a path.
- the technical solution is as follows:
- a delay measurement method comprising: a first device sends a first message to a second device, the transmission path of the first message is a first path; the first device obtains a first delay of the first path determined based on a first timestamp and a second timestamp, the first timestamp is a timestamp of sending the first message recorded by a network card on the first device, and the second timestamp is a timestamp of receiving the first message recorded by the network card on the second device.
- the timestamp recorded by the network card in the present application is a hardware timestamp.
- the first delay determined according to the timestamp is the network delay on the first path between the first device and the second device. This can avoid the long-tail delay caused by the delay in processing messages by the first device and the second device, and can realize the binding of delay and path.
- the first device before the first device sends the first message to the second device, it also includes: the first device sends a path detection message to the second device, the path detection message includes first indication information, and the first indication information indicates that a detection result message is returned based on the path detection message; the first device receives at least one detection result message returned based on the path detection message, and the detection result message includes information about the physical port and virtual port of the network device that sends the detection result message; the first device determines at least one path between the first device and the second device based on the information about the physical port and virtual port of at least one network device included in the at least one detection result message; the first device selects a first path from the at least one path.
- the first device clarifies each path between the first device and the second device through a path detection message and a detection result message, and selects a first path among each hop path between the first device and the second device, so that the first message can be transmitted along the first path, and the delay on the first path is measured to achieve binding of the delay and the path.
- the first message includes second indication information, and the second indication information indicates that the second message is returned based on the first message; before the first device obtains the first delay of the first path determined based on the first timestamp and the second timestamp, it also includes: the first device receives at least one second message sent by at least one first network device through which the first message passes, and any second message includes information about the first physical port and the first virtual port of the first network device that sends any second message; the first device determines the first path based on the information about the first physical port and the first virtual port of at least one first network device included in the at least one second message, and the first path includes the first device, the second device, and at least one first network device through which the first message passes.
- the first device sends a first message carrying second indication information, receives a second message returned by the first network device based on the first message, clarifies the first network devices passed by the first message, and further clarifies the first path for transmitting the first message, so that the first device can bind the acquired first delay to the first path.
- the first device obtains a first delay of a first path determined based on a first timestamp and a second timestamp, including: the first device receives a message including a second timestamp sent by a centralized device or a second device based on a first message, and obtains the second timestamp from the message including the second timestamp; the first device determines the first delay of the first path according to the first timestamp and the second timestamp.
- the first device obtains the second timestamp and autonomously calculates the first delay according to the first timestamp and the second timestamp, thereby improving the efficiency of obtaining the first delay.
- the first device obtains the first delay of the first path determined based on the first timestamp and the second timestamp, including: the first device sends a message including the first timestamp to the second device or the centralized device, the first timestamp is used by the second device or the centralized device to determine the first delay of the first path; the first device receives the message including the first delay sent by the second device or the centralized device, the first delay is determined by the second device or the centralized device based on the first timestamp and the second timestamp; the first device obtains the first delay from the message including the first delay.
- the first device obtains the first delay by sending the first timestamp to the second device or the centralized device and receiving the first delay determined and sent by the second device or the centralized device based on the first timestamp and the second timestamp, without the need for the first device to autonomously calculate the first delay, thereby reducing the calculation pressure of the first device.
- the first device after the first device obtains the first delay of the first path determined based on the first timestamp and the second timestamp, it also includes: the first device receives the third message sent by the second device based on the first message, and the transmission path of the third message is the second path; the first device obtains the second delay of the second path determined based on the third timestamp and the fourth timestamp, the third timestamp is the timestamp of receiving the third message recorded by the network card on the first device, and the fourth timestamp is the timestamp of sending the third message recorded by the network card on the second device.
- the first device can also obtain the second delay of the third message returned by the second device on the second path based on a similar method to obtaining the first delay.
- the second delay is the network delay between the first device and the second device, which can avoid the long tail delay caused by the end processing delay of the first device and the second device, and realize the binding of delay and path.
- the first device obtains the second delay of the second path determined based on the third timestamp and the fourth timestamp, including: the first device receives a message including a fourth timestamp sent by the centralized device or the second device based on the third message, and obtains the fourth timestamp; the first device determines the second delay of the second path according to the third timestamp and the fourth timestamp.
- the first device obtains the fourth timestamp and autonomously calculates the second delay according to the third timestamp and the fourth timestamp, thereby improving the efficiency of obtaining the second delay.
- the first device obtains the second delay of the second path determined based on the third timestamp and the fourth timestamp, including: the first device sends a message including the third timestamp to the second device or the centralized device, the third timestamp is used by the second device or the centralized device to determine the second delay of the second path; the first device receives the message including the second delay sent by the second device or the centralized device, the second delay is determined by the second device or the centralized device based on the third timestamp and the fourth timestamp; the first device obtains the second delay from the message including the second delay.
- the first device obtains the second delay by sending the third timestamp to the second device or the centralized device and receiving the second delay determined and sent by the second device or the centralized device based on the third timestamp and the fourth timestamp, without the need for the first device to autonomously calculate the second delay, thereby reducing the calculation pressure of the first device.
- the method further includes: for any one of the at least one first network devices, the first device determines the information of the second virtual port corresponding to the first physical port of any one of the first network devices; the first device updates the first message based on the information of the second virtual port to obtain an updated message, and the updated message includes the information of the second virtual port; the first device sends the updated message to the second device, and the transmission path of the updated message is the first path; the first device obtains the third delay of the first path determined based on the fifth timestamp and the sixth timestamp, the fifth timestamp is the timestamp of sending the updated message recorded by the network card on the first device, and the sixth timestamp is the timestamp of receiving the updated message recorded by the network card of the second device.
- the first device can update the first message based on the information of the second virtual port, so that the first device and the second device re-establish a connection according to the updated message.
- the third delay of the first path when transmitting based on the new virtual port is re-detected.
- a delay measurement device which includes: a transceiver module for sending a first message to a second device, the transmission path of the first message being a first path; a processing module for obtaining a first delay of the first path determined based on a first timestamp and a second timestamp, the first timestamp being the timestamp of sending the first message recorded by a network card on the first device, and the second timestamp being the timestamp of receiving the first message recorded by the network card on the second device.
- the transceiver module is also used to send a path detection message to the second device, the path detection message includes first indication information, and the first indication information indicates that a detection result message is returned based on the path detection message; receive at least one detection result message returned based on the path detection message, the detection result message includes information about the physical port and virtual port of the network device that sent the detection result message; the processing module is also used to determine at least one path between the first device and the second device based on information about the physical port and virtual port of at least one network device included in at least one detection result message; and select a first path from the at least one path.
- the first message includes second indication information, and the second indication information indicates that the second message is returned based on the first message;
- the transceiver module is also used to receive at least one second message sent by at least one first network device through which the first message passes, and any second message includes information about the first physical port and the first virtual port of the first network device that sends any second message;
- the processing module is also used to determine the first path based on the information about the first physical port and the first virtual port of at least one first network device included in the at least one second message, and the first path includes the first device, the second device, and at least one first network device through which the first message passes.
- the processing module is configured to receive a message including a second time and a second time sent by the centralized device or the second device based on the first message.
- the message including the time stamp is obtained by obtaining the second time stamp from the message including the second time stamp; and the first delay of the first path is determined according to the first time stamp and the second time stamp.
- a processing module is used to send a message including a first timestamp to a second device or a centralized device, where the first timestamp is used by the second device or the centralized device to determine a first delay of a first path; receive a message including a first delay sent by the second device or the centralized device, where the first delay is determined by the second device or the centralized device based on the first timestamp and the second timestamp; and obtain the first delay from the message including the first delay.
- the transceiver module is also used to receive a third message sent by the second device based on the first message, and the transmission path of the third message is the second path; the processing module is also used to obtain a second delay of the second path determined based on a third timestamp and a fourth timestamp, the third timestamp is the timestamp of receiving the third message recorded by the network card on the first device, and the fourth timestamp is the timestamp of sending the third message recorded by the network card on the second device.
- the processing module is used to receive a message including a fourth timestamp sent by the centralized device or the second device based on the third message, obtain the fourth timestamp; and determine the second delay of the second path according to the third timestamp and the fourth timestamp.
- the processing module is used to send a message including a third timestamp to a second device or a centralized device, where the third timestamp is used by the second device or the centralized device to determine a second delay of a second path; receive a message including a second delay sent by the second device or the centralized device, where the second delay is determined by the second device or the centralized device based on the third timestamp and a fourth timestamp; and obtain the second delay from the message including the second delay.
- the processing module is also used to determine, for any one of the at least one first network devices, information of a second virtual port corresponding to a first physical port of any one of the first network devices; update the first message based on the information of the second virtual port to obtain an updated message, wherein the updated message includes information of the second virtual port; the transceiver module is also used to send the updated message to the second device, wherein the transmission path of the updated message is the first path; the processing module is also used to obtain a third delay of the first path determined based on a fifth timestamp and a sixth timestamp, wherein the fifth timestamp is the timestamp of sending the updated message recorded by the network card on the first device, and the sixth timestamp is the timestamp of receiving the updated message recorded by the network card of the second device.
- another communication device comprising: a network interface, a memory, and a processor.
- the network interface, the memory, and the processor communicate with each other through an internal connection path, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the network interface to receive signals and control the network interface to send signals, and when the processor executes the instructions stored in the memory, the processor executes the method in the first aspect or any possible implementation of the first aspect.
- processors there are one or more processors and one or more memories.
- the memory may be integrated with the processor, or the memory may be provided separately from the processor.
- a communication system comprising the device according to the second aspect or any possible implementation manner of the second aspect.
- a computer program (product) is provided, which includes: computer program code, which, when executed by a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
- a computer-readable storage medium stores a program or instruction.
- the program or instruction runs on a computer, the method in the above-mentioned first aspect or any possible implementation of the first aspect is executed.
- a chip comprising a processor for calling and executing instructions stored in a memory, so that a computer equipped with the chip executes the method in the above-mentioned first aspect or any possible implementation of the first aspect.
- another chip comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory.
- a computer equipped with the chip executes the method in the first aspect or any possible implementation of the first aspect.
- FIG1 is a schematic diagram of a data center network topology structure provided in an embodiment of the present application.
- FIG3 is a schematic diagram of another path of a data center network provided in an embodiment of the present application.
- FIG4 is a schematic diagram of an implementation scenario provided in an embodiment of the present application.
- FIG5 is a schematic diagram of a flow chart of a delay measurement method provided in an embodiment of the present application.
- FIG6 is a schematic diagram of a partial structure of a path detection message provided in an embodiment of the present application.
- FIG7 is a schematic diagram of a path detection process provided by an embodiment of the present application.
- FIG8 is a schematic diagram of another path detection process provided by an embodiment of the present application.
- FIG9 is a schematic diagram of another path detection process provided by an embodiment of the present application.
- FIG10 is a schematic diagram of another implementation scenario provided in an embodiment of the present application.
- FIG11 is a schematic diagram of a ping network software architecture provided in an embodiment of the present application.
- FIG12 is a schematic diagram of a data matrix of a measurement provided in an embodiment of the present application.
- FIG13 is a schematic diagram of the structure of a delay measurement device provided in an embodiment of the present application.
- FIG14 is a schematic diagram of the structure of a delay measurement device provided in an embodiment of the present application.
- FIG. 15 is a schematic diagram of the structure of another delay measurement device provided in an embodiment of the present application.
- the data center deployed in the data communication network includes a large number of servers, which are interconnected through various types of media, such as network cards, switches, routers, cables, and optical fibers.
- FIG1 a schematic diagram of a data center network topology is shown.
- the topology shows three different DCs, namely, data center (DC) 1, DC2 and DC3, which are connected to each other through an inter-DC network.
- the structure of the intra-DC network can refer to the internal structure of DC1.
- the internal network of DC1 may include multiple network devices and multiple servers.
- the network devices may include devices such as switches or routers that can be used for data forwarding.
- the connection between any two network devices represents that any two network devices can achieve communication connection.
- Multiple network devices can be divided into network devices of different levels. Taking the network device as a switch as an example, the multiple switches in the DC can be divided into spine switches, leaf switches and top of rack (TOR) switches.
- the spine switch can also be called a spine switch.
- the spine switches in DC1 constitute the spine layer of the internal network of DC1.
- the leaf switch can also be called a leaf switch.
- the leaf layer switches in DC1 constitute the leaf layer of the internal network of DC1.
- the top of rack switch can achieve direct communication connection with the server.
- a top of rack switch and multiple servers that can achieve direct communication connection with the top of rack switch can be deployed in the same point of delivery (POD).
- the distribution point is a physical partition of resources.
- Multiple PODs and leaf switches that can achieve direct communication connection with the multiple PODs can be deployed in the same Podset.
- the coupling relationship between different distributed services is relatively complex, and the interaction between components of different distributed services needs to be completed through the network, including but not limited to the network within the same data center and the network across different data centers.
- data center networks may include hundreds of thousands or even millions of servers, hundreds of thousands of switches, millions of cables and optical fibers, and in data center networks, there can be multiple paths for traffic transmission between two servers, and different paths can be used to share different traffic interacting between the two servers.
- the traffic transmission task of the abnormal path can be assumed by other paths between the two servers, or the traffic on the abnormal path can be switched to other paths between the two servers for transmission. Therefore, the multi-path feature of the data center network can ensure network reliability and traffic load balancing.
- FIG. 2 is a path diagram of a data center network.
- the data center network includes spine switches 1 to 4 and multiple leaf switches.
- leaf switch 1 can achieve direct communication connection with server 1
- leaf switch 2 can achieve direct communication connection with server 2.
- path 1 server 1-leaf switch 1-spine switch 1-leaf switch 2-server 2
- path 2 server 1-leaf switch 1-spine switch 2-leaf switch 2-server 2
- path 3 server 1-leaf switch 1-spine switch 3-leaf switch 2-server 2
- path 4 server 1-leaf switch 1-spine switch 4-leaf switch 2-server 2.
- Each path is a path that can communicate in both directions.
- data can be transmitted from server 1 to server 2 through path 1, and can also be transmitted from server 2 to path 1 through path 1.
- path 1 is abnormal, the traffic transmitted by path 1 can be switched to path 2, path 3 or path 1 to ensure the normal transmission of the traffic.
- the data center network includes core layer network devices, network devices in an aggregation, and edge devices, network devices 11 and 12 are core layer network devices, network devices 211 to 214 and network devices 221 to 224 are network devices in an aggregation, and edge devices can be servers, that is, edge devices 31 to 34 can be servers. There are multiple different paths between two different edge devices.
- the embodiment of the present application provides a delay measurement method that can accurately measure the end-to-end network delay, determine whether the service anomaly is caused by the network anomaly, and bind the delay to each device and each path to determine the location where the network failure occurs.
- the implementation scenario includes a first device 41, a network device 42, and a second device 43.
- the first device 41 and the second device 43 are connected in communication via the network device 42.
- the first device 41 may also be referred to as a source device.
- the first device 41 may, for example, be a storage service node in a server, a server cluster, or a cloud storage.
- the storage service node includes a storage client, a storage controller, a storage array, and the like.
- the second device may also be referred to as a destination device.
- the second device 43 may also be a storage service node in a server, a server cluster, or a cloud storage.
- the implementation scenario may also include a centralized device not shown in FIG4 , which may respectively realize communication connection with the first device 41, the network device 42, and the second device 43, and the centralized device may also be referred to as a centralized collector or analyzer.
- the scenario shown in FIG4 is not limited to the above data center, and may also be applied to network topologies using other topologies, such as a torus network, a dragonfly network, a mesh network, and CLOS (a new generation of data center network architecture).
- FIG. 5 a schematic flow chart of a delay measurement method provided in an embodiment of the present application is shown.
- the method can be applied to the implementation scenario shown in FIG. 4 .
- the method includes but is not limited to the following S501 and S502 .
- S501 A first device sends a first message to a second device, where a transmission path of the first message is a first path.
- the first message may be a message obtained by extending the precision time protocol (PTP) based on 1588 version 2, or may be a message of other types. If the first message is a message obtained by extending the PTP based on 1588v2, the first message may be sent by a PTP agent deployed on the first device.
- PTP precision time protocol
- the first path may be determined by the first device before sending the first message, or may be determined after sending the first message.
- case A1 and case A2 as examples, different cases in which the first device determines the first path are described.
- the first device determines the first path before sending the first message.
- the first device before the first device sends the first message to the second device, the first device can perform path detection or path perception on at least one path between the first device and the second device, determine at least one path between the first device and the second device, and select the first path from the at least one path between the first device and the second device.
- the first device may send a path detection message to the second device, the path detection message including first indication information, the first indication information indicating that a detection result message is returned based on the path detection message, and the first indication information is the first mark for path perception. Afterwards, the first device receives at least one detection result message returned based on the path detection message, the detection result message including information about the physical port and virtual port of the network device that sent the detection result message.
- the first indication information may be an indicator (flag), such as characters such as letters or numbers, or the first indication information may also be information about the virtual port of at least one network device or an identifier of at least one network device.
- the first indication information may be added to a reserved identification bit of the path detection message, the reserved identification bit may be located in the message header of the path detection message, the reserved identification bit may be a field extended by the message, or may reuse an existing field in the message.
- a matching or identification rule can be issued to the network device in advance, so that when the network device matches or identifies the path detection message, it can generate and return a detection result message to the first device.
- the information of the virtual port in the first indication information in the text includes the information of the virtual port of network device A
- the path detection message is a unicast message
- network device A recognizes that the information of the virtual port in the first indication information includes the information of the virtual port of the device, then it can be considered that the path detection message matches network device A, and thus network device A can generate and return a detection result message to the first device.
- network device B determines that the information of the virtual port in the first indication information does not include the information of the virtual port of the device, then it is considered that the path detection message does not match network device B, and thus network device B can discard the path detection message.
- the network device can copy the received path detection message, that is, mirror the path detection message, and then the network device can add the information of the physical port on the network device that receives the path detection message to the mirrored message obtained by mirroring, complete the encapsulation and second marking of the mirrored message, and obtain the detection result message, wherein the information of the physical port can be a physical port identifier (identifier, ID).
- the path detection message also includes an equal-cost multipath routing (ECMP) hash field (Hash Fields) and a payload field corresponding to the path detection message.
- ECMP equal-cost multipath routing
- ECMP Hash Fields include a source Internet Protocol (Internet Protocol, IP) address field, a destination IP address field, a protocol field, a source port information field, and a destination port information field of the path detection message.
- IP Internet Protocol
- the ECMP Hash Fields corresponding to the path detection message may also include a source media access control address (MAC) address and a destination MAC address of the message.
- MAC media access control address
- the source port information in the path detection message can also be called the source port number, which corresponds to the information of the virtual port in the embodiment of the present application, and is used to identify the virtual port that the path detection message needs to pass through. Since the detection result message includes the same mirror message as the path detection message, and the path detection message includes the information of the virtual port through which the path detection message passes, the detection result message also includes the information of the virtual port corresponding to the network device. Optionally, the network device can also add information about the network device to the mirror message, such as the ID of the network device. After encapsulation is completed, the network device can return the detection result message to the first device. In addition, after completing the copying of the path detection message, the network device can forward the path detection message to the next hop, and the next hop is determined based on the ECMP Hash Fields in the path detection message.
- a network device determines the next hop to which a path detection message is sent and forwards it.
- the network device can use the information in all or part of the fields in the ECMP Hash Fields corresponding to the path detection message (e.g., the source port information in the source port information field that matches the network device) as a hash key value (HASH KEY) and generate a bucket through a hash algorithm.
- a bucket can be an array with an index that stores multiple data generated by a hash algorithm.
- the network device then performs a modulo (MOD) operation on the data in the bucket to obtain the next hop and outbound interface information of the message, and forwards the path detection message to the determined next hop based on the determined outbound interface.
- MOD modulo
- Each network device that the path detection message passes through can determine the next hop and outbound interface information of the path detection message through the above method, until the next hop determined by the last network device that the path detection message passes through is the destination device. Since different network devices extract different hash key values, the next hops determined by different network devices are also different. Therefore, it is possible to determine a path among multiple paths based on the information of different virtual ports to transmit the path detection message.
- the process in which the first device receives at least one detection result message returned based on the path detection message can be divided into different situations.
- the first device can receive a detection result message sent directly to the first device by a network device.
- the network device can send the detection result message to the centralized device.
- the centralized device can send all detection result messages corresponding to the same path detection message to the first device, so that the first device obtains all detection result messages corresponding to the path detection message.
- each network device through which the path detection message passes directly sends the detection result message to the first device can be called distributed path detection
- the method in which the centralized device concentrates each detection result message and then sends each detection result message to the first device can be called centralized path detection.
- the first device and the second device include network device 21, network device 22, network device 23, network device 24, network device 11 and network device 12, and the connection relationship between each network device can refer to the connection line in FIG. 7 .
- FIG. 7 or FIG. 8 there are multiple paths based on different network devices between the first device and the second device.
- the path detection message can be transmitted based on one of the multiple paths.
- the path detection message determines a path in the multiple paths to transmit the path detection message.
- the process can refer to the above description based on FIG. 6 . Taking the transmission of the path detection message along the path shown by the arrow in FIG.
- the first device first sends the path detection message to the network device 21.
- the network device 21 mirrors the received path detection message, and determines that the next hop is the network device 11 according to the information of the virtual port in the path detection message, and forwards the path detection message to the network device 11.
- the network device 21 adds the information of the physical port of the received path detection message and the information of the network device 21 to the mirror message, completes the encapsulation of the mirror message, obtains the detection result message, and sends the detection result message to the first device.
- the detection result message can be sent to the centralized device.
- the network device 11 After receiving the path detection message, the network device 11 performs the same steps as the network device 21 to send the determined next hop network device to the network device 21.
- the network device 12 forwards the path detection message and returns the detection result message to the first device. Afterwards, the network device 12 forwards the path detection message to the determined next-hop network device 24 and returns the detection result message to the first device. After receiving the path detection message, the network device 24 forwards the path detection message to the determined next-hop second device and returns the detection result message to the first device.
- the path of the path detection message and the path of the detection result message may be asymmetric, that is, the path detection message and the detection result message may pass through the same or different network devices and port sets.
- the path detection message reaches network device 24 via the forwarding of network device 21, network device 11, and network device 12, and the detection result message generated by network device 24 may be returned to the first device along the forwarding path of the path detection message, or may be returned to the first device along a path different from that of the path detection message.
- the detection result message generated by network device 24 may reach the first device via the forwarding of network device 12, network device 11, and network device 22.
- the first device may send at least one path detection message to receive at least one detection result message returned by at least one network device based on the at least one path detection message, so as to realize path detection of each path between the first device and the second device. Afterwards, the first device may determine at least one path between the first device and the second device based on the information of the physical port and the virtual port of at least one network device included in the at least one detection result message; the first device selects a first path from the at least one path.
- the first device can determine the physical ports of each network device between the first device and the second device, and the communication connection relationship between the physical ports of each network device, based on the information of the physical ports included in each acquired detection result message, so as to determine at least one path between the first device and the second device.
- the first device can also determine the correspondence between the information of each virtual port and the information of the physical port based on at least one detection result message.
- the network device on the first path is determined as the first network device, information of the virtual ports corresponding to the physical ports of each of the first network devices is determined and added to the first message, and then the first message is sent, so that the first message can be forwarded according to the first path based on the information of the virtual ports corresponding to the physical ports of each of the first network devices.
- the process of performing path detection based on the path detection message can be called the initial connection establishment process or the initial connection establishment stage.
- the first device selects multiple candidate virtual ports and adds different virtual port information to different path detection messages, so that different path detection messages can be transmitted along different paths. If there are N paths between the first device and the second device, path detection can be carried out by selecting information of more than N candidate virtual ports to achieve path detection with full coverage of the paths between the first device and the second device.
- the first device determines the first path after sending the first message.
- the first message may include second indication information, and the second indication information indicates that the second message is returned based on the first message.
- the first device can receive at least one second message sent by at least one first network device through which the first message passes, and any second message includes information about the first physical port and information about the first virtual port of the first network device that sends any second message; the first device determines the first path based on the information about the first physical port and information about the first virtual port of at least one first network device included in the at least one second message, and the first path includes the first device, the second device, and at least one first network device through which the first message passes.
- the second indication information may be the same as the first indication information in case A1, and the second indication information may also include an identifier with an indication function, or be information including the first virtual port of at least one first network device on the first path.
- the second message is equivalent to the detection result message in case A1.
- the first message can also perform path detection, that is, the first message is given the ability of path detection to achieve the synchronization of path detection and delay measurement. If the second indication information is the information of the first virtual port of at least one first network device, the first message may be a unicast message forwarded based on the first path.
- the process of the first device receiving at least one second message can refer to the process of the first device receiving at least one detection result message in situation A1, which will not be repeated here.
- the first device After the first device receives at least one second message, it can determine each first network device that the first message passes through, that is, determine the first path of the first message, and determine the correspondence between the information of the physical port of each network device and the information of the virtual port.
- situation A1 can be combined with situation A2, that is, before sending the first message, the first device performs path detection to determine the paths between the first device and the second device, and actively adds the information of the first virtual port corresponding to the first physical port of each first network device and the second indication information to the first message, completes the first path marking, and makes the first message a unicast message.
- the first message is transmitted along the first path, and after receiving the first message, each first network device on the first path checks whether the virtual port information in the first message includes the information of its own virtual port.
- the first network device mirrors the first message and encapsulates it to obtain the second message, completes the second path marking, and sends the mirror message back to the first device, so that the first device determines again whether the network device passing through is the first network device on the first path.
- the first message may also include an inband network telemetry header (INT header) or, after receiving the first message, the first network device may also combine INT or in-situ flow information telemetry (IFIT) technology to directly add metadata such as information about the physical port of the first network device, the ID of the first network device, information about the physical port of the first network device receiving the first message, and information about the physical port of the first network device sending the first message to the first message.
- metadata metadata
- MD timestamp
- timestamp timestamp
- the first network device can send the second-marked first message to the determined next hop until the first message is transmitted to the second device.
- the second device then returns the first message to the first device, so that the first device determines whether the network device through which the first message passes is a network device on the first path, and further clarifies the transmission path of the first message.
- the second device as a tail hop server, can report the first message that has undergone secondary marking to a centralized device, and the centralized device analyzes each mark in the first message.
- the first device obtains a first delay of a first path determined based on a first timestamp and a second timestamp, where the first timestamp is a timestamp of sending a first message recorded by a network card on the first device, and the second timestamp is a timestamp of receiving the first message recorded by a network card on the second device.
- different devices may determine the first delay according to the first timestamp and the second timestamp.
- the situation in which the first device obtains the first delay may be divided into multiple different situations, including but not limited to the following situation B1 and situation B2.
- the first delay is calculated autonomously by the first device.
- the first device receives a message including a second timestamp sent by the centralized device or the second device based on the first message, obtains the second timestamp from the message including the second timestamp, and determines the first delay of the first path according to the first timestamp and the second timestamp.
- the second device After receiving the first message, the second device records the second timestamp of receiving the first message through the network card on the second device. After the second device generates the message including the second timestamp, the second device can directly send the message including the second timestamp to the first device, or send the message including the second timestamp to the centralized device, and the centralized device forwards the message including the second timestamp to the first device.
- the first device may obtain the second timestamp from the message including the second timestamp, and determine the first path of the first delay according to the first timestamp and the second timestamp.
- the first delay may be a difference between the second timestamp and the first timestamp.
- the first timestamp and the second timestamp may be standard timestamps or non-standard timestamps. If the first timestamp and the second timestamp are standard timestamps, the first device may determine the difference between the second timestamp and the first timestamp as the first delay of the first path. If at least one of the first timestamp and the second timestamp is a non-standard timestamp, the standard timestamp corresponding to the non-standard timestamp may be calculated based on the difference between the non-standard timestamp and the standard timestamp, and then the first delay may be determined based on the standard timestamp corresponding to the non-standard timestamp.
- first timestamp and the second timestamp are standard timestamps. Since the difference between the timestamp recorded by the network card on the first device and the standard timestamp is certain, the difference between the timestamp recorded by the network card on the second device and the standard timestamp is also certain.
- the difference between the delay directly determined according to the first timestamp and the second timestamp and the delay determined according to the standard timestamp is the same, that is, the relative size of the delays corresponding to different paths will not change due to whether the first timestamp and the second timestamp are standard, and the accuracy of path selection directly based on the delay determined based on the first timestamp and the second timestamp will not be affected.
- Case B2 the first delay is calculated by the second device or the centralized device.
- the first device sends a message including a first timestamp to the second device or the centralized device.
- the first timestamp is used by the second device or the centralized device to determine the first delay of the first path and receive the message including the first delay sent by the second device or the centralized device.
- the first delay is determined by the second device or the centralized device based on the first timestamp and the second timestamp. The first device obtains the first delay from the message including the first delay.
- the first device may send a message including the first timestamp to the second device, so that the second device can determine the first delay of the first path according to the second timestamp and the first timestamp recorded by the network card on the second device.
- the first device may send a message including the first timestamp to the centralized device
- the second device may send a message including the second timestamp to the centralized device, so that the centralized device can obtain both the first timestamp and the second timestamp, and determine the first delay of the first path according to the first timestamp and the second timestamp.
- the message including the first timestamp sent by the first device to the second device may also be the first message itself, that is, after recording the first timestamp, the network card on the first device may mark the first timestamp in the first message, so that when the second device receives the first message, the second device can obtain the first timestamp.
- the second device may send the first timestamp and the second timestamp to the centralized device, so that the centralized device can obtain the first timestamp and the second timestamp, and then the centralized device determines the first delay according to the first timestamp and the second timestamp.
- a message including the first delay may be sent to the first device, so that the first device can acquire the first delay from the message including the first delay.
- the first device may also receive a third message sent by the second device based on the first message, where the transmission path of the third message is the second path.
- the process of the second device sending the third message to the first device and the process of the first device determining the second path can refer to the process of the first device sending the first message to the second device and the process of the first device determining the first path in the above S501, which will not be repeated here.
- the first device obtains a second delay of the second path determined based on a third timestamp and a fourth timestamp, where the third timestamp is a timestamp of receiving the third message recorded by the network card on the first device, and the fourth timestamp is a timestamp of sending the third message recorded by the network card on the second device.
- the first device may record a third timestamp of receiving the third message through the network card on the first device.
- different devices can determine the second delay according to the third timestamp and the fourth timestamp. According to different devices for determining the second delay, the situation in which the first device obtains the second delay can be divided into multiple different situations, including but not limited to the following situation C1 and situation C2.
- the second delay is calculated autonomously by the first device.
- the first device receives a message including a fourth timestamp sent by the centralized device or the second device based on the third message, obtains the fourth timestamp, and determines the second delay of the second path according to the third timestamp and the fourth timestamp.
- the process of the second device or centralized device sending a message including the fourth timestamp to the first device can refer to the process of the second device or centralized device sending a message including the second timestamp to the first device in situation B1
- the process of the first device determining the second delay according to the third timestamp and the fourth timestamp can refer to the process of the first device determining the first delay according to the first timestamp and the second timestamp in situation B1, which will not be repeated here.
- the second delay is calculated by the second device or the centralized device.
- the process of the first device acquiring the second delay can refer to the process of the first device acquiring the first delay in case B1, which will not be repeated here.
- N unicast virtual ports can be selected, virtual port information can be added to each first message, and unicast normalized delay measurement can be performed on each path between the first device and the second device according to the above-mentioned situation B1, situation B2, situation C1 and situation C2, so as to achieve full coverage of accurate delay measurement.
- the normalized delay measurement can be a periodic measurement of a fixed frequency.
- the embodiment of the present application does not limit the size of the fixed frequency.
- the size of the fixed frequency can be statically configured or dynamically adjusted according to the status of each device.
- the correspondence between the information of the physical port and the information of the virtual port of the network device on each path between the first device and the second device may change.
- the first device again sends the first message for measuring the first delay of the first path to the second device. Since the information of the virtual port in the first message is the information of the virtual port of the first network device A before the change in the correspondence, the first message cannot be transmitted along the first path. Therefore, it is necessary to update the first message according to the changed virtual port information so that the updated message can continue to be transmitted along the first path.
- the first device can also determine whether it needs to be re-established based on the connection correlation between the path to be newly connected and the existing path. If necessary, the virtual port information is replaced to re-establish the connection with the second device to achieve adaptive reconstruction.
- the first device determines the information of the second virtual port corresponding to the first physical port of any one of the first network devices.
- the embodiment of the present application does not limit the manner in which the first device determines the information of the second virtual port.
- the first device may first determine the information of the virtual port that is close or similar to the information of the first virtual port corresponding to the first physical port of the first network device. For example, if the information of the first virtual port is A1, the information of the virtual port that is close to the information of the first virtual port may be A2 or A3, etc.
- the first device may update the first message according to the information of the virtual port that is close to the information of the first virtual port, and send the updated first message to the second device to implement the full coverage path detection of a small range corresponding to the first network device, and determine the information of the second virtual port that enables the updated first message to be transmitted based on the first path based on the result of the path detection.
- the information of the second virtual port may be selected from the information of multiple virtual ports that enable the updated first message to be transmitted based on the first path based on the correlation between the information of each virtual port and the information of the first virtual port, and the correlation between the information of the second virtual port and the information of the first port is less than the correlation threshold.
- the correlation threshold may be set based on experience.
- the first device can update the first message based on the information of the second virtual port to obtain an updated message, and the updated message includes the information of the second virtual port.
- the first device sends the updated message to the second device, so that the transmission path of the updated message is the first path. Then the first device can obtain the information based on the fifth time.
- the third delay of the first path is determined by the fifth timestamp and the sixth timestamp, wherein the fifth timestamp is the timestamp of sending the updated message recorded by the network card on the first device, and the sixth timestamp is the timestamp of receiving the updated message recorded by the network card of the second device.
- the process in which the first device acquires the third delay determined based on the fifth timestamp and the sixth timestamp may refer to the process in which the first device acquires the first delay determined based on the first timestamp and the second timestamp, which will not be described in detail here.
- the first device sends the updated message to the second device to switch from the old connection to the new connection, thereby switching the flow path.
- the new connection is a connection selected based on the correlation with the old connection, bypassing the abnormal point or selecting a connection with low correlation, that is, selecting the information of the second virtual port with low similarity to the information of the first virtual port.
- the first device may be a master device, and the second device may be a slave device.
- the first device sends a synchronization (synchronization, sync) message to the second device, the synchronization message is the above-mentioned first message, and records the first timestamp t1' of sending the synchronization message through the network card.
- the first device sends a follow-up message to the second device, and the follow-up message is the message including the first timestamp described above.
- the second device receives the synchronization message and records the second timestamp t2’ through the network card.
- the second device receives the follow-up message to obtain the first timestamp t1’.
- the second device sends a delay request message to the first device, and records the fourth timestamp t3’ of sending the delay request message through the network card.
- the delay request message is the third message mentioned above.
- the first device records the third timestamp t4’ of receiving the delay request message through the network card, and sends a delay response message to the second device.
- the delay response message is the message including the third timestamp mentioned above.
- the second device calculates the round trip delay including the first delay and the second delay, wherein the difference between t1' and the standard timestamp t1 is ⁇ tm, the difference between t2' and the standard timestamp t2 is ⁇ ts, the difference between t3' and the standard timestamp t3 is ⁇ ts, and the difference between t4' and the standard timestamp t4 is ⁇ tm.
- the delay measured by the delay measurement method provided in the embodiment of the present application can also be used in scenarios such as troubleshooting, high performance computing (HPC), high performance distributed storage, big data development, artificial intelligence (AI), and traffic scheduling.
- HPC high performance computing
- AI artificial intelligence
- traffic scheduling the average or variance of the delay of each path can be calculated based on the delay obtained by the first device, and a path recommendation can be made based on a set threshold.
- the software architecture includes a ping network controller (pingmesh controller), a ping network agent (pingmesh agent) and a data storage and analysis (DSA).
- the ping network controller is connected to the resource management system, and the ping network generator (pingmesh generator) generates a ping list (pinglist file) based on the network graph obtained from the resource management system, so that the servers in the data center perform network probing based on the ping list to ensure the normal provision of network services (web services).
- the ping list includes a probing list of each server in the data center and a virtual internet protocol address (VIP) of each server.
- VIP virtual internet protocol address
- the format of the ping list can be, for example, an extensible markup language (XML) format.
- the ping network agent runs on each server in the data center.
- the ping network agent runs on both server 1 and server 2 shown in FIG11.
- the ping network agent obtains the ping list from the ping network controller, determines the servers that need to detect each other with server 2 and the VIPs of the servers that need to detect each other with server 2 based on the obtained ping list, and detects according to the server list.
- server 2 can send a detection request to server 1 based on the VIP of server 1.
- the detection request can be a detection request based on the transmission control protocol (TCP) or hypertext transfer protocol (HTTP).
- TCP transmission control protocol
- HTTP hypertext transfer protocol
- Server 1 and server 2 send detection requests to each other to measure the delay and packet loss between servers.
- the ping network agent running on the server generates a log based on the detection results and uploads the log to DSA.
- DSA stores the log in blockchain according to the VIP of each server.
- DSA stores the log stored in the blockchain in the database through range operations.
- the ping network agent can also report the detection results to the performance counter aggregator in the DSA, so that the performance counter aggregator can monitor the network status.
- the performance counter aggregator can also run big data analysis algorithms to analyze and process the measurement data for generating data sheets or for fault detection and fault location, realize network status visualization, and can provide timely alerts when network failures occur.
- the related technology is to measure the latency through hierarchical control. For example, within the POD, servers detect each other; between PODs within the DC, servers within PODm or PODn are sorted, and servers at corresponding positions in two PODs detect each other; between DCs, a detection relationship is established between the selected servers within the DC; N servers are selected in each DC and sorted. In the DC, at least two machines can be selected in each POD. Finally, the controller controls one server to establish a detection relationship with up to 5,000 servers to prevent the server where the Ping network agent is located from being overloaded.
- Figure 12 The global operation status of the DC network is shown in Figure 12: the horizontal and vertical axes are servers, and Figure 12 is the data matrix measured between servers.
- the blank rectangle represents that the detection result is empty, the rectangle with a check mark represents that the detection result is normal, and the rectangle with a cross represents that the detection result is abnormal.
- FIG. 12 is the data matrix under normal operating conditions of the DC;
- (b) is an overall failure of a Podset (for example, power off), resulting in data loss;
- (c) is a Podset failure that causes the delay of a Podset to exceed the standard, which is generally manifested as packet loss or broadcast storm in the leaf switch, resulting in packet loss and delay;
- (d) is a spine switch failure that causes spine switch packet loss, affecting the entire DC, but the internal communication of the Podset is normal.
- the delay measured by the related technology is not only the end-to-end network delay, but also includes the processing delay on the stack and the delay caused by the CPU parsing the message, it is impossible to judge whether the service anomaly is caused by the delay increase caused by the network anomaly based on the delay measured by the related technology.
- the reliability monitoring of related technology one relies on the controller and a large number of analyzers.
- the network is invisible to the service nodes and is a black box for the service. It only relies on a large number of probes to improve the coverage, and the actual coverage is unknown.
- a large amount of measurement data is used to infer the fault, and the analysis is complex. It is impossible to accurately determine the fault and there are misjudgments; the fault location time is long.
- Related Technology 2 believes that input-output (IO) latency is a key factor affecting storage services, and is also a high-performance service requirement for customers, distinguishing between high, medium and low storage service core indicators.
- Related Technology 2 perceives the end-to-end round-trip time (RTT) on the storage service node, and continuously measures the RTT of the end-to-end connection through the service layer. The end side distinguishes the load of the path based on the RTT, and distributes more traffic to the low RTT path, thereby ensuring the average latency and tail latency of IO.
- the RTT measured between nodes includes the protocol stack latency, which has large errors and inaccurate adjustments, resulting in inaccurate service path switching and affecting service performance.
- the network nodes measure the delay of each hop and sense the path of the service flow in the network.
- the end side distinguishes the load of the path based on the measured end-to-end network delay, and distributes more traffic to the low-latency path, thereby ensuring the average delay and tail delay of IO.
- the in-band measurement technology INT is used, and the existing devices do not support INT.
- INT also requires the identification and mirroring of service or measurement traffic, which occupies a large network overhead and is actually difficult to deploy in the existing network.
- the first delay determined by the hardware timestamp recorded by the network card is the network delay on the first path between the first device and the second device, which can avoid the long tail delay caused by the end processing delay of the first device and the second device, and can realize the binding of the delay and the path, and realize the visualization of the delay.
- the embodiment of the present application can sense multiple paths between the first device and the second device, and perform normalized delay measurement on each path based on the hardware timestamp recorded by the network card, without relying on the hop-by-hop delay generated by the network device, and can achieve end-to-end accurate delay measurement. Therefore, the ability to record timestamps through the network card in the embodiment of the present application only requires the support of the network card on the server, and does not require the modification of the network device. It has high deployability and can eliminate the delay caused by the protocol stack and the central processing unit (CPU) parsing the message on the end.
- CPU central processing unit
- the embodiment of the present application combines the two capabilities of network delay measurement and path perception, and can achieve full coverage delay measurement of network paths at a relatively low cost through multiple unicast streams. In addition, it can more accurately allocate network traffic, improve service performance, and reduce long-tail delays caused by network traffic queuing.
- the embodiment of the present application also provides a delay measurement device.
- the device is applied to a first device.
- the device is used to execute the delay measurement method performed by the first device in FIG. 5 through the modules shown in FIG. 13.
- the delay measurement device provided by the embodiment of the present application includes the following modules.
- the transceiver module 1301 is used to send a first message to a second device, and the transmission path of the first message is the first path; the processing module 1302 is used to obtain a first delay of the first path determined based on a first timestamp and a second timestamp, the first timestamp is the timestamp of sending the first message recorded by the network card on the first device, and the second timestamp is the timestamp of receiving the first message recorded by the network card on the second device.
- the transceiver module 1301 is also used to send a path detection message to the second device, the path detection message includes first indication information, and the first indication information indicates that a detection result message is returned based on the path detection message; receive at least one detection result message returned based on the path detection message, the detection result message includes information about the physical port and virtual port of the network device that sent the detection result message; the processing module 1302 is also used to determine at least one path between the first device and the second device based on information about the physical port and virtual port of at least one network device included in at least one detection result message; and select a first path from the at least one path.
- the first message includes second indication information, and the second indication information indicates that the second message is returned based on the first message;
- the transceiver module 1301 is further used to receive at least one second message sent by at least one first network device through which the first message passes, and any second message includes information about the first physical port and the first virtual port of the first network device that sends any second message;
- the processing module 1302 is also used to receive at least one second message sent by at least one first network device through which the first message passes, and any second message includes information about the first physical port and the first virtual port of the first network device that sends any second message.
- the first path is determined based on the information of the virtual port, where the first path includes the first device, the second device, and at least one first network device through which the first message passes.
- the processing module 1302 is used to receive a message including a second timestamp sent by a centralized device or a second device based on the first message, obtain the second timestamp from the message including the second timestamp; and determine a first delay of the first path according to the first timestamp and the second timestamp.
- the processing module 1302 is used to send a message including a first timestamp to a second device or a centralized device, where the first timestamp is used by the second device or the centralized device to determine a first delay of a first path; receive a message including a first delay sent by the second device or the centralized device, where the first delay is determined by the second device or the centralized device based on the first timestamp and the second timestamp; and obtain the first delay from the message including the first delay.
- the transceiver module 1301 is also used to receive a third message sent by the second device based on the first message, and the transmission path of the third message is the second path; the processing module 1302 is also used to obtain a second delay of the second path determined based on a third timestamp and a fourth timestamp, the third timestamp is the timestamp of receiving the third message recorded by the network card on the first device, and the fourth timestamp is the timestamp of sending the third message recorded by the network card on the second device.
- the processing module 1302 is configured to receive a message including a fourth timestamp sent by the centralized device or the second device based on the third message, obtain the fourth timestamp, and determine the second delay of the second path according to the third timestamp and the fourth timestamp.
- the processing module 1302 is used to send a message including a third timestamp to a second device or a centralized device, where the third timestamp is used by the second device or the centralized device to determine a second delay of a second path; receive a message including a second delay sent by the second device or the centralized device, where the second delay is determined by the second device or the centralized device based on the third timestamp and a fourth timestamp; and obtain the second delay from the message including the second delay.
- the processing module 1302 is also used to determine, for any one of the at least one first network devices, information of a second virtual port corresponding to a first physical port of any one of the first network devices; update the first message based on the information of the second virtual port to obtain an updated message, and the updated message includes information of the second virtual port; the transceiver module 1301 is also used to send the updated message to the second device, and the transmission path of the updated message is the first path; the processing module 1302 is also used to obtain a third delay of the first path determined based on a fifth timestamp and a sixth timestamp, the fifth timestamp being the timestamp of sending the updated message recorded by the network card on the first device, and the sixth timestamp being the timestamp of receiving the updated message recorded by the network card of the second device.
- the beneficial effects of the device provided in FIG. 13 when implementing its functions are the same as the beneficial effects of the method provided in FIG. 5, which will not be described in detail here.
- the device provided in FIG. 13 implements its functions, only the division of the above-mentioned functional modules is used as an example.
- the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
- the device and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be described in detail here.
- FIG. 14 shows a schematic structural diagram of an exemplary delay measurement device 1400 of the present application.
- the delay measurement device 1400 includes at least one processor 1401 , a memory 1403 , and at least one network interface 1404 .
- Processor 1401 is, for example, a general-purpose central processing unit, a digital signal processor (DSP), a network processor (NP), a GPU, a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits or application-specific integrated circuits (ASICs) for implementing the solution of the present application, a programmable logic device (PLD), other general-purpose processors or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components, or any combination thereof.
- PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
- a general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture. It may implement or execute various logic blocks, modules and circuits described in conjunction with the disclosure of this application.
- the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
- the delay measurement device 1400 further includes a bus 1402.
- the bus 1402 is used to transmit information between the components of the delay measurement device 1400.
- the bus 1402 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
- the bus 1402 may be divided into an address bus, a data bus, a control bus, etc.
- FIG. 14 is represented by only one line, but it does not mean that there is only one bus or one type of bus.
- the memory 1403 is, for example, a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories.
- Non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), or flash memory.
- Volatile memory can be random access memory (RAM), which is used as an external cache.
- ROM is a compact disc read-only memory (CD-ROM).
- RAM includes, but is not limited to, static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).
- SRAM static RAM
- DRAM dynamic random access memory
- SDRAM synchronous dynamic random access memory
- DDR SDRAM double data rate synchronous dynamic random access memory
- ESDRAM enhanced synchronous dynamic random access memory
- SLDRAM synchronous link dynamic random access memory
- DR RAM direct rambus RAM
- the memory 1403 may also be other types of storage devices that can store static information and instructions. Or it may be other types of dynamic storage devices that can store information and instructions. Or it may be other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, blue-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by the computer, but is not limited to this.
- the memory 1403 may also be integrated with the processor 1401.
- the network interface 1404 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc.
- the network interface 1404 may include a wired network interface and a wireless network interface.
- the network interface 1404 may be an Ethernet interface, such as a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a WLAN interface, a cellular network interface or a combination thereof.
- the Ethernet interface may be an optical interface, an electrical interface or a combination thereof.
- the network interface 1404 may be used for the delay measurement device 1400 to communicate with other devices.
- the processor 1401 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG14. Each of these processors may be a single-core processor or a multi-core processor.
- the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
- the memory 1403 is used to store program instructions 1410 for executing the solution of the present application, and the processor 1401 can execute the program instructions 1410 stored in the memory 1403. That is, the delay measurement device 1400 can implement the method provided by the method embodiment, that is, the method of FIG. 5, through the processor 1401 and the program instructions 1410 in the memory 1403.
- the program instructions 1410 may include one or more software modules.
- the processor 1401 itself may also store program instructions for executing the solution of the present application.
- each step of the method shown in Figure 5 is completed by the hardware integrated logic circuit or software instructions in the processor of the delay measurement device 1400.
- the steps of the method embodiment disclosed in the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
- the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc.
- the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method embodiment in combination with its hardware. To avoid repetition, it will not be described in detail here.
- the main control board 1310 is also called a main processing unit (MPU) or a route processor card.
- the main control board 1310 is used to control and manage various components in the delay measurement device 1300, including route calculation, device management, device maintenance, and protocol processing functions.
- the main control board 1310 includes: a central processing unit 1311 and a memory 1312.
- the interface board 1330 is also called a line processing unit (LPU), a line card or a service board.
- the interface board 1330 is used to provide various service interfaces and implement data packet forwarding.
- the service interfaces include but are not limited to Ethernet interfaces, POS (Packet over Ethernet), and
- the interface board 1330 includes: a central processor 1331, a network processor 1332, a forwarding table memory 1334 and a physical interface card (PIC) 1333.
- PIC physical interface card
- the central processor 1331 on the interface board 1330 is used to control and manage the interface board 1330 and communicate with the central processor 1311 on the main control board 1310 .
- the physical interface card 1333 is used to implement the connection function of the physical layer, and the original traffic enters the interface board 1330 from it, and the processed message is sent from the physical interface card 1333.
- the physical interface card 1333 is also called a daughter card, which can be installed on the interface board 1330 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 1332 for processing after checking the legitimacy of the message.
- the central processor can also perform the functions of the network processor 1332, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1332 is not required in the physical interface card 1333.
- the delay measurement device 1300 includes multiple interface boards.
- the delay measurement device 1300 further includes an interface board 1340 .
- the interface board 1340 includes a central processor 1341 , a network processor 1342 , a forwarding table entry memory 1344 , and a physical interface card 1343 .
- the delay measurement device 1300 further includes a switching fabric board 1320.
- the switching fabric board 1320 may also be referred to as a switch fabric unit (SFU).
- SFU switch fabric unit
- the switching fabric board 1320 is used to complete data exchange between the interface boards.
- the interface board 1330 and the interface board 1340 may communicate through the switching fabric board 1320.
- the main control board 1310 and the interface board 1330 are coupled.
- the main control board 1310, the interface board 1330, the interface board 1340, and the switching network board 1320 are connected to the system backplane through the system bus to achieve intercommunication.
- an inter-process communication (IPC) channel is established between the main control board 1310 and the interface board 1330, and the main control board 1310 and the interface board 1330 communicate through the IPC channel.
- IPC inter-process communication
- the delay measurement device 1300 includes a control plane and a forwarding plane.
- the control plane includes a main control board 1310 and a central processing unit 1331.
- the forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 1334, a physical interface card 1333, and a network processor 1332.
- the control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the device.
- the control plane sends the generated forwarding table to the forwarding plane.
- the network processor 1332 forwards the message received by the physical interface card 1333 based on the forwarding table sent by the control plane.
- the forwarding table sent by the control plane can be stored in the forwarding table entry memory 1334. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
- main control boards there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the delay measurement device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. In a centralized forwarding architecture, the delay measurement device may not need a switching network board, and the interface board is responsible for the processing function of the service data of the entire system.
- the delay measurement device may have at least one switching network board, and the switching network board is used to realize data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the delay measurement device with a distributed architecture are greater than those of the device with a centralized architecture.
- the delay measurement device may also be in the form of only one board, that is, without a switching network board, and the functions of the interface board and the main control board are integrated on the board.
- the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two superimposed.
- the data exchange and processing capabilities of this type of device are relatively low (for example, low-end switches or communication devices such as routers).
- the specific architecture to be adopted depends on the specific networking deployment scenario, and no limitation is made here.
- a delay measurement system in an exemplary embodiment, includes a first device, a second device, and a network device.
- the first device is used to execute the method executed by the first device in FIG. 5 .
- a computer program (product) is provided.
- the computer program (product) includes: computer program code.
- the computer program code When the computer program code is executed by a computer, the computer executes the method shown in FIG. 5 .
- a computer-readable storage medium stores a program or an instruction.
- the program or the instruction is executed on a computer, the computer executes the method shown in FIG. 5 .
- a chip including a processor for calling from a memory and executing instructions stored in the memory, so that a computer equipped with the chip executes the method shown in FIG. 5 .
- another chip including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory.
- a computer equipped with the chip executes the method shown in FIG. 5 .
- the computer program product includes one or more computer instructions.
- the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
- the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
- the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated.
- the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk), etc.
- first, second, etc. are used to distinguish the same or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between “first”, “second”, and “nth”, nor is there a limit on the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another element.
- the size of the serial number of each process does not mean the order of execution.
- the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本申请要求于2023年9月12日提交的申请号为202311172026.X、发明名称为“时延测量方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese patent application No. 202311172026.X filed on September 12, 2023, with invention name “Time Delay Measurement Method, Device, Equipment and Computer-Readable Storage Medium”, the entire contents of which are incorporated by reference into this application.
本申请涉及通信技术领域,特别涉及时延测量方法、装置、设备及计算机可读存储介质。The present application relates to the field of communication technology, and in particular to a delay measurement method, device, equipment and computer-readable storage medium.
通信系统中,两个设备交互报文时,需要由两个设备之间的多个网络设备对报文进行转发,导致报文的发送时刻与报文的接收时刻之间存在时延。因此,需要测量两个设备之间的时延,以准确预估报文由一个设备到达另一设备的时间。In a communication system, when two devices exchange messages, multiple network devices between the two devices need to forward the messages, resulting in a delay between the time the message is sent and the time the message is received. Therefore, it is necessary to measure the delay between the two devices to accurately estimate the time it takes for a message to reach another device from one device.
发明内容Summary of the invention
本申请提供了一种时延测量方法、装置、设备及计算机可读存储介质,以精准测量路径上的网络时延,技术方案如下:The present application provides a delay measurement method, apparatus, device, and computer-readable storage medium to accurately measure the network delay on a path. The technical solution is as follows:
第一方面,提供了一种时延测量方法,方法包括:第一设备向第二设备发送第一报文,第一报文的传输路径为第一路径;第一设备获取基于第一时间戳和第二时间戳确定的第一路径的第一时延,第一时间戳是第一设备上的网卡记录的发送第一报文的时间戳,第二时间戳是第二设备上的网卡记录的接收第一报文的时间戳。In a first aspect, a delay measurement method is provided, the method comprising: a first device sends a first message to a second device, the transmission path of the first message is a first path; the first device obtains a first delay of the first path determined based on a first timestamp and a second timestamp, the first timestamp is a timestamp of sending the first message recorded by a network card on the first device, and the second timestamp is a timestamp of receiving the first message recorded by the network card on the second device.
本申请网卡记录的时间戳为硬件时间戳,根据该时间戳所确定出的第一时延为第一设备与第二设备间的第一路径上的网络时延,能够避免第一设备和第二设备的设备处理报文的时延造成的长尾时延,并能够实现时延与路径的绑定。The timestamp recorded by the network card in the present application is a hardware timestamp. The first delay determined according to the timestamp is the network delay on the first path between the first device and the second device. This can avoid the long-tail delay caused by the delay in processing messages by the first device and the second device, and can realize the binding of delay and path.
在一种可能的实现方式中,第一设备向第二设备发送第一报文之前,还包括:第一设备向第二设备发送路径探测报文,路径探测报文包括第一指示信息,第一指示信息指示基于路径探测报文返回探测结果报文;第一设备接收基于路径探测报文返回的至少一个探测结果报文,探测结果报文包括发送探测结果报文的网络设备的物理端口的信息和虚拟端口的信息;第一设备基于至少一个探测结果报文包括的至少一个网络设备的物理端口的信息和虚拟端口的信息,确定第一设备与第二设备之间的至少一条路径;第一设备在至少一条路径中选择第一路径。In a possible implementation, before the first device sends the first message to the second device, it also includes: the first device sends a path detection message to the second device, the path detection message includes first indication information, and the first indication information indicates that a detection result message is returned based on the path detection message; the first device receives at least one detection result message returned based on the path detection message, and the detection result message includes information about the physical port and virtual port of the network device that sends the detection result message; the first device determines at least one path between the first device and the second device based on the information about the physical port and virtual port of at least one network device included in the at least one detection result message; the first device selects a first path from the at least one path.
第一设备通过路径探测报文和探测结果报文明确第一设备与第二设备之间的各条路径,并在第一设备与第二设备之间的各跳路径中选择出第一路径,使得第一报文能够按照第一路径传输,测量第一路径上的时延,实现时延与路径的绑定。The first device clarifies each path between the first device and the second device through a path detection message and a detection result message, and selects a first path among each hop path between the first device and the second device, so that the first message can be transmitted along the first path, and the delay on the first path is measured to achieve binding of the delay and the path.
在一种可能的实现方式中,第一报文包括第二指示信息,第二指示信息指示基于第一报文返回第二报文;第一设备获取基于第一时间戳和第二时间戳确定的第一路径的第一时延之前,还包括:第一设备接收第一报文途经的至少一个第一网络设备发送的至少一个第二报文,任意一个第二报文包括发送任意一个第二报文的第一网络设备的第一物理端口的信息和第一虚拟端口的信息;第一设备基于至少一个第二报文所包括的至少一个第一网络设备的第一物理端口的信息和第一虚拟端口的信息,确定第一路径,第一路径包括第一设备、第二设备和第一报文途经的至少一个第一网络设备。In a possible implementation, the first message includes second indication information, and the second indication information indicates that the second message is returned based on the first message; before the first device obtains the first delay of the first path determined based on the first timestamp and the second timestamp, it also includes: the first device receives at least one second message sent by at least one first network device through which the first message passes, and any second message includes information about the first physical port and the first virtual port of the first network device that sends any second message; the first device determines the first path based on the information about the first physical port and the first virtual port of at least one first network device included in the at least one second message, and the first path includes the first device, the second device, and at least one first network device through which the first message passes.
第一设备通过发送携带有第二指示信息的第一报文,接收第一网络设备基于第一报文返回的第二报文,明确第一报文途经的各个第一网络设备,进而明确传输第一报文的第一路径,使得第一设备能够将获取到的第一时延与第一路径绑定。The first device sends a first message carrying second indication information, receives a second message returned by the first network device based on the first message, clarifies the first network devices passed by the first message, and further clarifies the first path for transmitting the first message, so that the first device can bind the acquired first delay to the first path.
在一种可能的实现方式中,第一设备获取基于第一时间戳和第二时间戳确定的第一路径的第一时延,包括:第一设备接收集中设备或第二设备基于第一报文发送的包括第二时间戳的报文,从包括第二时间戳的报文中获取第二时间戳;第一设备根据第一时间戳和第二时间戳,确定第一路径的第一时延。第一设备通过获取第二时间戳,自主根据第一时间戳和第二时间戳计算第一时延,提高获取第一时延的效率。 In a possible implementation, the first device obtains a first delay of a first path determined based on a first timestamp and a second timestamp, including: the first device receives a message including a second timestamp sent by a centralized device or a second device based on a first message, and obtains the second timestamp from the message including the second timestamp; the first device determines the first delay of the first path according to the first timestamp and the second timestamp. The first device obtains the second timestamp and autonomously calculates the first delay according to the first timestamp and the second timestamp, thereby improving the efficiency of obtaining the first delay.
在一种可能的实现方式中,第一设备获取基于第一时间戳和第二时间戳确定的第一路径的第一时延,包括:第一设备向第二设备或集中设备发送包括第一时间戳的报文,第一时间戳用于第二设备或集中设备确定第一路径的第一时延;第一设备接收第二设备或集中设备发送的包括第一时延的报文,第一时延由第二设备或集中设备基于第一时间戳和第二时间戳确定;第一设备从包括第一时延的报文中获取第一时延。第一设备通过向第二设备或集中设备发送第一时间戳,接收第二设备或集中设备基于第一时间戳和第二时间戳确定并发送的第一时延,实现第一时延的获取,无需第一设备自主进行第一时延的计算,减小第一设备的计算压力。In a possible implementation, the first device obtains the first delay of the first path determined based on the first timestamp and the second timestamp, including: the first device sends a message including the first timestamp to the second device or the centralized device, the first timestamp is used by the second device or the centralized device to determine the first delay of the first path; the first device receives the message including the first delay sent by the second device or the centralized device, the first delay is determined by the second device or the centralized device based on the first timestamp and the second timestamp; the first device obtains the first delay from the message including the first delay. The first device obtains the first delay by sending the first timestamp to the second device or the centralized device and receiving the first delay determined and sent by the second device or the centralized device based on the first timestamp and the second timestamp, without the need for the first device to autonomously calculate the first delay, thereby reducing the calculation pressure of the first device.
在一种可能的实现方式中,第一设备获取基于第一时间戳和第二时间戳确定的第一路径的第一时延之后,还包括:第一设备接收第二设备基于第一报文发送的第三报文,第三报文的传输路径为第二路径;第一设备获取基于第三时间戳和第四时间戳确定的第二路径的第二时延,第三时间戳是第一设备上的网卡记录的接收第三报文的时间戳,第四时间戳是第二设备上的网卡记录的发送第三报文的时间戳。第一设备还可以基于获取第一时延的类似方法,获取到第二设备返回的第三报文的在第二路径上的第二时延。第二时延为第一设备与第二设备之间的网络时延,能够避免第一设备和第二设备的端上处理时延造成的长尾时延,并实现时延与路径的绑定。In a possible implementation, after the first device obtains the first delay of the first path determined based on the first timestamp and the second timestamp, it also includes: the first device receives the third message sent by the second device based on the first message, and the transmission path of the third message is the second path; the first device obtains the second delay of the second path determined based on the third timestamp and the fourth timestamp, the third timestamp is the timestamp of receiving the third message recorded by the network card on the first device, and the fourth timestamp is the timestamp of sending the third message recorded by the network card on the second device. The first device can also obtain the second delay of the third message returned by the second device on the second path based on a similar method to obtaining the first delay. The second delay is the network delay between the first device and the second device, which can avoid the long tail delay caused by the end processing delay of the first device and the second device, and realize the binding of delay and path.
在一种可能的实现方式中,第一设备获取基于第三时间戳和第四时间戳确定的第二路径的第二时延,包括:第一设备接收集中设备或第二设备基于第三报文发送的包括第四时间戳的报文,获取第四时间戳;第一设备根据第三时间戳和第四时间戳,确定第二路径的第二时延。第一设备通过获取第四时间戳,自主根据第三时间戳和第四时间戳计算第二时延,提高获取第二时延的效率。In a possible implementation, the first device obtains the second delay of the second path determined based on the third timestamp and the fourth timestamp, including: the first device receives a message including a fourth timestamp sent by the centralized device or the second device based on the third message, and obtains the fourth timestamp; the first device determines the second delay of the second path according to the third timestamp and the fourth timestamp. The first device obtains the fourth timestamp and autonomously calculates the second delay according to the third timestamp and the fourth timestamp, thereby improving the efficiency of obtaining the second delay.
在一种可能的实现方式中,第一设备获取基于第三时间戳和第四时间戳确定的第二路径的第二时延,包括:第一设备向第二设备或集中设备发送包括第三时间戳的报文,第三时间戳用于第二设备或集中设备确定第二路径的第二时延;第一设备接收第二设备或集中设备发送的包括第二时延的报文,第二时延由第二设备或集中设备基于第三时间戳和第四时间戳确定;第一设备从包括第二时延的报文中获取第二时延。第一设备通过向第二设备或集中设备发送第三时间戳,接收第二设备或集中设备基于第三时间戳和第四时间戳确定并发送的第二时延,实现第二时延的获取,无需第一设备自主进行第二时延的计算,减小第一设备的计算压力。In a possible implementation, the first device obtains the second delay of the second path determined based on the third timestamp and the fourth timestamp, including: the first device sends a message including the third timestamp to the second device or the centralized device, the third timestamp is used by the second device or the centralized device to determine the second delay of the second path; the first device receives the message including the second delay sent by the second device or the centralized device, the second delay is determined by the second device or the centralized device based on the third timestamp and the fourth timestamp; the first device obtains the second delay from the message including the second delay. The first device obtains the second delay by sending the third timestamp to the second device or the centralized device and receiving the second delay determined and sent by the second device or the centralized device based on the third timestamp and the fourth timestamp, without the need for the first device to autonomously calculate the second delay, thereby reducing the calculation pressure of the first device.
在一种可能的实现方式中,方法还包括:对于至少一个第一网络设备中的任意一个第一网络设备,第一设备确定任意一个第一网络设备的第一物理端口对应的第二虚拟端口的信息;第一设备基于第二虚拟端口的信息更新第一报文,得到更新后的报文,更新后的报文包括第二虚拟端口的信息;第一设备向第二设备发送更新后的报文,更新后的报文的传输路径为第一路径;第一设备获取基于第五时间戳和第六时间戳确定的第一路径的第三时延,第五时间戳是第一设备上的网卡记录的发送更新后的报文的时间戳,第六时间戳是第二设备的网卡记录的接收更新后的报文的时间戳。第一设备可以基于第二虚拟端口的信息更新第一报文,使得第一设备与第二设备根据更新后的报文重新建立连接。在第一路径不变的情况下,重新探测基于新的虚拟端口的传输时第一路径的第三时延。In a possible implementation, the method further includes: for any one of the at least one first network devices, the first device determines the information of the second virtual port corresponding to the first physical port of any one of the first network devices; the first device updates the first message based on the information of the second virtual port to obtain an updated message, and the updated message includes the information of the second virtual port; the first device sends the updated message to the second device, and the transmission path of the updated message is the first path; the first device obtains the third delay of the first path determined based on the fifth timestamp and the sixth timestamp, the fifth timestamp is the timestamp of sending the updated message recorded by the network card on the first device, and the sixth timestamp is the timestamp of receiving the updated message recorded by the network card of the second device. The first device can update the first message based on the information of the second virtual port, so that the first device and the second device re-establish a connection according to the updated message. When the first path remains unchanged, the third delay of the first path when transmitting based on the new virtual port is re-detected.
第二方面,提供了一种时延测量装置,装置包括:收发模块,用于向第二设备发送第一报文,第一报文的传输路径为第一路径;处理模块,用于获取基于第一时间戳和第二时间戳确定的第一路径的第一时延,第一时间戳是第一设备上的网卡记录的发送第一报文的时间戳,第二时间戳是第二设备上的网卡记录的接收第一报文的时间戳。In a second aspect, a delay measurement device is provided, which includes: a transceiver module for sending a first message to a second device, the transmission path of the first message being a first path; a processing module for obtaining a first delay of the first path determined based on a first timestamp and a second timestamp, the first timestamp being the timestamp of sending the first message recorded by a network card on the first device, and the second timestamp being the timestamp of receiving the first message recorded by the network card on the second device.
在一种可能的实现方式中,收发模块,还用于向第二设备发送路径探测报文,路径探测报文包括第一指示信息,第一指示信息指示基于路径探测报文返回探测结果报文;接收基于路径探测报文返回的至少一个探测结果报文,探测结果报文包括发送探测结果报文的网络设备的物理端口的信息和虚拟端口的信息;处理模块,还用于基于至少一个探测结果报文包括的至少一个网络设备的物理端口的信息和虚拟端口的信息,确定第一设备与第二设备之间的至少一条路径;在至少一条路径中选择第一路径。In one possible implementation, the transceiver module is also used to send a path detection message to the second device, the path detection message includes first indication information, and the first indication information indicates that a detection result message is returned based on the path detection message; receive at least one detection result message returned based on the path detection message, the detection result message includes information about the physical port and virtual port of the network device that sent the detection result message; the processing module is also used to determine at least one path between the first device and the second device based on information about the physical port and virtual port of at least one network device included in at least one detection result message; and select a first path from the at least one path.
在一种可能的实现方式中,第一报文包括第二指示信息,第二指示信息指示基于第一报文返回第二报文;收发模块,还用于接收第一报文途经的至少一个第一网络设备发送的至少一个第二报文,任意一个第二报文包括发送任意一个第二报文的第一网络设备的第一物理端口的信息和第一虚拟端口的信息;处理模块,还用于基于至少一个第二报文所包括的至少一个第一网络设备的第一物理端口的信息和第一虚拟端口的信息,确定第一路径,第一路径包括第一设备、第二设备和第一报文途经的至少一个第一网络设备。In one possible implementation, the first message includes second indication information, and the second indication information indicates that the second message is returned based on the first message; the transceiver module is also used to receive at least one second message sent by at least one first network device through which the first message passes, and any second message includes information about the first physical port and the first virtual port of the first network device that sends any second message; the processing module is also used to determine the first path based on the information about the first physical port and the first virtual port of at least one first network device included in the at least one second message, and the first path includes the first device, the second device, and at least one first network device through which the first message passes.
在一种可能的实现方式中,处理模块,用于接收集中设备或第二设备基于第一报文发送的包括第二时 间戳的报文,从包括第二时间戳的报文中获取第二时间戳;根据第一时间戳和第二时间戳,确定第一路径的第一时延。In a possible implementation, the processing module is configured to receive a message including a second time and a second time sent by the centralized device or the second device based on the first message. The message including the time stamp is obtained by obtaining the second time stamp from the message including the second time stamp; and the first delay of the first path is determined according to the first time stamp and the second time stamp.
在一种可能的实现方式中,处理模块,用于向第二设备或集中设备发送包括第一时间戳的报文,第一时间戳用于第二设备或集中设备确定第一路径的第一时延;接收第二设备或集中设备发送的包括第一时延的报文,第一时延由第二设备或集中设备基于第一时间戳和第二时间戳确定;从包括第一时延的报文中获取第一时延。In one possible implementation, a processing module is used to send a message including a first timestamp to a second device or a centralized device, where the first timestamp is used by the second device or the centralized device to determine a first delay of a first path; receive a message including a first delay sent by the second device or the centralized device, where the first delay is determined by the second device or the centralized device based on the first timestamp and the second timestamp; and obtain the first delay from the message including the first delay.
在一种可能的实现方式中,收发模块,还用于接收第二设备基于第一报文发送的第三报文,第三报文的传输路径为第二路径;处理模块,还用于获取基于第三时间戳和第四时间戳确定的第二路径的第二时延,第三时间戳是第一设备上的网卡记录的接收第三报文的时间戳,第四时间戳是第二设备上的网卡记录的发送第三报文的时间戳。In one possible implementation, the transceiver module is also used to receive a third message sent by the second device based on the first message, and the transmission path of the third message is the second path; the processing module is also used to obtain a second delay of the second path determined based on a third timestamp and a fourth timestamp, the third timestamp is the timestamp of receiving the third message recorded by the network card on the first device, and the fourth timestamp is the timestamp of sending the third message recorded by the network card on the second device.
在一种可能的实现方式中,处理模块,用于接收集中设备或第二设备基于第三报文发送的包括第四时间戳的报文,获取第四时间戳;根据第三时间戳和第四时间戳,确定第二路径的第二时延。In a possible implementation, the processing module is used to receive a message including a fourth timestamp sent by the centralized device or the second device based on the third message, obtain the fourth timestamp; and determine the second delay of the second path according to the third timestamp and the fourth timestamp.
在一种可能的实现方式中,处理模块,用于向第二设备或集中设备发送包括第三时间戳的报文,第三时间戳用于第二设备或集中设备确定第二路径的第二时延;接收第二设备或集中设备发送的包括第二时延的报文,第二时延由第二设备或集中设备基于第三时间戳和第四时间戳确定;从包括第二时延的报文中获取第二时延。In one possible implementation, the processing module is used to send a message including a third timestamp to a second device or a centralized device, where the third timestamp is used by the second device or the centralized device to determine a second delay of a second path; receive a message including a second delay sent by the second device or the centralized device, where the second delay is determined by the second device or the centralized device based on the third timestamp and a fourth timestamp; and obtain the second delay from the message including the second delay.
在一种可能的实现方式中,处理模块,还用于对于至少一个第一网络设备中的任意一个第一网络设备,确定任意一个第一网络设备的第一物理端口对应的第二虚拟端口的信息;基于第二虚拟端口的信息更新第一报文,得到更新后的报文,更新后的报文包括第二虚拟端口的信息;收发模块,还用于向第二设备发送更新后的报文,更新后的报文的传输路径为第一路径;处理模块,还用于获取基于第五时间戳和第六时间戳确定的第一路径的第三时延,第五时间戳是第一设备上的网卡记录的发送更新后的报文的时间戳,第六时间戳是第二设备的网卡记录的接收更新后的报文的时间戳。In a possible implementation, the processing module is also used to determine, for any one of the at least one first network devices, information of a second virtual port corresponding to a first physical port of any one of the first network devices; update the first message based on the information of the second virtual port to obtain an updated message, wherein the updated message includes information of the second virtual port; the transceiver module is also used to send the updated message to the second device, wherein the transmission path of the updated message is the first path; the processing module is also used to obtain a third delay of the first path determined based on a fifth timestamp and a sixth timestamp, wherein the fifth timestamp is the timestamp of sending the updated message recorded by the network card on the first device, and the sixth timestamp is the timestamp of receiving the updated message recorded by the network card of the second device.
第三方面,提供了另一种通信装置,该装置包括:网络接口、存储器和处理器。其中,该网络接口、该存储器和该处理器通过内部连接通路互相通信,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,以控制网络接口接收信号,并控制网络接口发送信号,并且当该处理器执行该存储器存储的指令时,使得该处理器执行第一方面或第一方面的任一种可能的实现方式中的方法。In a third aspect, another communication device is provided, the device comprising: a network interface, a memory, and a processor. The network interface, the memory, and the processor communicate with each other through an internal connection path, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the network interface to receive signals and control the network interface to send signals, and when the processor executes the instructions stored in the memory, the processor executes the method in the first aspect or any possible implementation of the first aspect.
可选地,处理器为一个或多个,存储器为一个或多个。Optionally, there are one or more processors and one or more memories.
可选地,存储器可以与处理器集成在一起,或者存储器与处理器分离设置。Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
第四方面,提供了一种通信系统,该系统包括上述第二方面或第二方面的任一种可能实现方式中的装置。According to a fourth aspect, a communication system is provided, the system comprising the device according to the second aspect or any possible implementation manner of the second aspect.
第五方面,提供了一种计算机程序(产品),计算机程序(产品)包括:计算机程序代码,当计算机程序代码被计算机运行时,使得计算机执行上述第一方面或第一方面的任一种可能的实现方式中的方法。In a fifth aspect, a computer program (product) is provided, which includes: computer program code, which, when executed by a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
第六方面,提供了一种计算机可读存储介质,计算机可读存储介质存储程序或指令,当程序或指令在计算机上运行时,上述第一方面或第一方面的任一种可能的实现方式中的方法被执行。In a sixth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a program or instruction. When the program or instruction runs on a computer, the method in the above-mentioned first aspect or any possible implementation of the first aspect is executed.
第七方面,提供了一种芯片,包括处理器,用于从存储器中调用并运行存储器中存储的指令,使得安装有芯片的计算机执行上述第一方面或第一方面的任一种可能的实现方式中的方法。In a seventh aspect, a chip is provided, comprising a processor for calling and executing instructions stored in a memory, so that a computer equipped with the chip executes the method in the above-mentioned first aspect or any possible implementation of the first aspect.
第八方面,提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,输入接口、输出接口、处理器以及存储器之间通过内部连接通路相连,处理器用于执行存储器中的代码,当代码被执行时,安装有芯片的计算机执行上述第一方面或第一方面的任一种可能的实现方式中的方法。In an eighth aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, a computer equipped with the chip executes the method in the first aspect or any possible implementation of the first aspect.
应当理解的是,本申请的第二方面至第八方面的技术方案及对应的可能的实现方式所取得的有益效果,可以参见上述对第一方面及其对应的可能的实现方式的技术效果,此处不再赘述。It should be understood that the beneficial effects achieved by the technical solutions of the second to eighth aspects of the present application and the corresponding possible implementation methods can be found in the above-mentioned technical effects of the first aspect and its corresponding possible implementation methods, and will not be repeated here.
图1为本申请实施例提供的一种数据中心网络拓扑结构的示意图;FIG1 is a schematic diagram of a data center network topology structure provided in an embodiment of the present application;
图2为本申请实施例提供的一种数据中心网络的路径示意图;FIG2 is a schematic diagram of a path of a data center network provided in an embodiment of the present application;
图3为本申请实施例提供的另一种数据中心网络的路径示意图;FIG3 is a schematic diagram of another path of a data center network provided in an embodiment of the present application;
图4为本申请实施例提供的一种实施场景的示意图;FIG4 is a schematic diagram of an implementation scenario provided in an embodiment of the present application;
图5为本申请实施例提供的一种时延测量方法的流程示意图; FIG5 is a schematic diagram of a flow chart of a delay measurement method provided in an embodiment of the present application;
图6为本申请实施例提供的一种路径探测报文的部分结构的示意图;FIG6 is a schematic diagram of a partial structure of a path detection message provided in an embodiment of the present application;
图7为本申请实施例提供的一种路径探测的过程示意图;FIG7 is a schematic diagram of a path detection process provided by an embodiment of the present application;
图8为本申请实施例提供的另一种路径探测的过程示意图;FIG8 is a schematic diagram of another path detection process provided by an embodiment of the present application;
图9为本申请实施例提供的又一种路径探测的过程示意图;FIG9 is a schematic diagram of another path detection process provided by an embodiment of the present application;
图10为本申请实施例提供的另一种实施场景的示意图;FIG10 is a schematic diagram of another implementation scenario provided in an embodiment of the present application;
图11为本申请实施例提供的一种ping网络软件架构示意图;FIG11 is a schematic diagram of a ping network software architecture provided in an embodiment of the present application;
图12为本申请实施例提供的一种测量的数据矩阵的示意图;FIG12 is a schematic diagram of a data matrix of a measurement provided in an embodiment of the present application;
图13为本申请实施例提供的一种时延测量装置的结构示意图;FIG13 is a schematic diagram of the structure of a delay measurement device provided in an embodiment of the present application;
图14为本申请实施例提供的一种时延测量设备的结构示意图;FIG14 is a schematic diagram of the structure of a delay measurement device provided in an embodiment of the present application;
图15为本申请实施例提供的另一种时延测量设备的结构示意图。FIG. 15 is a schematic diagram of the structure of another delay measurement device provided in an embodiment of the present application.
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
数据通信网络(data communication network,DCN)内部署的数据中心包括大量的服务器,这些服务器之间通过多种类型的介质实现互联,例如可以通过网卡、交换机、路由器、电缆和光纤等实现互联。The data center deployed in the data communication network (DCN) includes a large number of servers, which are interconnected through various types of media, such as network cards, switches, routers, cables, and optical fibers.
参见图1,示出了一种数据中心网络拓扑结构(data center network structure)的示意图。该拓扑结构示出了数据中心(data center,DC)1、DC2和DC3共三个不同的DC,三个DC通过DC间网络(inter-DC-network)实现通信连接。DC内部网络(intra-DC-network)的结构可以参照DC1的内部结构。Referring to FIG1 , a schematic diagram of a data center network topology is shown. The topology shows three different DCs, namely, data center (DC) 1, DC2 and DC3, which are connected to each other through an inter-DC network. The structure of the intra-DC network can refer to the internal structure of DC1.
DC1的内部网络可以包括多个网络设备和多个服务器,网络设备可以包括交换机或路由器等能够用于数据转发的设备。任意两个网络设备之间的连线代表任意两个网络设备能够实现通信连接。多个网络设备可以分为不同层级的网络设备,以网络设备为交换机为例,DC内的多个交换机可以分为脊骨(spine)交换机、叶子(leaf)交换机和柜顶(top of rack,TOR)交换机。脊骨交换机也可以称为脊交换机,DC1内的各个脊骨交换机构成了DC1的内部网络的脊骨层。叶子交换机也可以称为叶交换机,DC1内的各个叶子层交换机构成了DC1的内部网络的叶子层。柜顶交换机能够与服务器实现直接通信连接,一个柜顶交换机以及能够与该一个柜顶交换机实现直接通信连接的多个服务器可以部署在同一个分发点(point of delivery,POD)内,分发点是资源的物理分区。多个POD以及能够与该多个POD实现直接通信连接的叶子交换机可以部署在同一个Podset内。The internal network of DC1 may include multiple network devices and multiple servers. The network devices may include devices such as switches or routers that can be used for data forwarding. The connection between any two network devices represents that any two network devices can achieve communication connection. Multiple network devices can be divided into network devices of different levels. Taking the network device as a switch as an example, the multiple switches in the DC can be divided into spine switches, leaf switches and top of rack (TOR) switches. The spine switch can also be called a spine switch. The spine switches in DC1 constitute the spine layer of the internal network of DC1. The leaf switch can also be called a leaf switch. The leaf layer switches in DC1 constitute the leaf layer of the internal network of DC1. The top of rack switch can achieve direct communication connection with the server. A top of rack switch and multiple servers that can achieve direct communication connection with the top of rack switch can be deployed in the same point of delivery (POD). The distribution point is a physical partition of resources. Multiple PODs and leaf switches that can achieve direct communication connection with the multiple PODs can be deployed in the same Podset.
随着云计算技术的发展,需要交互和计算的数据的数量越来越多,数据中心的体积越来越大。在数据中心的物理设施的基础之上,运行着大规模的分布式业务,例如,搜索、分布式文件系统、分布式存储、分布式计算(Mapreduce)等分布式业务。With the development of cloud computing technology, the amount of data that needs to be interacted and calculated is increasing, and the size of data centers is getting larger and larger. Based on the physical facilities of data centers, large-scale distributed services are running, such as search, distributed file systems, distributed storage, distributed computing (Mapreduce), and other distributed services.
由于分布式业务的规模较大,包含较多的软件系统和包含大量的组件。不同的分布式业务之间的耦合关系较为复杂,且不同的分布式业务的组件相互之间的交互都需要通过网络完成,包括但不限于在同一个数据中心内的网络和跨不同的数据中心的网络。Due to the large scale of distributed services, including more software systems and a large number of components, the coupling relationship between different distributed services is relatively complex, and the interaction between components of different distributed services needs to be completed through the network, including but not limited to the network within the same data center and the network across different data centers.
在大规模的数字通信系统中,软件和硬件的失效较为频繁,但是由于分布式业务的组成特征,很多的软件和硬件的失效都表现为时延的增加,比如,部分组件间歇性连通、端到端的时延陡增或数据中心内的服务器的网络吞吐量急剧下降等不是网络异常导致的业务异常,通常也会表现为时延增加,导致用户误以为是网络的问题。因此,亟需一种时延测量方法,以确定业务异常是否为网络异常导致。In large-scale digital communication systems, software and hardware failures are relatively frequent. However, due to the composition characteristics of distributed services, many software and hardware failures are manifested as increased latency. For example, intermittent connectivity of some components, a sharp increase in end-to-end latency, or a sharp drop in network throughput of servers in a data center are not caused by network anomalies. These service anomalies are usually manifested as increased latency, causing users to mistakenly believe that they are network problems. Therefore, a latency measurement method is urgently needed to determine whether a service anomaly is caused by a network anomaly.
此外,当网络的服务等级协议(service-level agreement,SLA)因为各种网络故障而损坏(broken)时,会导致实时站点(live-site)故障,其中,live-site故障是任何可能影响客户或者合作伙伴或者收益的事件。live-site故障需要快速的检测、迁移并解决。但是,数据中心网络可能包括数十万甚至上百万服务器,数十万交换机,上百万根电缆和光纤,且在数据中心网络中,两个服务器之间可以存在多条用于流量传输的路径,不同的路径可以用于分担两个服务器之间交互的不同流量。当两个服务器之间的某一条路径异常时,可以由两个服务器之间的其他路径承担该异常路径的流量传输任务,或者说该异常路径上的流量切换至由两个服务器之间的其他路径传输,因而数据中心网络的多路径这一特征能够保证网络的可靠性和流量负载均衡。In addition, when the service-level agreement (SLA) of the network is damaged (broken) due to various network failures, it will cause live-site failures, where live-site failures are any events that may affect customers, partners or revenue. Live-site failures need to be quickly detected, migrated and resolved. However, data center networks may include hundreds of thousands or even millions of servers, hundreds of thousands of switches, millions of cables and optical fibers, and in data center networks, there can be multiple paths for traffic transmission between two servers, and different paths can be used to share different traffic interacting between the two servers. When a path between two servers is abnormal, the traffic transmission task of the abnormal path can be assumed by other paths between the two servers, or the traffic on the abnormal path can be switched to other paths between the two servers for transmission. Therefore, the multi-path feature of the data center network can ensure network reliability and traffic load balancing.
例如,参见图2,图2为一种数据中心网络的路径示意图。该数据中心网络包括脊交换机1至脊交换机4和多个叶交换机。其中,叶交换机1能够与服务器1实现直接通信连接,叶交换机2能够与服务器2实现直接通信连接。服务器1与服务器2之间有四条路径,分别为路径1:服务器1-叶交换机1-脊交换机 1-叶交换机2-服务器2;路径2:服务器1-叶交换机1-脊交换机2-叶交换机2-服务器2;路径3:服务器1-叶交换机1-脊交换机3-叶交换机2-服务器2;路径4:服务器1-叶交换机1-脊交换机4-叶交换机2-服务器2。各条路径只限定路径上的设备而不限定路径的方向,各条路径均为能够双向通信的路径,以路径1为例,数据可以通过路径1由服务器1传输到服务器2,也可以通过路径1由服务器2传输到路径1。当路径1异常时,由路径1传输的流量可以切换至由路径2、路径3或路径1传输,保证该流量的正常传输。For example, see Figure 2, which is a path diagram of a data center network. The data center network includes spine switches 1 to 4 and multiple leaf switches. Among them, leaf switch 1 can achieve direct communication connection with server 1, and leaf switch 2 can achieve direct communication connection with server 2. There are four paths between server 1 and server 2, which are path 1: server 1-leaf switch 1-spine switch 1-leaf switch 2-server 2; path 2: server 1-leaf switch 1-spine switch 2-leaf switch 2-server 2; path 3: server 1-leaf switch 1-spine switch 3-leaf switch 2-server 2; path 4: server 1-leaf switch 1-spine switch 4-leaf switch 2-server 2. Each path only limits the devices on the path but not the direction of the path. Each path is a path that can communicate in both directions. Taking path 1 as an example, data can be transmitted from server 1 to server 2 through path 1, and can also be transmitted from server 2 to path 1 through path 1. When path 1 is abnormal, the traffic transmitted by path 1 can be switched to path 2, path 3 or path 1 to ensure the normal transmission of the traffic.
或者,也可以参见图3示出的另一种数据中心网络的路径示意图。该数据中心网络包括核心(core)层网络设备、集合体(aggregation)内的网络设备和边缘设备,网络设备11和网络设备12为核心层网络设备,网络设备211至网络设备214以及网络设备221至网络设备224为集合体内的网络设备,边缘设备可以是服务器,也即边缘设备31至边缘设备34可以是服务器。两个不同的边缘设备之间存在多条不同的路径。Alternatively, see also the path diagram of another data center network shown in FIG3. The data center network includes core layer network devices, network devices in an aggregation, and edge devices, network devices 11 and 12 are core layer network devices, network devices 211 to 214 and network devices 221 to 224 are network devices in an aggregation, and edge devices can be servers, that is, edge devices 31 to 34 can be servers. There are multiple different paths between two different edge devices.
正是由于数据中心网络中的两个设备之间可以存在多条路径,因此,亟需一种能够快速检测故障的定界定位的方法,例如,亟需一种能够将各个设备以及设备构成的路径与时延绑定的方法,以快速判定网络故障的发生位置,以进一步实现故障检测和故障定位。Because there can be multiple paths between two devices in a data center network, there is an urgent need for a method that can quickly detect and locate faults. For example, there is an urgent need for a method that can bind each device and the path formed by the devices to the delay to quickly determine the location of the network fault, so as to further realize fault detection and fault location.
本申请实施例提供了一种时延测量方法,能够精准测量端到端之间的网络时延,确定业务异常是否为网络异常导致,并能够将时延与各个设备以及各条路径绑定,以判定网络故障的发生位置。The embodiment of the present application provides a delay measurement method that can accurately measure the end-to-end network delay, determine whether the service anomaly is caused by the network anomaly, and bind the delay to each device and each path to determine the location where the network failure occurs.
参见图4,示出了本申请实施例提供的一种实施场景的示意图。该实施场景包括第一设备41、网络设备42和第二设备43。第一设备41与第二设备43通过网络设备42实现通信连接。第一设备41也可以称为源设备,第一设备41例如可以是服务器、服务器集群或云存储中的存储业务节点,存储业务节点包括存储客户端、存储控制器、存储阵列等。第二设备也可以称为目的设备,第二设备43也可以是服务器、服务器集群或云存储中的存储业务节点。网络设备42是通信网络中用于报文转发的设备,例如可以是交换机、路由器或其他形态的转发设备,网络设备42的数量可以是一个或多个,本申请实施例对此不做限定。Referring to FIG. 4 , a schematic diagram of an implementation scenario provided by an embodiment of the present application is shown. The implementation scenario includes a first device 41, a network device 42, and a second device 43. The first device 41 and the second device 43 are connected in communication via the network device 42. The first device 41 may also be referred to as a source device. The first device 41 may, for example, be a storage service node in a server, a server cluster, or a cloud storage. The storage service node includes a storage client, a storage controller, a storage array, and the like. The second device may also be referred to as a destination device. The second device 43 may also be a storage service node in a server, a server cluster, or a cloud storage. The network device 42 is a device used for message forwarding in a communication network. For example, it may be a switch, a router, or other forms of forwarding devices. The number of network devices 42 may be one or more, and the embodiment of the present application does not limit this.
可选地,该实施场景还可以包括图4中未示出的集中设备,集中设备可以分别于第一设备41、网络设备42和第二设备43实现通信连接,集中设备也可以称为集中式收集器或分析器。此外,图4所示的场景不局限于以上的数据中心,也可应用于采用其他拓扑结构,例如环面(torus)网络、镜像分发(dragonfly)网络、组网(mesh)和CLOS(一种新一代数据中心的网络架构)等网络拓扑结构中。Optionally, the implementation scenario may also include a centralized device not shown in FIG4 , which may respectively realize communication connection with the first device 41, the network device 42, and the second device 43, and the centralized device may also be referred to as a centralized collector or analyzer. In addition, the scenario shown in FIG4 is not limited to the above data center, and may also be applied to network topologies using other topologies, such as a torus network, a dragonfly network, a mesh network, and CLOS (a new generation of data center network architecture).
参见图5,示出了本申请实施例提供的一种时延测量方法的流程示意图,该方法能够应用于图4所示的实施场景,该方法包括但不限于如下的S501和S502。Referring to FIG. 5 , a schematic flow chart of a delay measurement method provided in an embodiment of the present application is shown. The method can be applied to the implementation scenario shown in FIG. 4 . The method includes but is not limited to the following S501 and S502 .
S501,第一设备向第二设备发送第一报文,第一报文的传输路径为第一路径。S501: A first device sends a first message to a second device, where a transmission path of the first message is a first path.
本申请实施例对于第一报文的类型不做限定,例如,第一报文可以是基于1588版本(version)2的高精度时间同步协议(precision time protocol,PTP)扩展得到的报文,也可以是其他类型的报文。如果第一报文时基于1588v2的PTP扩展得到的报文,则第一报文可以通过部署在第一设备上的PTP代理(agent)发送。The embodiment of the present application does not limit the type of the first message. For example, the first message may be a message obtained by extending the precision time protocol (PTP) based on 1588 version 2, or may be a message of other types. If the first message is a message obtained by extending the PTP based on 1588v2, the first message may be sent by a PTP agent deployed on the first device.
可选地,第一路径可以由第一设备在发送第一报文之前确定,也可以在发送第一报文之后确定。下面,以情况A1和情况A2为例,对第一设备确定第一路径的不同情况进行说明。Optionally, the first path may be determined by the first device before sending the first message, or may be determined after sending the first message. Below, taking case A1 and case A2 as examples, different cases in which the first device determines the first path are described.
情况A1,第一设备在发送第一报文之前确定第一路径。第一设备与第二设备之间存在多个用于转发报文的网络设备,因而第一设备与第二设备之间可以存在至少一条路径。在此种实现方式中,在第一设备向第二设备发送第一报文之前,第一设备可以对第一设备与第二设备之间的至少一条路径进行路径探测或路径感知,确定第一设备与第二设备之间的至少一条路径,并在第一设备与第二设备之间的至少一条路径中选择第一路径。In case A1, the first device determines the first path before sending the first message. There are multiple network devices for forwarding messages between the first device and the second device, so there can be at least one path between the first device and the second device. In this implementation, before the first device sends the first message to the second device, the first device can perform path detection or path perception on at least one path between the first device and the second device, determine at least one path between the first device and the second device, and select the first path from the at least one path between the first device and the second device.
示例性地,第一设备可以向第二设备发送路径探测报文,路径探测报文包括第一指示信息,第一指示信息指示基于路径探测报文返回探测结果报文,第一指示信息为用于路径感知的第一次标记。之后,第一设备接收基于路径探测报文返回的至少一个探测结果报文,探测结果报文包括发送探测结果报文的网络设备的物理端口的信息和虚拟端口的信息。其中,第一指示信息可以是具有指示作用的标识(flag),例如字母或数字等字符,或者第一指示信息也可以为至少一个网络设备的虚拟端口的信息或至少一个网络设备的标识。第一指示信息可以添加在路径探测报文的预留标识位中,预留标识位可以位于路径探测报文的报文头中,预留标识位可以为报文扩展的字段也可以复用报文中已有的字段。Exemplarily, the first device may send a path detection message to the second device, the path detection message including first indication information, the first indication information indicating that a detection result message is returned based on the path detection message, and the first indication information is the first mark for path perception. Afterwards, the first device receives at least one detection result message returned based on the path detection message, the detection result message including information about the physical port and virtual port of the network device that sent the detection result message. Among them, the first indication information may be an indicator (flag), such as characters such as letters or numbers, or the first indication information may also be information about the virtual port of at least one network device or an identifier of at least one network device. The first indication information may be added to a reserved identification bit of the path detection message, the reserved identification bit may be located in the message header of the path detection message, the reserved identification bit may be a field extended by the message, or may reuse an existing field in the message.
在第一设备向第二设备发送路径探测报文之前,可以预先为网络设备下发匹配或识别规则,使得网络设备在匹配或识别到路径探测报文时,能够生成并向第一设备返回探测结果报文。例如,如果路径探测报 文中的第一指示信息中的虚拟端口的信息包括网络设备A的虚拟端口的信息,则路径探测报文为单播报文,则网络设备A在接收到路径探测报文之后,识别到第一指示信息中的虚拟端口的信息包括本设备的虚拟端口的信息,则可以认为该路径探测报文与网络设备A匹配,因而网络设备A可以生成并向第一设备返回探测结果报文。如果路径探测报文中的第一指示信息中的虚拟端口的信息不包括网络设备B的虚拟端口的信息,则网络设备B在接收到路径探测报文之后,确定第一指示信息中的虚拟端口的信息不包括本设备的虚拟端口的信息,则认为该路径探测报文与网络设备B不匹配,因而网络设备B可以将路径探测报文丢弃。在一种可能的实现方式中,网络设备可以复制接收到的路径探测报文,也即对路径探测报文进行镜像,之后网络设备可以向镜像得到的镜像报文中添加网络设备上接收到路径探测报文的物理端口的信息,完成对镜像报文的封装和第二次标记,得到探测结果报文,其中,物理端口的信息可以为物理端口标识符(identifier,ID)。Before the first device sends a path detection message to the second device, a matching or identification rule can be issued to the network device in advance, so that when the network device matches or identifies the path detection message, it can generate and return a detection result message to the first device. If the information of the virtual port in the first indication information in the text includes the information of the virtual port of network device A, the path detection message is a unicast message, and after receiving the path detection message, network device A recognizes that the information of the virtual port in the first indication information includes the information of the virtual port of the device, then it can be considered that the path detection message matches network device A, and thus network device A can generate and return a detection result message to the first device. If the information of the virtual port in the first indication information in the path detection message does not include the information of the virtual port of network device B, after receiving the path detection message, network device B determines that the information of the virtual port in the first indication information does not include the information of the virtual port of the device, then it is considered that the path detection message does not match network device B, and thus network device B can discard the path detection message. In a possible implementation, the network device can copy the received path detection message, that is, mirror the path detection message, and then the network device can add the information of the physical port on the network device that receives the path detection message to the mirrored message obtained by mirroring, complete the encapsulation and second marking of the mirrored message, and obtain the detection result message, wherein the information of the physical port can be a physical port identifier (identifier, ID).
路径探测报文还包括该路径探测报文对应的等价多路径(equal-cost multipath routing,ECMP)哈希字段(Hash Fields)和负载(payload)字段。示例性地,路径探测报文的部分结构可以参见图6,ECMP Hash Fields包括路径探测报文的源互联网协议(internet protocol,IP)地址字段、目的IP地址字段、协议字段、源端口信息字段和目的端口信息字段。可选地,路径探测报文对应的ECMP Hash Fields还可以包括报文的源媒体接入控制(media access control address,MAC)地址和目的MAC地址。The path detection message also includes an equal-cost multipath routing (ECMP) hash field (Hash Fields) and a payload field corresponding to the path detection message. Exemplarily, a partial structure of the path detection message can be seen in FIG6, where the ECMP Hash Fields include a source Internet Protocol (Internet Protocol, IP) address field, a destination IP address field, a protocol field, a source port information field, and a destination port information field of the path detection message. Optionally, the ECMP Hash Fields corresponding to the path detection message may also include a source media access control address (MAC) address and a destination MAC address of the message.
路径探测报文中的源端口信息也可以称为源端口号,对应本申请实施例中的虚拟端口的信息,用于标识路径探测报文所需途经的虚拟端口。由于探测结果报文包括与路径探测报文相同的镜像报文,并且路径探测报文中包括路径探测报文经过的虚拟端口的信息,因此,探测结果报文也包括网络设备对应的虚拟端口的信息。可选地,网络设备还可以向镜像报文中添加网络设备的信息,例如网络设备的ID。封装完成后,网络设备可以向第一设备返回探测结果报文。此外,网络设备在完成对路径探测报文的复制之后,可以将路径探测报文转发至下一跳,下一跳基于路径探测报文中的ECMP Hash Fields确定。The source port information in the path detection message can also be called the source port number, which corresponds to the information of the virtual port in the embodiment of the present application, and is used to identify the virtual port that the path detection message needs to pass through. Since the detection result message includes the same mirror message as the path detection message, and the path detection message includes the information of the virtual port through which the path detection message passes, the detection result message also includes the information of the virtual port corresponding to the network device. Optionally, the network device can also add information about the network device to the mirror message, such as the ID of the network device. After encapsulation is completed, the network device can return the detection result message to the first device. In addition, after completing the copying of the path detection message, the network device can forward the path detection message to the next hop, and the next hop is determined based on the ECMP Hash Fields in the path detection message.
下面,对网络设备确定路径探测报文到的下一跳并转发的过程进行说明。网络设备在接收到路径探测报文之后,可以将路径探测报文对应的ECMP Hash Fields中的全部或部分字段中的信息(例如源端口信息字段中与该网络设备匹配的源端口信息)作为哈希关键值(HASH KEY),并通过哈希算法生成桶(bucket)。桶可以是带有索引的数组,存储多个通过哈希算法生成的数据。而后网络设备对桶中的数据进行取模(MOD)运算,以获得报文的下一跳和出接口的信息,并基于确定出的出接口向确定出的下一跳转发路径探测报文。The following is an explanation of the process by which a network device determines the next hop to which a path detection message is sent and forwards it. After receiving a path detection message, the network device can use the information in all or part of the fields in the ECMP Hash Fields corresponding to the path detection message (e.g., the source port information in the source port information field that matches the network device) as a hash key value (HASH KEY) and generate a bucket through a hash algorithm. A bucket can be an array with an index that stores multiple data generated by a hash algorithm. The network device then performs a modulo (MOD) operation on the data in the bucket to obtain the next hop and outbound interface information of the message, and forwards the path detection message to the determined next hop based on the determined outbound interface.
路径探测报文途经的各个网络设备均可以通过上述方法确定路径探测报文的下一跳和出接口的信息,直至路径探测报文途经的最后一个网络设备确定出的下一跳为目的设备。由于不同的网络设备提取的哈希关键值不同,不同的网络设备所确定的下一跳也不同,由此,可基于不同的虚拟端口的信息实现在多条路径中确定一条路径进行路径探测报文的传输。Each network device that the path detection message passes through can determine the next hop and outbound interface information of the path detection message through the above method, until the next hop determined by the last network device that the path detection message passes through is the destination device. Since different network devices extract different hash key values, the next hops determined by different network devices are also different. Therefore, it is possible to determine a path among multiple paths based on the information of different virtual ports to transmit the path detection message.
可选地,第一设备接收基于路径探测报文返回的至少一个探测结果报文的过程可以分为不同的情况。例如,第一设备可以接收由网络设备直接向第一设备发送的探测结果报文。或者,网络设备在生成探测结果报文之后,可以向集中设备发送探测结果报文。集中设备在接收到同一路径探测报文对应的所有探测结果报文之后,可以将同一路径探测报文对应的所有探测结果报文向第一设备发送,使得第一设备获取到路径探测报文对应的所有探测结果报文。由路径探测报文途经的各个网络设备直接向第一设备发送探测结果报文的方式可以称为分布式路径探测,由集中设备将各个探测结果报文集中之后再向第一设备发送各个探测结果报文的方式可以称为集中式路径探测。Optionally, the process in which the first device receives at least one detection result message returned based on the path detection message can be divided into different situations. For example, the first device can receive a detection result message sent directly to the first device by a network device. Alternatively, after generating the detection result message, the network device can send the detection result message to the centralized device. After receiving all detection result messages corresponding to the same path detection message, the centralized device can send all detection result messages corresponding to the same path detection message to the first device, so that the first device obtains all detection result messages corresponding to the path detection message. The method in which each network device through which the path detection message passes directly sends the detection result message to the first device can be called distributed path detection, and the method in which the centralized device concentrates each detection result message and then sends each detection result message to the first device can be called centralized path detection.
参见图7,示出了一种路径探测的过程示意图。第一设备与第二设备之间包括网络设备21、网络设备22、网络设备23、网络设备24、网络设备11和网络设备12,各个网络设备之间的连接关系可以参照图7中的连线。如图7或图8所示,第一设备与第二设备之间存在基于不同的网络设备组成的多条路径,第一设备向第二设备发送路径探测报文之后,路径探测报文可以基于多条路径中的一条路径进行传输,路径探测报文在多条路径中确定一条路径进行路径探测报文的传输个过程可以参照上述基于图6的说明。以路径探测报文按照图7中箭头所示的路径传输为例,第一设备首先将路径探测报文发送至网络设备21。网络设备21将接收到的路径探测报文进行镜像,并根据路径探测报文中的虚拟端口的信息,确定出下一跳为网络设备11,向网络设备11转发路径探测报文。网络设备21将接收路径探测报文的物理端口的信息和网络设备21的信息添加至镜像报文中,完成对镜像报文的封装,得到探测结果报文,将探测结果报文发送至第一设备。或者,也可以如图9所示,将探测结果报文发送至集中设备。Referring to FIG. 7 , a schematic diagram of a path detection process is shown. The first device and the second device include network device 21, network device 22, network device 23, network device 24, network device 11 and network device 12, and the connection relationship between each network device can refer to the connection line in FIG. 7 . As shown in FIG. 7 or FIG. 8 , there are multiple paths based on different network devices between the first device and the second device. After the first device sends a path detection message to the second device, the path detection message can be transmitted based on one of the multiple paths. The path detection message determines a path in the multiple paths to transmit the path detection message. The process can refer to the above description based on FIG. 6 . Taking the transmission of the path detection message along the path shown by the arrow in FIG. 7 as an example, the first device first sends the path detection message to the network device 21. The network device 21 mirrors the received path detection message, and determines that the next hop is the network device 11 according to the information of the virtual port in the path detection message, and forwards the path detection message to the network device 11. The network device 21 adds the information of the physical port of the received path detection message and the information of the network device 21 to the mirror message, completes the encapsulation of the mirror message, obtains the detection result message, and sends the detection result message to the first device. Alternatively, as shown in Figure 9, the detection result message can be sent to the centralized device.
网络设备11在接收到路径探测报文之后,执行与网络设备21相同的步骤,向确定出的下一跳网络设 备12转发路径探测报文,并向第一设备返回探测结果报文。之后,网络设备12向确定出的下一跳网络设备24转发路径探测报文,并向第一设备返回探测结果报文。网络设备24在接收到路径探测报文之后,向确定出的下一跳第二设备转发路径探测报文,并向第一设备返回探测结果报文。After receiving the path detection message, the network device 11 performs the same steps as the network device 21 to send the determined next hop network device to the network device 21. The network device 12 forwards the path detection message and returns the detection result message to the first device. Afterwards, the network device 12 forwards the path detection message to the determined next-hop network device 24 and returns the detection result message to the first device. After receiving the path detection message, the network device 24 forwards the path detection message to the determined next-hop second device and returns the detection result message to the first device.
在分布式路径探测场景中,路径探测报文的路径与探测结果报文的路径可以不对称,也即路径探测报文和探测结果报文可以经过相同或不同的网络设备和端口集合。例如,图7中路径探测报文经由网络设备21、网络设备11和网络设备12的转发到达网络设备24,网络设备24产生的探测结果报文可以按照路径探测报文的转发路径原路返回至第一设备,也可以按照与路径探测报文不同的路径返回至第一设备。比如,网络设备24产生的探测结果报文可以经由网络设备12、网络设备11和网络设备22的转发到达第一设备。In a distributed path detection scenario, the path of the path detection message and the path of the detection result message may be asymmetric, that is, the path detection message and the detection result message may pass through the same or different network devices and port sets. For example, in FIG7, the path detection message reaches network device 24 via the forwarding of network device 21, network device 11, and network device 12, and the detection result message generated by network device 24 may be returned to the first device along the forwarding path of the path detection message, or may be returned to the first device along a path different from that of the path detection message. For example, the detection result message generated by network device 24 may reach the first device via the forwarding of network device 12, network device 11, and network device 22.
第一设备可以发送至少一个路径探测报文,以接收到至少一个网络设备基于至少一个路径探测报文返回的至少一个探测结果报文,实现对第一设备与第二设备之间的各条路径的路径探测。之后,第一设备可以基于至少一个探测结果报文包括的至少一个网络设备的物理端口的信息和虚拟端口的信息,确定第一设备与第二设备之间的至少一条路径;第一设备在至少一条路径中选择第一路径。The first device may send at least one path detection message to receive at least one detection result message returned by at least one network device based on the at least one path detection message, so as to realize path detection of each path between the first device and the second device. Afterwards, the first device may determine at least one path between the first device and the second device based on the information of the physical port and the virtual port of at least one network device included in the at least one detection result message; the first device selects a first path from the at least one path.
示例性地,第一设备可以根据获取到的各个探测结果报文所包括的物理端口的信息,确定第一设备与第二设备之间的各个网络设备的物理端口,以及各个网络设备的物理端口之间的通信连接关系,以确定第一设备与第二设备之间的至少一条路径。此外,第一设备还可以根据至少一个探测结果报文,确定各个虚拟端口的信息与物理端口的信息的对应关系。Exemplarily, the first device can determine the physical ports of each network device between the first device and the second device, and the communication connection relationship between the physical ports of each network device, based on the information of the physical ports included in each acquired detection result message, so as to determine at least one path between the first device and the second device. In addition, the first device can also determine the correspondence between the information of each virtual port and the information of the physical port based on at least one detection result message.
第一设备在至少一条路径中选择出第一路径之后,将第一路径上的网络设备确定为第一网络设备,确定并向第一报文中添加各个第一网络设备的物理端口所对应的虚拟端口的信息,而后发送第一报文,使得第一报文能够基于各个第一网络设备的物理端口所对应的虚拟端口的信息,按照第一路径实现转发。After the first device selects the first path from at least one path, the network device on the first path is determined as the first network device, information of the virtual ports corresponding to the physical ports of each of the first network devices is determined and added to the first message, and then the first message is sent, so that the first message can be forwarded according to the first path based on the information of the virtual ports corresponding to the physical ports of each of the first network devices.
情况A1中,基于路径探测报文进行路径探测的过程可以称为初始建连过程或初始建连阶段,第一设备通过选定多个备选虚拟端口,分别向不同的路径探测报文中添加不同的虚拟端口的信息,使得不同的路径探测报文能够按照不同的路径传输。如果第一设备与第二设备之间存在N条路经,则可以通过选定多余N个的备选虚拟端口的信息,开展途径探测,实现第一设备与第二设备之间的路径全覆盖的路径探测。In case A1, the process of performing path detection based on the path detection message can be called the initial connection establishment process or the initial connection establishment stage. The first device selects multiple candidate virtual ports and adds different virtual port information to different path detection messages, so that different path detection messages can be transmitted along different paths. If there are N paths between the first device and the second device, path detection can be carried out by selecting information of more than N candidate virtual ports to achieve path detection with full coverage of the paths between the first device and the second device.
情况A2,第一设备在发送第一报文之后确定第一路径。在一种可能的实现方式中,第一报文可以包括第二指示信息,第二指示信息指示基于第一报文返回第二报文。In case A2, the first device determines the first path after sending the first message. In a possible implementation, the first message may include second indication information, and the second indication information indicates that the second message is returned based on the first message.
在此种情况下,第一设备可以接收第一报文途经的至少一个第一网络设备发送的至少一个第二报文,任意一个第二报文包括发送任意一个第二报文的第一网络设备的第一物理端口的信息和第一虚拟端口的信息;第一设备基于至少一个第二报文所包括的至少一个第一网络设备的第一物理端口的信息和第一虚拟端口的信息,确定第一路径,第一路径包括第一设备、第二设备和第一报文途经的至少一个第一网络设备。In this case, the first device can receive at least one second message sent by at least one first network device through which the first message passes, and any second message includes information about the first physical port and information about the first virtual port of the first network device that sends any second message; the first device determines the first path based on the information about the first physical port and information about the first virtual port of at least one first network device included in the at least one second message, and the first path includes the first device, the second device, and at least one first network device through which the first message passes.
其中,第二指示信息可以与情况A1中的第一指示信息相同,第二指示信息也可以包括具有指示作用的标识,或者为包括第一路径上的至少一个第一网络设备的第一虚拟端口的信息。在此种实现方式中,第二报文相当于情况A1中的探测结果报文,第一报文除了可以用于时延测量,还可以进行路径探测,也即为第一报文赋予路径探测的能力,实现路径探测和时延测量的同步进行。如果第二指示信息为至少一个第一网络设备的第一虚拟端口的信息,则第一报文可以为基于第一路径转发的单播报文。The second indication information may be the same as the first indication information in case A1, and the second indication information may also include an identifier with an indication function, or be information including the first virtual port of at least one first network device on the first path. In this implementation, the second message is equivalent to the detection result message in case A1. In addition to being used for delay measurement, the first message can also perform path detection, that is, the first message is given the ability of path detection to achieve the synchronization of path detection and delay measurement. If the second indication information is the information of the first virtual port of at least one first network device, the first message may be a unicast message forwarded based on the first path.
第一设备接收至少一个第二报文的过程可以参照情况A1中第一设备接收至少一个探测结果报文的过程,此处不再赘述。第一设备接收到至少一个第二报文之后,能够确定第一报文途经的各个第一网络设备,也即确定第一报文途径的第一路径,并确定各个网络设备的物理端口的信息与虚拟端口的信息的对应关系。The process of the first device receiving at least one second message can refer to the process of the first device receiving at least one detection result message in situation A1, which will not be repeated here. After the first device receives at least one second message, it can determine each first network device that the first message passes through, that is, determine the first path of the first message, and determine the correspondence between the information of the physical port of each network device and the information of the virtual port.
在一种可能的实现方式中,可以将情况A1与情况A2相结合,也即第一设备在发送第一报文之前,进行路径探测,确定第一设备与第二设备之间的各条路径,并主动向第一报文中添加各个第一网络设备的第一物理端口所对应的第一虚拟端口的信息和第二指示信息,完成第一次路径的标记,使得第一报文为单播报文。使得第一报文按照第一路径传输,并且第一路径上的各个第一网络设备在接收到第一报文之后,检验第一报文中的虚拟端口的信息是否包括自身的虚拟端口的信息,如包括,第一网络设备则将第一报文进行镜像,并封装得到第二报文,完成第二次路径的标记,将镜像报文回送给第一设备,使得第一设备再次确定途经的网络设备是否为第一路径上的第一网络设备。In a possible implementation, situation A1 can be combined with situation A2, that is, before sending the first message, the first device performs path detection to determine the paths between the first device and the second device, and actively adds the information of the first virtual port corresponding to the first physical port of each first network device and the second indication information to the first message, completes the first path marking, and makes the first message a unicast message. The first message is transmitted along the first path, and after receiving the first message, each first network device on the first path checks whether the virtual port information in the first message includes the information of its own virtual port. If it does, the first network device mirrors the first message and encapsulates it to obtain the second message, completes the second path marking, and sends the mirror message back to the first device, so that the first device determines again whether the network device passing through is the first network device on the first path.
可选地,在此种实现方式中,第一报文还可以包括带内遥测技术报文头(inband network telemetry header,INT header)或,第一网络设备在接收到第一报文之后,还可以结合INT或随流检测(in-situ flow information telemetry,IFIT)技术,直接向第一报文中添加第一网络设备的物理端口的信息、第一网络设备的ID、第一网络设备接收第一报文的物理端口的信息和第一网络设备发送第一报文的物理端口的信息等元数据 (metadata,MD)和时间戳(timestamp,TS),实现路径的二次标记以及逐跳时延的标记。第一网络设备可以将二次标记后的第一报文向确定出的下一跳发送,直至第一报文传输到第二设备。第二设备再将该第一报文返回给第一设备,使得第一设备确定第一报文途径的网络设备是否为第一路径上的网络设备,进一步明确第一报文的传输路径。或者,第二设备作为尾跳服务器,可以将该经历二次标记的第一报文上报至集中设备,由集中设备对第一报文中的各个标记进行分析。Optionally, in this implementation, the first message may also include an inband network telemetry header (INT header) or, after receiving the first message, the first network device may also combine INT or in-situ flow information telemetry (IFIT) technology to directly add metadata such as information about the physical port of the first network device, the ID of the first network device, information about the physical port of the first network device receiving the first message, and information about the physical port of the first network device sending the first message to the first message. (metadata, MD) and timestamp (timestamp, TS) are used to implement secondary marking of the path and marking of the hop-by-hop delay. The first network device can send the second-marked first message to the determined next hop until the first message is transmitted to the second device. The second device then returns the first message to the first device, so that the first device determines whether the network device through which the first message passes is a network device on the first path, and further clarifies the transmission path of the first message. Alternatively, the second device, as a tail hop server, can report the first message that has undergone secondary marking to a centralized device, and the centralized device analyzes each mark in the first message.
S502,第一设备获取基于第一时间戳和第二时间戳确定的第一路径的第一时延,第一时间戳是第一设备上的网卡记录的发送第一报文的时间戳,第二时间戳是第二设备上的网卡记录的接收第一报文的时间戳。S502, the first device obtains a first delay of a first path determined based on a first timestamp and a second timestamp, where the first timestamp is a timestamp of sending a first message recorded by a network card on the first device, and the second timestamp is a timestamp of receiving the first message recorded by a network card on the second device.
在本申请实施例中,可以由不同的设备根据第一时间戳和第二时间戳确定第一时延。根据确定第一时延的设备的不同,可以将第一设备获取第一时延的情况分为多种不同的情况,包括但不限于如下的情况B1和情况B2。In the embodiment of the present application, different devices may determine the first delay according to the first timestamp and the second timestamp. Depending on the different devices determining the first delay, the situation in which the first device obtains the first delay may be divided into multiple different situations, including but not limited to the following situation B1 and situation B2.
情况B1,第一时延由第一设备自主计算。In case B1, the first delay is calculated autonomously by the first device.
在此种情况下,第一设备接收集中设备或第二设备基于第一报文发送的包括第二时间戳的报文,从包括第二时间戳的报文中获取第二时间戳;并根据第一时间戳和第二时间戳,确定第一路径的第一时延。In this case, the first device receives a message including a second timestamp sent by the centralized device or the second device based on the first message, obtains the second timestamp from the message including the second timestamp, and determines the first delay of the first path according to the first timestamp and the second timestamp.
第二设备在接收到第一报文之后,通过第二设备上的网卡记录接收第一报文的第二时间戳。在第二设备生成包括第二时间戳的报文之后,第二设备可以直接向第一设备发送包括第二时间戳的报文,也可以向集中设备发送包括第二时间戳的报文,由集中设备向第一设备转发包括第二时间戳的报文。After receiving the first message, the second device records the second timestamp of receiving the first message through the network card on the second device. After the second device generates the message including the second timestamp, the second device can directly send the message including the second timestamp to the first device, or send the message including the second timestamp to the centralized device, and the centralized device forwards the message including the second timestamp to the first device.
第一设备在接收到包括第二时间戳的报文之后,可以从包括第二时间戳的报文中获取第二时间戳,并根据第一时间戳和第二时间戳,确定第一时延的第一路径。After receiving the message including the second timestamp, the first device may obtain the second timestamp from the message including the second timestamp, and determine the first path of the first delay according to the first timestamp and the second timestamp.
可选地,第一时延可以为第二时间戳与第一时间戳之间的差值。第一时间戳和第二时间戳可以是标准时间戳也可以是非标准时间戳。如果第一时间戳和第二时间戳为标准时间戳,则第一设备可以将第二时间戳与第一时间戳的差值确定为第一路径的第一时延。如果第一时间戳与第二时间戳中的至少一个为非标准时间戳,则可以先根据该非标准时间戳与标准时间戳的差值,计算出非标准时间戳对应的标准时间戳,而后再根据非标准时间戳对应的标准时间戳确定出第一时延。Optionally, the first delay may be a difference between the second timestamp and the first timestamp. The first timestamp and the second timestamp may be standard timestamps or non-standard timestamps. If the first timestamp and the second timestamp are standard timestamps, the first device may determine the difference between the second timestamp and the first timestamp as the first delay of the first path. If at least one of the first timestamp and the second timestamp is a non-standard timestamp, the standard timestamp corresponding to the non-standard timestamp may be calculated based on the difference between the non-standard timestamp and the standard timestamp, and then the first delay may be determined based on the standard timestamp corresponding to the non-standard timestamp.
或者,在本申请实施例中,还可以不考虑第一时间戳和第二时间戳是否为标准时间戳,由于第一设备上的网卡所记录的时间戳与标准时间戳之间的差值是一定的,第二设备上的网卡所记录的时间戳与标准时间戳之间的差值也是一定的,因此,对于不同的路径而言,直接根据第一时间戳与第二时间戳所确定出的时延与根据标准时间戳所确定出的时延之间的差值是相同的,也即不同的路径所对应的时延之间的相对大小是不会因为第一时间戳与第二时间戳是否标准而改变的,直接根据基于第一时间戳和第二时间戳所确定的时延进行路径选择的准确性也不会被影响。Alternatively, in an embodiment of the present application, it is also possible to ignore whether the first timestamp and the second timestamp are standard timestamps. Since the difference between the timestamp recorded by the network card on the first device and the standard timestamp is certain, the difference between the timestamp recorded by the network card on the second device and the standard timestamp is also certain. Therefore, for different paths, the difference between the delay directly determined according to the first timestamp and the second timestamp and the delay determined according to the standard timestamp is the same, that is, the relative size of the delays corresponding to different paths will not change due to whether the first timestamp and the second timestamp are standard, and the accuracy of path selection directly based on the delay determined based on the first timestamp and the second timestamp will not be affected.
情况B2,第一时延由第二设备或集中设备计算。Case B2: the first delay is calculated by the second device or the centralized device.
在此种情况下,第一设备向第二设备或集中设备发送包括第一时间戳的报文,第一时间戳用于第二设备或集中设备确定第一路径的第一时延并接收第二设备或集中设备发送的包括第一时延的报文,第一时延由第二设备或集中设备基于第一时间戳和第二时间戳确定;第一设备从包括第一时延的报文中获取第一时延。In this case, the first device sends a message including a first timestamp to the second device or the centralized device. The first timestamp is used by the second device or the centralized device to determine the first delay of the first path and receive the message including the first delay sent by the second device or the centralized device. The first delay is determined by the second device or the centralized device based on the first timestamp and the second timestamp. The first device obtains the first delay from the message including the first delay.
第一设备可以在向第二设备发送第一报文之后,再向第二设备发送包括第一时间戳的报文,使得第二设备能够根据第二设备上的网卡记录的第二时间戳和第一时间戳,确定出第一路径的第一时延。或者,第一设备向第二设备发送第一报文之后,可以向集中设备发送包括第一时间戳的报文,第二设备在接收到第一报文之后,向集中设备发送包括第二时间戳的报文,使得集中设备既能获取到第一时间戳,也能获取到第二时间戳,并根据第一时间戳和第二时间戳,确定出第一路径的第一时延。After sending the first message to the second device, the first device may send a message including the first timestamp to the second device, so that the second device can determine the first delay of the first path according to the second timestamp and the first timestamp recorded by the network card on the second device. Alternatively, after sending the first message to the second device, the first device may send a message including the first timestamp to the centralized device, and after receiving the first message, the second device may send a message including the second timestamp to the centralized device, so that the centralized device can obtain both the first timestamp and the second timestamp, and determine the first delay of the first path according to the first timestamp and the second timestamp.
在一种可能的实现方式中,第一设备向第二设备发送的包括第一时间戳的报文也可以为第一报文本身,也即,第一设备上的网卡在记录第一时间戳之后,可以将第一时间戳标记在第一报文中,使得第二设备在接收到第一报文时,即可实现第二设备对第一时间戳的获取。之后,可以由第二设备向集中设备发送第一时间戳和第二时间戳,实现集中设备对第一时间戳和第二时间戳的获取,进而使得集中设备根据第一时间戳和第二时间戳确定出第一时延。In a possible implementation, the message including the first timestamp sent by the first device to the second device may also be the first message itself, that is, after recording the first timestamp, the network card on the first device may mark the first timestamp in the first message, so that when the second device receives the first message, the second device can obtain the first timestamp. Afterwards, the second device may send the first timestamp and the second timestamp to the centralized device, so that the centralized device can obtain the first timestamp and the second timestamp, and then the centralized device determines the first delay according to the first timestamp and the second timestamp.
在集中设备或第二设备确定出第一时延之后,可以向第一设备发送包括第一时延的报文,使得第一设备能够从包括第一时延的报文中获取到第一时延。After the central device or the second device determines the first delay, a message including the first delay may be sent to the first device, so that the first device can acquire the first delay from the message including the first delay.
可选地,在第一设备获取基于第一时间戳和第二时间戳确定的第一路径的第一时延之后,第一设备还可以接收第二设备基于第一报文发送的第三报文,第三报文的传输路径为第二路径。 Optionally, after the first device obtains the first delay of the first path determined based on the first timestamp and the second timestamp, the first device may also receive a third message sent by the second device based on the first message, where the transmission path of the third message is the second path.
第二设备向第一设备发送第三报文的过程以及第一设备确定第二路径的过程可以参照上述S501中第一设备向第二设备发送第一报文的过程以及第一设备确定第一路径的过程,此处不再赘述。The process of the second device sending the third message to the first device and the process of the first device determining the second path can refer to the process of the first device sending the first message to the second device and the process of the first device determining the first path in the above S501, which will not be repeated here.
第一设备获取基于第三时间戳和第四时间戳确定的第二路径的第二时延,第三时间戳是第一设备上的网卡记录的接收第三报文的时间戳,第四时间戳是第二设备上的网卡记录的发送第三报文的时间戳。The first device obtains a second delay of the second path determined based on a third timestamp and a fourth timestamp, where the third timestamp is a timestamp of receiving the third message recorded by the network card on the first device, and the fourth timestamp is a timestamp of sending the third message recorded by the network card on the second device.
第一设备在接收第三报文时,可以通过第一设备上的网卡记录接收第三报文的第三时间戳。When receiving the third message, the first device may record a third timestamp of receiving the third message through the network card on the first device.
在本申请实施例中,可以由不同的设备根据第三时间戳和第四时间戳确定第二时延。根据确定第二时延的设备的不同,可以将第一设备获取第二时延的情况分为多种不同的情况,包括但不限于如下的情况C1和情况C2。In the embodiment of the present application, different devices can determine the second delay according to the third timestamp and the fourth timestamp. According to different devices for determining the second delay, the situation in which the first device obtains the second delay can be divided into multiple different situations, including but not limited to the following situation C1 and situation C2.
情况C1,第二时延由第一设备自主计算。In case C1, the second delay is calculated autonomously by the first device.
在此种情况下,第一设备接收集中设备或第二设备基于第三报文发送的包括第四时间戳的报文,获取第四时间戳;并根据第三时间戳和第四时间戳,确定第二路径的第二时延。In this case, the first device receives a message including a fourth timestamp sent by the centralized device or the second device based on the third message, obtains the fourth timestamp, and determines the second delay of the second path according to the third timestamp and the fourth timestamp.
其中,第二设备或集中设备向第一设备发送包括第四时间戳的报文的过程,可以参照情况B1中第二设备或集中设备向第一设备发送包括第二时间戳的报文的过程,第一设备根据第三时间戳和第四时间戳确定第二时延的过程可以参照情况B1中第一设备根据第一时间戳和第二时间戳确定第一时延的过程,此处不再赘述。Among them, the process of the second device or centralized device sending a message including the fourth timestamp to the first device can refer to the process of the second device or centralized device sending a message including the second timestamp to the first device in situation B1, and the process of the first device determining the second delay according to the third timestamp and the fourth timestamp can refer to the process of the first device determining the first delay according to the first timestamp and the second timestamp in situation B1, which will not be repeated here.
情况C2,第二时延由第二设备或集中设备计算。In case C2, the second delay is calculated by the second device or the centralized device.
在此种情况下,第一设备向第二设备或集中设备发送包括第三时间戳的报文,第三时间戳用于第二设备或集中设备确定第二路径的第二时延;并接收第二设备或集中设备发送的包括第二时延的报文,第二时延由第二设备或集中设备基于第三时间戳和第四时间戳确定;第一设备从包括第二时延的报文中获取第二时延。In this case, the first device sends a message including a third timestamp to the second device or the centralized device, and the third timestamp is used by the second device or the centralized device to determine the second delay of the second path; and receives a message including the second delay sent by the second device or the centralized device, and the second delay is determined by the second device or the centralized device based on the third timestamp and the fourth timestamp; the first device obtains the second delay from the message including the second delay.
此种情况中第一设备获取第二时延的过程可以参照情况B1中第一设备获取第一时延的过程,此处不再赘述。In this case, the process of the first device acquiring the second delay can refer to the process of the first device acquiring the first delay in case B1, which will not be repeated here.
在本申请实施例中,可以通过选定N个单播虚拟端口,向各个第一报文中添加虚拟端口的信息,并根据上述的情况B1、情况B2、情况C1和情况C2对第一设备与第二设备之间的各条路径进行单播式的常态化的时延测量,实现时延精准测量的全覆盖。常态化的时延测量可以为固定频率的周期性测量,本申请实施例对固定频率的大小不做限定,固定频率的大小可以通过静态配置,也可以根据各个设备的状态动态调整。In an embodiment of the present application, N unicast virtual ports can be selected, virtual port information can be added to each first message, and unicast normalized delay measurement can be performed on each path between the first device and the second device according to the above-mentioned situation B1, situation B2, situation C1 and situation C2, so as to achieve full coverage of accurate delay measurement. The normalized delay measurement can be a periodic measurement of a fixed frequency. The embodiment of the present application does not limit the size of the fixed frequency. The size of the fixed frequency can be statically configured or dynamically adjusted according to the status of each device.
在一种可能的实现方式中,第一设备与第二设备之间的各条路径上的网络设备的物理端口的信息和虚拟端口的信息的对应关系可能会发生变化。以第一路径上的第一网络设备A的物理端口的信息与虚拟端口的信息之间的对应关系发生变化为例,第一设备再次向第二设备发送用于测量第一路径的第一时延的第一报文,由于第一报文中的虚拟端口的信息为对应关系发生变化之前的第一网络设备A的虚拟端口的信息,导致第一报文无法按照第一路径完成传输,因此,需要根据变化后的虚拟端口的信息,更新第一报文,使得更新后的报文能够继续按照第一路径传输。此外,第一设备还可以根据即将新建连接的路径与已有路径的连接关联度确定是否需要重新建立,若需要则更换虚拟端口的信息重新与第二设备建连,实现自适应重建。In a possible implementation, the correspondence between the information of the physical port and the information of the virtual port of the network device on each path between the first device and the second device may change. Taking the change in the correspondence between the information of the physical port and the information of the virtual port of the first network device A on the first path as an example, the first device again sends the first message for measuring the first delay of the first path to the second device. Since the information of the virtual port in the first message is the information of the virtual port of the first network device A before the change in the correspondence, the first message cannot be transmitted along the first path. Therefore, it is necessary to update the first message according to the changed virtual port information so that the updated message can continue to be transmitted along the first path. In addition, the first device can also determine whether it needs to be re-established based on the connection correlation between the path to be newly connected and the existing path. If necessary, the virtual port information is replaced to re-establish the connection with the second device to achieve adaptive reconstruction.
示例性地,对于至少一个第一网络设备中的任意一个第一网络设备,第一设备确定任意一个第一网络设备的第一物理端口对应的第二虚拟端口的信息。本申请实施例对于第一设备确定第二虚拟端口的信息的方式不做限定,示例性地,第一设备可以先确定与第一网络设备的第一物理端口对应的第一虚拟端口的信息相近或相似的虚拟端口的信息,例如,第一虚拟端口的信息为A1,则与第一虚拟端口的信息相近的虚拟端口的信息可以为A2或A3等。之后,第一设备可以根据与第一虚拟端口的信息相近的虚拟端口的信息更新第一报文,并向第二设备发送更新后的第一报文,实现该第一网络设备对应的小范围的全覆盖路径探测,并基于路径探测的结果确定出能够使得更新后的第一报文基于第一路径传输的第二虚拟端口的信息。可选地,可以在多个能够使得更新后的第一报文基于第一路径传输的虚拟端口的信息中,基于各个虚拟端口的信息与第一虚拟端口的信息之间的关联度,选择出第二虚拟端口的信息,第二虚拟端口的信息与第一端口的信息之间的关联度小于关联度阈值。其中,关联度阈值可以根据经验设置。Exemplarily, for any one of the at least one first network devices, the first device determines the information of the second virtual port corresponding to the first physical port of any one of the first network devices. The embodiment of the present application does not limit the manner in which the first device determines the information of the second virtual port. Exemplarily, the first device may first determine the information of the virtual port that is close or similar to the information of the first virtual port corresponding to the first physical port of the first network device. For example, if the information of the first virtual port is A1, the information of the virtual port that is close to the information of the first virtual port may be A2 or A3, etc. Afterwards, the first device may update the first message according to the information of the virtual port that is close to the information of the first virtual port, and send the updated first message to the second device to implement the full coverage path detection of a small range corresponding to the first network device, and determine the information of the second virtual port that enables the updated first message to be transmitted based on the first path based on the result of the path detection. Optionally, the information of the second virtual port may be selected from the information of multiple virtual ports that enable the updated first message to be transmitted based on the first path based on the correlation between the information of each virtual port and the information of the first virtual port, and the correlation between the information of the second virtual port and the information of the first port is less than the correlation threshold. Among them, the correlation threshold may be set based on experience.
之后,在第一报文对应的业务使用的连接异常时,也即由于第一路径上的第一网络设备的第一虚拟端口与第一物理端口的对应关系改变,第一报文无法按照第一路径正常转发时,第一设备可以基于第二虚拟端口的信息更新第一报文,得到更新后的报文,更新后的报文包括第二虚拟端口的信息。第一设备向第二设备发送更新后的报文,使得更新后的报文的传输路径为第一路径。而后第一设备可以获取基于第五时间 戳和第六时间戳确定的第一路径的第三时延,其中,第五时间戳是第一设备上的网卡记录的发送更新后的报文的时间戳,第六时间戳是第二设备的网卡记录的接收更新后的报文的时间戳。Afterwards, when the connection used by the service corresponding to the first message is abnormal, that is, because the correspondence between the first virtual port and the first physical port of the first network device on the first path changes, the first message cannot be forwarded normally along the first path, the first device can update the first message based on the information of the second virtual port to obtain an updated message, and the updated message includes the information of the second virtual port. The first device sends the updated message to the second device, so that the transmission path of the updated message is the first path. Then the first device can obtain the information based on the fifth time. The third delay of the first path is determined by the fifth timestamp and the sixth timestamp, wherein the fifth timestamp is the timestamp of sending the updated message recorded by the network card on the first device, and the sixth timestamp is the timestamp of receiving the updated message recorded by the network card of the second device.
第一设备获取基于第五时间戳和第六时间戳确定的第三时延的过程,可以参照第一设备获取基于第一时间戳和第二时间戳确定的第一时延的过程,此处不再赘述。The process in which the first device acquires the third delay determined based on the fifth timestamp and the sixth timestamp may refer to the process in which the first device acquires the first delay determined based on the first timestamp and the second timestamp, which will not be described in detail here.
第一设备向第二设备发送更新后的报文,实现由旧连接到新连接的切换,实现流路径的绕行切换。其中,新连接为根据与老连接的关联度选择的连接,绕行异常点或者选择相关度低的连接,也即选择与第一虚拟端口的信息相似度低的第二虚拟端口的信息。The first device sends the updated message to the second device to switch from the old connection to the new connection, thereby switching the flow path. The new connection is a connection selected based on the correlation with the old connection, bypassing the abnormal point or selecting a connection with low correlation, that is, selecting the information of the second virtual port with low similarity to the information of the first virtual port.
参见图10,示出了本申请实施例提供的时延测量方法的另一种实施场景,该实施场景用于时钟同步。第一设备可以为主(master)设备,第二设备可以为从(slave)设备。第一设备向第二设备发送同步(synchronization,sync)报文,同步报文为上述的第一报文,并通过网卡记录发送同步报文的第一时间戳t1’。之后第一设备向第二设备发送跟随(follow up)报文,跟随报文为前文所述的包括第一时间戳的报文。Referring to FIG. 10 , another implementation scenario of the delay measurement method provided in an embodiment of the present application is shown, and the implementation scenario is used for clock synchronization. The first device may be a master device, and the second device may be a slave device. The first device sends a synchronization (synchronization, sync) message to the second device, the synchronization message is the above-mentioned first message, and records the first timestamp t1' of sending the synchronization message through the network card. Afterwards, the first device sends a follow-up message to the second device, and the follow-up message is the message including the first timestamp described above.
第二设备接收同步报文,通过网卡记录第二时间戳t2’。第二设备接收跟随报文,实现对第一时间戳t1’的获取。第二设备向第一设备发送时延请求(delay request)报文,并通过网卡记录发送时延请求报文的第四时间戳t3’,时延请求报文为前文所述的第三报文。第一设备通过网卡记录接收时延请求报文的第三时间戳t4’,并向第二设备发送时延响应(delay response)报文,时延响应报文为前文所述的包括第三时间戳的报文。The second device receives the synchronization message and records the second timestamp t2’ through the network card. The second device receives the follow-up message to obtain the first timestamp t1’. The second device sends a delay request message to the first device, and records the fourth timestamp t3’ of sending the delay request message through the network card. The delay request message is the third message mentioned above. The first device records the third timestamp t4’ of receiving the delay request message through the network card, and sends a delay response message to the second device. The delay response message is the message including the third timestamp mentioned above.
第二设备在获取到四个时间戳之后,计算包括第一时延和第二时延的往返时延。其中,t1’与标准时间戳t1的差值为Δtm,t2’与标准时间戳t2的差值为Δts,t3’与标准时间戳t3的差值为Δts,t4’与标准时间戳t4的差值为Δtm。After acquiring the four timestamps, the second device calculates the round trip delay including the first delay and the second delay, wherein the difference between t1' and the standard timestamp t1 is Δtm, the difference between t2' and the standard timestamp t2 is Δts, the difference between t3' and the standard timestamp t3 is Δts, and the difference between t4' and the standard timestamp t4 is Δtm.
往返时延:(t2’-t1’)+(t4’-t3’)=(t2-t1)+(Δts-Δtm)+(t4-t3)+(Δtm-Δts)=(t2-t1)+(t4-t3)。Round trip delay: (t2’-t1’)+(t4’-t3’)=(t2-t1)+(Δts-Δtm)+(t4-t3)+(Δtm-Δts)=(t2-t1)+(t4-t3).
此外,根据本申请实施例提供的时延测量方法所测量出的时延还可以用于故障排查、高性能计算(high performance computing,HPC)、高性能分布式存储,大数据开发、人工智能(artificial intelligence,AI)、流量调度等场景。例如,在流量调度场景中,可以根据第一设备获取到的时延计算各条路径的时延平均值或方差,并根据设定的阈值进行路径推荐。In addition, the delay measured by the delay measurement method provided in the embodiment of the present application can also be used in scenarios such as troubleshooting, high performance computing (HPC), high performance distributed storage, big data development, artificial intelligence (AI), and traffic scheduling. For example, in a traffic scheduling scenario, the average or variance of the delay of each path can be calculated based on the delay obtained by the first device, and a path recommendation can be made based on a set threshold.
下面,结合相关技术对本申请实施例有益效果进行说明。Below, the beneficial effects of the embodiments of the present application are described in combination with related technologies.
相关技术一为一种基于ping网络测量时延的方法。参见图11,示出了一种ping网络软件架构示意图。该软件架构包括ping网络控制器(pingmesh controller)、ping网络代理(pingmesh agent)和数据存储分析器(data storage and analysis,DSA)。ping网络控制器和资源管理系统对接,ping网络发生器(pingmesh generator)基于从资源管理系统得到的网络图表(network graph),产生ping清单(pinglist文件),以使得数据中心中的服务器基于该ping清单进行网络探测(probing),保证网络服务(web service)的正常提供。ping清单包括数据中心中的各个服务器的探测名单和各个服务器的虚拟互联网协议地址(virtual internet protocol,VIP),ping清单的格式例如可以为可扩展标记语言(extensible markup language,XML)格式。Related technology 1 is a method for measuring latency based on a ping network. Referring to FIG11 , a schematic diagram of a ping network software architecture is shown. The software architecture includes a ping network controller (pingmesh controller), a ping network agent (pingmesh agent) and a data storage and analysis (DSA). The ping network controller is connected to the resource management system, and the ping network generator (pingmesh generator) generates a ping list (pinglist file) based on the network graph obtained from the resource management system, so that the servers in the data center perform network probing based on the ping list to ensure the normal provision of network services (web services). The ping list includes a probing list of each server in the data center and a virtual internet protocol address (VIP) of each server. The format of the ping list can be, for example, an extensible markup language (XML) format.
ping网络代理运行在数据中心中的每个服务器上,例如,图11所示的服务器1和服务器2上均运行有ping网络代理。以服务器2上运行的ping网络代理为例,ping网络代理从ping网络控制器上获取ping清单,基于获取到的ping清单确定需要与服务器2互相探测的服务器以及需要与服务器2互相探测的服务器的VIP,并按照该服务器名单进行探测。比如,如果服务器2需要与服务器1互相探测,则服务器2可以基于服务器1的VIP向服务器1发送探测请求,该探测请求可以是基于传输控制协议(transmission control protocol,TCP)或超文本传输协议(hypertext transfer protocol,HTTP)的探测请求。服务器1和服务器2互相发送探测请求,以测量服务器之间的延迟和丢包的情况。服务器上运行的ping网络代理基于探测结果生成日志(log),并将日志上载到DSA。DSA按照各个服务器的VIP对日志进行区块链存储(cosmos store),DSA通过范围作业将区块链中存储的日志存储至数据库中。此外,ping网络代理还可以向DSA中的性能计数器聚合器上报探测结果,实现性能计数器聚合器对网络状态的监控。性能计数器聚合器还可以通过运行大数据分析算法,分析处理测量数据,用于生成数据手册(data sheet)或用于故障检测和故障定位,实现网络状态的可视化(visualization),并能够实现在网络故障时及时进行警报(alert)。The ping network agent runs on each server in the data center. For example, the ping network agent runs on both server 1 and server 2 shown in FIG11. Taking the ping network agent running on server 2 as an example, the ping network agent obtains the ping list from the ping network controller, determines the servers that need to detect each other with server 2 and the VIPs of the servers that need to detect each other with server 2 based on the obtained ping list, and detects according to the server list. For example, if server 2 needs to detect each other with server 1, server 2 can send a detection request to server 1 based on the VIP of server 1. The detection request can be a detection request based on the transmission control protocol (TCP) or hypertext transfer protocol (HTTP). Server 1 and server 2 send detection requests to each other to measure the delay and packet loss between servers. The ping network agent running on the server generates a log based on the detection results and uploads the log to DSA. DSA stores the log in blockchain according to the VIP of each server. DSA stores the log stored in the blockchain in the database through range operations. In addition, the ping network agent can also report the detection results to the performance counter aggregator in the DSA, so that the performance counter aggregator can monitor the network status. The performance counter aggregator can also run big data analysis algorithms to analyze and process the measurement data for generating data sheets or for fault detection and fault location, realize network status visualization, and can provide timely alerts when network failures occur.
由于数据中心内的服务器的数量很多,如果数据中心内的任意两个服务器之间均互相检测,会为ping网络代理带来巨大的压力。因此,相关技术一通过分层控制进行时延测量,例如,在POD内部,服务器之间两两之间互相检测;DC内部POD之间,PODm或PODn内部服务器排序,两个POD中对应位置的服务器之间互相检测;DC之间,DC内部选定的服务器之间建立检测关系;每个DC中选择N台服务器,排 序,对应服务器之间互相检测。具体到DC内部,可以每个POD内部选择至少两台机器;最终由控制器控制,一个服务器最多和5000个服务器之间建立检测关系,防止Ping网络代理所在的服务器过载。Since there are many servers in a data center, if any two servers in the data center detect each other, it will bring great pressure to the ping network agent. Therefore, the related technology is to measure the latency through hierarchical control. For example, within the POD, servers detect each other; between PODs within the DC, servers within PODm or PODn are sorted, and servers at corresponding positions in two PODs detect each other; between DCs, a detection relationship is established between the selected servers within the DC; N servers are selected in each DC and sorted. In the DC, at least two machines can be selected in each POD. Finally, the controller controls one server to establish a detection relationship with up to 5,000 servers to prevent the server where the Ping network agent is located from being overloaded.
DC网络全局运行状态如图12所示:横纵坐标为服务器,图12为服务器之间测量的数据矩阵,空白矩形代表检测结果为空,带有对号的矩形代表检测结果正常,带有叉号的矩形代表检测结果异常。The global operation status of the DC network is shown in Figure 12: the horizontal and vertical axes are servers, and Figure 12 is the data matrix measured between servers. The blank rectangle represents that the detection result is empty, the rectangle with a check mark represents that the detection result is normal, and the rectangle with a cross represents that the detection result is abnormal.
图12中的(a)为DC正常运行状态下的数据矩阵;(b)为某个Podset整体故障(例如掉电(down)),数据缺失;(c)为某个Podset失效导致的某Podset范围延迟超标,一般表现为为叶子交换机丢包或者广播风暴,导致丢包引起延迟;(d)为脊交换机失效导致的脊交换机丢包,影响整个DC,但是Podset内部通信是正常的。(a) in Figure 12 is the data matrix under normal operating conditions of the DC; (b) is an overall failure of a Podset (for example, power off), resulting in data loss; (c) is a Podset failure that causes the delay of a Podset to exceed the standard, which is generally manifested as packet loss or broadcast storm in the leaf switch, resulting in packet loss and delay; (d) is a spine switch failure that causes spine switch packet loss, affecting the entire DC, but the internal communication of the Podset is normal.
由于相关技术所测量的时延不仅是端到端之间的网络时延,还包括栈上处理时延和CPU解析报文产生的时延,所以无法根据相关技术所测量的时延判断出业务异常是否为网络异常导致的时延增加。此外,相关技术一的可靠性监测依赖于控制器与大量分析器,网络对业务节点不可视,对业务来说是黑盒,仅依赖大量探测提高覆盖率,实际覆盖率也未知,大量的测量数据推断故障,分析复杂,无法精确判定故障、存在误判;故障定位时间长。相关技术一这种拨测方案,由于将网络当做黑盒子,盲测需要大量的开销(带宽和计算资源)构造更多探测,用于提高路径、链路和转发行为覆盖率,难以及时发现问题。Since the delay measured by the related technology is not only the end-to-end network delay, but also includes the processing delay on the stack and the delay caused by the CPU parsing the message, it is impossible to judge whether the service anomaly is caused by the delay increase caused by the network anomaly based on the delay measured by the related technology. In addition, the reliability monitoring of related technology one relies on the controller and a large number of analyzers. The network is invisible to the service nodes and is a black box for the service. It only relies on a large number of probes to improve the coverage, and the actual coverage is unknown. A large amount of measurement data is used to infer the fault, and the analysis is complex. It is impossible to accurately determine the fault and there are misjudgments; the fault location time is long. Related technology one This dial-up test solution, because the network is treated as a black box, blind testing requires a lot of overhead (bandwidth and computing resources) to construct more probes to improve the coverage of paths, links and forwarding behaviors, and it is difficult to find problems in time.
相关技术二中认为输入输出(input output,IO)时延是影响存储业务的关键因素,同时也是客户高性能业务需求,区分高中低存储业务核心指标。相关技术二在存储业务节点上感知端到端往返时延(round-trip time,RTT),通过业务层不断的测量端到端连接的RTT,端侧根据RTT区分路径的负荷,将更多流量分发到低RTT的路径上,进而保障IO的平均时延和尾时延。节点间测量的RTT含协议栈延时,误差大,调节不准,导致业务切路径不准,影响业务的性能。Related Technology 2 believes that input-output (IO) latency is a key factor affecting storage services, and is also a high-performance service requirement for customers, distinguishing between high, medium and low storage service core indicators. Related Technology 2 perceives the end-to-end round-trip time (RTT) on the storage service node, and continuously measures the RTT of the end-to-end connection through the service layer. The end side distinguishes the load of the path based on the RTT, and distributes more traffic to the low RTT path, thereby ensuring the average latency and tail latency of IO. The RTT measured between nodes includes the protocol stack latency, which has large errors and inaccurate adjustments, resulting in inaccurate service path switching and affecting service performance.
相关技术三通过在网络节点上部署INT,网络节点测量每一跳的时延,同时感知业务流在网络中的路径,端侧根据测量的端到端经历的网络时延区分路径的负荷,将更多流量分发到低时延的路径上,进而保障IO的平均时延和尾时延。但是采用带内测量技术INT,存量设备不支持INT,INT同时需要对业务或测量流量识别和镜像,占用较大的网络开销,实际在现网中难以部署。Related technology 3: By deploying INT on network nodes, the network nodes measure the delay of each hop and sense the path of the service flow in the network. The end side distinguishes the load of the path based on the measured end-to-end network delay, and distributes more traffic to the low-latency path, thereby ensuring the average delay and tail delay of IO. However, the in-band measurement technology INT is used, and the existing devices do not support INT. INT also requires the identification and mirroring of service or measurement traffic, which occupies a large network overhead and is actually difficult to deploy in the existing network.
本申请实施例通过网卡记录的硬件时间戳所确定出的第一时延为第一设备与第二设备间的第一路径上的网络时延,能够避免第一设备和第二设备的端上处理时延造成的长尾时延,并能够实现时延与路径的绑定,实现时延的可视化。In the embodiment of the present application, the first delay determined by the hardware timestamp recorded by the network card is the network delay on the first path between the first device and the second device, which can avoid the long tail delay caused by the end processing delay of the first device and the second device, and can realize the binding of the delay and the path, and realize the visualization of the delay.
示例性地,本申请实施例能够通过对第一设备与第二设备之间的多条路径进行感知,并基于网卡记录的硬件时间戳对各条路径进行常态化的时延测量,不依赖于网络设备产生的逐跳时延,即可实现端到端的精准时延测量,因此,本申请实施例中通过网卡记录时间戳的能力仅需要服务器上的网卡支持,不需要对网络设备进行改造,具备较高可部署性,且能够消除端上协议栈和中央处理单元(central processing unit,CPU)解析报文产生的时延。此外,本申请实施例通过结合网络时延测量和路径感知这两种能力,通过多个单播流,基于较低成本即可达到网络路径的全覆盖时延测量。并且,能够更为精准地调配网络流量,提升业务性能,减少由于网络流量排队造成的长尾延时。Exemplarily, the embodiment of the present application can sense multiple paths between the first device and the second device, and perform normalized delay measurement on each path based on the hardware timestamp recorded by the network card, without relying on the hop-by-hop delay generated by the network device, and can achieve end-to-end accurate delay measurement. Therefore, the ability to record timestamps through the network card in the embodiment of the present application only requires the support of the network card on the server, and does not require the modification of the network device. It has high deployability and can eliminate the delay caused by the protocol stack and the central processing unit (CPU) parsing the message on the end. In addition, the embodiment of the present application combines the two capabilities of network delay measurement and path perception, and can achieve full coverage delay measurement of network paths at a relatively low cost through multiple unicast streams. In addition, it can more accurately allocate network traffic, improve service performance, and reduce long-tail delays caused by network traffic queuing.
以上介绍了本申请实施例提供的时延测量方法,与上述方法对应,本申请实施例还提供了一种时延测量装置。其中,该装置应用于第一设备。该装置用于通过图13所示的各个模块执行上述图5中第一设备所执行的时延测量方法。如图13所示,本申请实施例提供的时延测量装置包括如下几个模块。The above describes the delay measurement method provided by the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides a delay measurement device. The device is applied to a first device. The device is used to execute the delay measurement method performed by the first device in FIG. 5 through the modules shown in FIG. 13. As shown in FIG. 13, the delay measurement device provided by the embodiment of the present application includes the following modules.
收发模块1301,用于向第二设备发送第一报文,第一报文的传输路径为第一路径;处理模块1302,用于获取基于第一时间戳和第二时间戳确定的第一路径的第一时延,第一时间戳是第一设备上的网卡记录的发送第一报文的时间戳,第二时间戳是第二设备上的网卡记录的接收第一报文的时间戳。The transceiver module 1301 is used to send a first message to a second device, and the transmission path of the first message is the first path; the processing module 1302 is used to obtain a first delay of the first path determined based on a first timestamp and a second timestamp, the first timestamp is the timestamp of sending the first message recorded by the network card on the first device, and the second timestamp is the timestamp of receiving the first message recorded by the network card on the second device.
在一种可能的实现方式中,收发模块1301,还用于向第二设备发送路径探测报文,路径探测报文包括第一指示信息,第一指示信息指示基于路径探测报文返回探测结果报文;接收基于路径探测报文返回的至少一个探测结果报文,探测结果报文包括发送探测结果报文的网络设备的物理端口的信息和虚拟端口的信息;处理模块1302,还用于基于至少一个探测结果报文包括的至少一个网络设备的物理端口的信息和虚拟端口的信息,确定第一设备与第二设备之间的至少一条路径;在至少一条路径中选择第一路径。In one possible implementation, the transceiver module 1301 is also used to send a path detection message to the second device, the path detection message includes first indication information, and the first indication information indicates that a detection result message is returned based on the path detection message; receive at least one detection result message returned based on the path detection message, the detection result message includes information about the physical port and virtual port of the network device that sent the detection result message; the processing module 1302 is also used to determine at least one path between the first device and the second device based on information about the physical port and virtual port of at least one network device included in at least one detection result message; and select a first path from the at least one path.
在一种可能的实现方式中,第一报文包括第二指示信息,第二指示信息指示基于第一报文返回第二报文;收发模块1301,还用于接收第一报文途经的至少一个第一网络设备发送的至少一个第二报文,任意一个第二报文包括发送任意一个第二报文的第一网络设备的第一物理端口的信息和第一虚拟端口的信息;处理模块1302,还用于基于至少一个第二报文所包括的至少一个第一网络设备的第一物理端口的信息和第一 虚拟端口的信息,确定第一路径,第一路径包括第一设备、第二设备和第一报文途经的至少一个第一网络设备。In a possible implementation, the first message includes second indication information, and the second indication information indicates that the second message is returned based on the first message; the transceiver module 1301 is further used to receive at least one second message sent by at least one first network device through which the first message passes, and any second message includes information about the first physical port and the first virtual port of the first network device that sends any second message; the processing module 1302 is also used to receive at least one second message sent by at least one first network device through which the first message passes, and any second message includes information about the first physical port and the first virtual port of the first network device that sends any second message. The first path is determined based on the information of the virtual port, where the first path includes the first device, the second device, and at least one first network device through which the first message passes.
在一种可能的实现方式中,处理模块1302,用于接收集中设备或第二设备基于第一报文发送的包括第二时间戳的报文,从包括第二时间戳的报文中获取第二时间戳;根据第一时间戳和第二时间戳,确定第一路径的第一时延。In a possible implementation, the processing module 1302 is used to receive a message including a second timestamp sent by a centralized device or a second device based on the first message, obtain the second timestamp from the message including the second timestamp; and determine a first delay of the first path according to the first timestamp and the second timestamp.
在一种可能的实现方式中,处理模块1302,用于向第二设备或集中设备发送包括第一时间戳的报文,第一时间戳用于第二设备或集中设备确定第一路径的第一时延;接收第二设备或集中设备发送的包括第一时延的报文,第一时延由第二设备或集中设备基于第一时间戳和第二时间戳确定;从包括第一时延的报文中获取第一时延。In one possible implementation, the processing module 1302 is used to send a message including a first timestamp to a second device or a centralized device, where the first timestamp is used by the second device or the centralized device to determine a first delay of a first path; receive a message including a first delay sent by the second device or the centralized device, where the first delay is determined by the second device or the centralized device based on the first timestamp and the second timestamp; and obtain the first delay from the message including the first delay.
在一种可能的实现方式中,收发模块1301,还用于接收第二设备基于第一报文发送的第三报文,第三报文的传输路径为第二路径;处理模块1302,还用于获取基于第三时间戳和第四时间戳确定的第二路径的第二时延,第三时间戳是第一设备上的网卡记录的接收第三报文的时间戳,第四时间戳是第二设备上的网卡记录的发送第三报文的时间戳。In one possible implementation, the transceiver module 1301 is also used to receive a third message sent by the second device based on the first message, and the transmission path of the third message is the second path; the processing module 1302 is also used to obtain a second delay of the second path determined based on a third timestamp and a fourth timestamp, the third timestamp is the timestamp of receiving the third message recorded by the network card on the first device, and the fourth timestamp is the timestamp of sending the third message recorded by the network card on the second device.
在一种可能的实现方式中,处理模块1302,用于接收集中设备或第二设备基于第三报文发送的包括第四时间戳的报文,获取第四时间戳;根据第三时间戳和第四时间戳,确定第二路径的第二时延。In a possible implementation, the processing module 1302 is configured to receive a message including a fourth timestamp sent by the centralized device or the second device based on the third message, obtain the fourth timestamp, and determine the second delay of the second path according to the third timestamp and the fourth timestamp.
在一种可能的实现方式中,处理模块1302,用于向第二设备或集中设备发送包括第三时间戳的报文,第三时间戳用于第二设备或集中设备确定第二路径的第二时延;接收第二设备或集中设备发送的包括第二时延的报文,第二时延由第二设备或集中设备基于第三时间戳和第四时间戳确定;从包括第二时延的报文中获取第二时延。In one possible implementation, the processing module 1302 is used to send a message including a third timestamp to a second device or a centralized device, where the third timestamp is used by the second device or the centralized device to determine a second delay of a second path; receive a message including a second delay sent by the second device or the centralized device, where the second delay is determined by the second device or the centralized device based on the third timestamp and a fourth timestamp; and obtain the second delay from the message including the second delay.
在一种可能的实现方式中,处理模块1302,还用于对于至少一个第一网络设备中的任意一个第一网络设备,确定任意一个第一网络设备的第一物理端口对应的第二虚拟端口的信息;基于第二虚拟端口的信息更新第一报文,得到更新后的报文,更新后的报文包括第二虚拟端口的信息;收发模块1301,还用于向第二设备发送更新后的报文,更新后的报文的传输路径为第一路径;处理模块1302,还用于获取基于第五时间戳和第六时间戳确定的第一路径的第三时延,第五时间戳是第一设备上的网卡记录的发送更新后的报文的时间戳,第六时间戳是第二设备的网卡记录的接收更新后的报文的时间戳。In one possible implementation, the processing module 1302 is also used to determine, for any one of the at least one first network devices, information of a second virtual port corresponding to a first physical port of any one of the first network devices; update the first message based on the information of the second virtual port to obtain an updated message, and the updated message includes information of the second virtual port; the transceiver module 1301 is also used to send the updated message to the second device, and the transmission path of the updated message is the first path; the processing module 1302 is also used to obtain a third delay of the first path determined based on a fifth timestamp and a sixth timestamp, the fifth timestamp being the timestamp of sending the updated message recorded by the network card on the first device, and the sixth timestamp being the timestamp of receiving the updated message recorded by the network card of the second device.
应理解的是,上述图13提供的装置在实现其功能时,所具备的有益效果与图5提供的方法所具备的有益效果相同,此处不再赘述。另外,图13提供的装置在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be understood that the beneficial effects of the device provided in FIG. 13 when implementing its functions are the same as the beneficial effects of the method provided in FIG. 5, which will not be described in detail here. In addition, when the device provided in FIG. 13 implements its functions, only the division of the above-mentioned functional modules is used as an example. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be described in detail here.
参见图14,图14示出了本申请一示例性的时延测量设备1400的结构示意图,该时延测量设备1400包括至少一个处理器1401、存储器1403以及至少一个网络接口1404。Referring to FIG. 14 , FIG. 14 shows a schematic structural diagram of an exemplary delay measurement device 1400 of the present application. The delay measurement device 1400 includes at least one processor 1401 , a memory 1403 , and at least one network interface 1404 .
处理器1401例如是通用中央处理器、数字信号处理器(digital signal processor,DSP)、网络处理器(network processer,NP)、GPU、神经网络处理器(neural-network processing units,NPU)、数据处理单元(Data Processing Unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路或专用集成电路(application-specific integrated circuit,ASIC)、可编程逻辑器件(programmable logic device,PLD)、其他通用处理器或者其他可编程逻辑器件、分立门、晶体管逻辑器件、分立硬件部件或者其任意组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。通用处理器可以是微处理器或者是任何常规的处理器等。值得说明的是,处理器可以是支持进阶精简指令集机器(advanced RISC machines,ARM)架构的处理器。其可以实现或执行结合本申请公开内容所描述的各种逻辑方框、模块和电路。处理器也可以是实现计算功能的组合,例如包括一个或多个微处理器组合,DSP和微处理器的组合等等。Processor 1401 is, for example, a general-purpose central processing unit, a digital signal processor (DSP), a network processor (NP), a GPU, a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits or application-specific integrated circuits (ASICs) for implementing the solution of the present application, a programmable logic device (PLD), other general-purpose processors or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components, or any combination thereof. PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture. It may implement or execute various logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
可选的,时延测量设备1400还包括总线1402。总线1402用于在时延测量设备1400的各组件之间传送信息。总线1402可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线1402可以分为地址总线、数据总线、控制总线等。为便于表示,图14中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。Optionally, the delay measurement device 1400 further includes a bus 1402. The bus 1402 is used to transmit information between the components of the delay measurement device 1400. The bus 1402 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 1402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, FIG. 14 is represented by only one line, but it does not mean that there is only one bus or one type of bus.
存储器1403例如是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中, 非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。The memory 1403 is, for example, a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache.
通过示例性但不是限制性说明,许多形式的ROM和RAM可用。例如,ROM为只读光盘(compact disc read-only memory,CD-ROM)。RAM包括但不限于静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic random access memory,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。By way of example and not limitation, many forms of ROM and RAM are available. For example, ROM is a compact disc read-only memory (CD-ROM). RAM includes, but is not limited to, static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).
存储器1403还可以是可存储静态信息和指令的其它类型的存储设备。或者可以是可存储信息和指令的其它类型的动态存储设备。或者可以是其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器1403例如是独立存在,并通过总线1402与处理器1401相连接。存储器1403也可以和处理器1401集成在一起。The memory 1403 may also be other types of storage devices that can store static information and instructions. Or it may be other types of dynamic storage devices that can store information and instructions. Or it may be other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, blue-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by the computer, but is not limited to this. The memory 1403, for example, exists independently and is connected to the processor 1401 through the bus 1402. The memory 1403 may also be integrated with the processor 1401.
网络接口1404使用任何收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(radio access network,RAN)或无线局域网(wireless local area network,WLAN)等。网络接口1404可以包括有线网络接口,还可以包括无线网络接口。具体的,网络接口1404可以为以太(Ethernet)接口,如:快速以太(Fast Ethernet,FE)接口、千兆以太(Gigabit Ethernet,GE)接口,异步传输模式(Asynchronous Transfer Mode,ATM)接口,WLAN接口,蜂窝网络接口或其组合。以太网接口可以是光接口,电接口或其组合。在本申请的一些实施方式中,网络接口1404可以用于时延测量设备1400与其他设备进行通信。The network interface 1404 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc. The network interface 1404 may include a wired network interface and a wireless network interface. Specifically, the network interface 1404 may be an Ethernet interface, such as a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a WLAN interface, a cellular network interface or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface or a combination thereof. In some embodiments of the present application, the network interface 1404 may be used for the delay measurement device 1400 to communicate with other devices.
在具体实现中,作为一些实施方式,处理器1401可以包括一个或多个CPU,如图14中所示的CPU0和CPU1。这些处理器中的每一个可以是一个单核处理器,也可以是一个多核处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as some embodiments, the processor 1401 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG14. Each of these processors may be a single-core processor or a multi-core processor. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
在具体实现中,作为一些实施方式,时延测量设备1400可以包括多个处理器,如图14中所示的处理器1401和处理器1405。这些处理器中的每一个可以是一个单核处理器,也可以是一个多核处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。In a specific implementation, as some implementation methods, the delay measurement device 1400 may include multiple processors, such as the processor 1401 and the processor 1405 shown in FIG14. Each of these processors may be a single-core processor or a multi-core processor. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (such as computer program instructions).
在一些实施方式中,存储器1403用于存储执行本申请方案的程序指令1410,处理器1401可以执行存储器1403中存储的程序指令1410。也即是,时延测量设备1400可以通过处理器1401以及存储器1403中的程序指令1410,来实现方法实施例提供的方法,即图5的方法。程序指令1410中可以包括一个或多个软件模块。可选地,处理器1401自身也可以存储执行本申请方案的程序指令。In some implementations, the memory 1403 is used to store program instructions 1410 for executing the solution of the present application, and the processor 1401 can execute the program instructions 1410 stored in the memory 1403. That is, the delay measurement device 1400 can implement the method provided by the method embodiment, that is, the method of FIG. 5, through the processor 1401 and the program instructions 1410 in the memory 1403. The program instructions 1410 may include one or more software modules. Optionally, the processor 1401 itself may also store program instructions for executing the solution of the present application.
在具体实施过程中,本申请的时延测量设备1400可对应于用于执行上述方法的第一网元设备,时延测量设备1400中的处理器1401读取存储器1403中的指令,使图14所示的时延测量设备1400能够执行方法实施例中的全部或部分步骤。In the specific implementation process, the delay measurement device 1400 of the present application may correspond to a first network element device for executing the above method. The processor 1401 in the delay measurement device 1400 reads the instructions in the memory 1403, so that the delay measurement device 1400 shown in Figure 14 can execute all or part of the steps in the method embodiment.
其中,图5所示的方法的各步骤通过时延测量设备1400的处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请所公开的方法实施例的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法实施例的步骤,为避免重复,这里不再详细描述。Among them, each step of the method shown in Figure 5 is completed by the hardware integrated logic circuit or software instructions in the processor of the delay measurement device 1400. The steps of the method embodiment disclosed in the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method embodiment in combination with its hardware. To avoid repetition, it will not be described in detail here.
参见图15,图15示出了本申请一示例性的时延测量设备1300的结构示意图。时延测量设备1300包括:主控板1310和接口板1330。图15所示的时延测量设备1300用于执行上述图5所示的时延测量方法所涉及的操作。该时延测量设备1300例如是交换机、路由器、控制器等。Referring to FIG. 15 , FIG. 15 shows a schematic diagram of the structure of an exemplary delay measurement device 1300 of the present application. The delay measurement device 1300 includes: a main control board 1310 and an interface board 1330. The delay measurement device 1300 shown in FIG. 15 is used to perform the operations involved in the delay measurement method shown in FIG. 5 above. The delay measurement device 1300 is, for example, a switch, a router, a controller, etc.
主控板1310也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板1310用于对时延测量设备1300中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板1310包括:中央处理器1311和存储器1312。The main control board 1310 is also called a main processing unit (MPU) or a route processor card. The main control board 1310 is used to control and manage various components in the delay measurement device 1300, including route calculation, device management, device maintenance, and protocol processing functions. The main control board 1310 includes: a central processing unit 1311 and a memory 1312.
接口板1330也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板1330用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(flexible ethernet clients,FlexE Clients)。接口板1330包括:中央处理器1331、网络处理器1332、转发表项存储器1334和物理接口卡(physical interface card,PIC)1333。The interface board 1330 is also called a line processing unit (LPU), a line card or a service board. The interface board 1330 is used to provide various service interfaces and implement data packet forwarding. The service interfaces include but are not limited to Ethernet interfaces, POS (Packet over Ethernet), and The interface board 1330 includes: a central processor 1331, a network processor 1332, a forwarding table memory 1334 and a physical interface card (PIC) 1333.
接口板1330上的中央处理器1331用于对接口板1330进行控制管理并与主控板1310上的中央处理器1311进行通信。The central processor 1331 on the interface board 1330 is used to control and manage the interface board 1330 and communicate with the central processor 1311 on the main control board 1310 .
网络处理器1332用于实现报文的转发处理。网络处理器1332的形态可以是转发芯片。具体而言,网络处理器1332用于基于转发表项存储器1334保存的转发表转发接收到的报文,如果报文的目的地址为时延测量设备1300的地址,则将该报文上送至CPU(如中央处理器1311)处理;如果报文的目的地址不是时延测量设备1300的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。其中,上行报文的处理包括:报文入接口的处理,转发表查找;下行报文的处理:转发表查找等等。The network processor 1332 is used to implement the forwarding processing of the message. The network processor 1332 can be in the form of a forwarding chip. Specifically, the network processor 1332 is used to forward the received message based on the forwarding table stored in the forwarding table entry memory 1334. If the destination address of the message is the address of the delay measurement device 1300, the message is sent to the CPU (such as the central processor 1311) for processing; if the destination address of the message is not the address of the delay measurement device 1300, the next hop and the output interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the output interface corresponding to the destination address. Among them, the processing of the uplink message includes: processing of the message input interface, forwarding table search; processing of the downlink message: forwarding table search, etc.
物理接口卡1333用于实现物理层的对接功能,原始的流量由此进入接口板1330,以及处理后的报文从该物理接口卡1333发出。物理接口卡1333也称为子卡,可安装在接口板1330上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器1332处理。在一些实施方式中,中央处理器也可执行网络处理器1332的功能,比如基于通用CPU实现软件转发,从而物理接口卡1333中不需要网络处理器1332。The physical interface card 1333 is used to implement the connection function of the physical layer, and the original traffic enters the interface board 1330 from it, and the processed message is sent from the physical interface card 1333. The physical interface card 1333 is also called a daughter card, which can be installed on the interface board 1330 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 1332 for processing after checking the legitimacy of the message. In some embodiments, the central processor can also perform the functions of the network processor 1332, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1332 is not required in the physical interface card 1333.
可选地,时延测量设备1300包括多个接口板,例如时延测量设备1300还包括接口板1340,接口板1340包括:中央处理器1341、网络处理器1342、转发表项存储器1344和物理接口卡1343。Optionally, the delay measurement device 1300 includes multiple interface boards. For example, the delay measurement device 1300 further includes an interface board 1340 . The interface board 1340 includes a central processor 1341 , a network processor 1342 , a forwarding table entry memory 1344 , and a physical interface card 1343 .
可选地,时延测量设备1300还包括交换网板1320。交换网板1320也可以称为交换网板单元(switch fabric unit,SFU)。在时延测量设备有多个接口板1330的情况下,交换网板1320用于完成各接口板之间的数据交换。例如,接口板1330和接口板1340之间可以通过交换网板1320通信。Optionally, the delay measurement device 1300 further includes a switching fabric board 1320. The switching fabric board 1320 may also be referred to as a switch fabric unit (SFU). In the case where the delay measurement device has multiple interface boards 1330, the switching fabric board 1320 is used to complete data exchange between the interface boards. For example, the interface board 1330 and the interface board 1340 may communicate through the switching fabric board 1320.
主控板1310和接口板1330耦合。例如。主控板1310、接口板1330和接口板1340,以及交换网板1320之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板1310和接口板1330之间建立进程间通信协议(inter-process communication,IPC)通道,主控板1310和接口板1330之间通过IPC通道进行通信。The main control board 1310 and the interface board 1330 are coupled. For example, the main control board 1310, the interface board 1330, the interface board 1340, and the switching network board 1320 are connected to the system backplane through the system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 1310 and the interface board 1330, and the main control board 1310 and the interface board 1330 communicate through the IPC channel.
在逻辑上,时延测量设备1300包括控制面和转发面,控制面包括主控板1310和中央处理器1331,转发面包括执行转发的各个组件,比如转发表项存储器1334、物理接口卡1333和网络处理器1332。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器1332基于控制面下发的转发表对物理接口卡1333收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器1334中。在有些实施方式中,控制面和转发面可以完全分离,不在同一设备上。Logically, the delay measurement device 1300 includes a control plane and a forwarding plane. The control plane includes a main control board 1310 and a central processing unit 1331. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 1334, a physical interface card 1333, and a network processor 1332. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 1332 forwards the message received by the physical interface card 1333 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 1334. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,时延测量设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,时延测量设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,时延测量设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的时延测量设备的数据接入和处理能力要大于集中式架构的设备。可选地,时延测量设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等通信设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。It is worth noting that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the delay measurement device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. In a centralized forwarding architecture, the delay measurement device may not need a switching network board, and the interface board is responsible for the processing function of the service data of the entire system. In a distributed forwarding architecture, the delay measurement device may have at least one switching network board, and the switching network board is used to realize data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the delay measurement device with a distributed architecture are greater than those of the device with a centralized architecture. Optionally, the delay measurement device may also be in the form of only one board, that is, without a switching network board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two superimposed. The data exchange and processing capabilities of this type of device are relatively low (for example, low-end switches or communication devices such as routers). The specific architecture to be adopted depends on the specific networking deployment scenario, and no limitation is made here.
在示例性实施例中,提供了一种时延测量系统,该系统包括第一设备、第二设备和网络设备,第一设备用于执行图5中第一设备所执行的方法。In an exemplary embodiment, a delay measurement system is provided. The system includes a first device, a second device, and a network device. The first device is used to execute the method executed by the first device in FIG. 5 .
在示例性实施例中,提供了一种计算机程序(产品),计算机程序(产品)包括:计算机程序代码,当计算机程序代码被计算机运行时,使得计算机执行图5所示的方法。In an exemplary embodiment, a computer program (product) is provided. The computer program (product) includes: computer program code. When the computer program code is executed by a computer, the computer executes the method shown in FIG. 5 .
在示例性实施例中,提供了一种计算机可读存储介质,计算机可读存储介质存储程序或指令,当程序或指令在计算机上运行时,计算机执行上述图5所示的方法。 In an exemplary embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a program or an instruction. When the program or the instruction is executed on a computer, the computer executes the method shown in FIG. 5 .
在示例性实施例中,提供了一种芯片,包括处理器,用于从存储器中调用并运行存储器中存储的指令,使得安装有芯片的计算机执行图5所示的方法。In an exemplary embodiment, a chip is provided, including a processor for calling from a memory and executing instructions stored in the memory, so that a computer equipped with the chip executes the method shown in FIG. 5 .
在示例性实施例中,提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,输入接口、输出接口、处理器以及存储器之间通过内部连接通路相连,处理器用于执行存储器中的代码,当代码被执行时,安装有芯片的计算机执行图5所示的方法。In an exemplary embodiment, another chip is provided, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, a computer equipped with the chip executes the method shown in FIG. 5 .
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk)等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk), etc.
本申请中术语“第一”“第二”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”、“第n”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。还应理解,尽管以下描述使用术语第一、第二等来描述各种元素,但这些元素不应受术语的限制。这些术语只是用于将一元素与另一元素区别分开。In this application, the terms "first", "second", etc. are used to distinguish the same or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limit on the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another element.
还应理解,在本申请的各个实施例中,各个过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
本申请中术语“至少一个”的含义是指一个或多个,本申请中术语“多个”的含义是指两个或两个以上,例如,多个第二设备是指两个或两个以上的第二设备。本文中术语“系统”和“网络”经常可互换使用。The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple second devices means two or more second devices. The terms "system" and "network" are often used interchangeably herein.
应理解,在本文中对各种所述示例的描述中所使用的术语只是为了描述特定示例,而并非旨在进行限制。如在对各种所述示例的描述和所附权利要求书中所使用的那样,单数形式“一个(“a”,“an”)”和“该”旨在也包括复数形式,除非上下文另外明确地指示。It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
还应理解,本文中所使用的术语“和/或”是指并且涵盖相关联的所列出的项目中的一个或多个项目的任何和全部可能的组合。术语“和/或”,是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请中的字符“/”,一般表示前后关联对象是一种“或”的关系。It should also be understood that the term "and/or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and/or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this application generally indicates that the associated objects before and after are in an "or" relationship.
还应理解,术语“若”和“如果”可被解释为意指“当...时”(“when”或“upon”)或“响应于确定”或“响应于检测到”。类似地,根据上下文,短语“若确定...”或“若检测到[所陈述的条件或事件]”可被解释为意指“在确定...时”或“响应于确定...”或“在检测到[所陈述的条件或事件]时”或“响应于检测到[所陈述的条件或事件]”。It should also be understood that the terms "if" and "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrases "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.
以上所述仅为本申请的实施例,并不用以限制本申请,凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。 The above description is only an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims (13)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311172026.X | 2023-09-12 | ||
CN202311172026.XA CN119629090A (en) | 2023-09-12 | 2023-09-12 | Time delay measurement method, device, equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2025055769A1 true WO2025055769A1 (en) | 2025-03-20 |
Family
ID=94908878
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2024/116298 WO2025055769A1 (en) | 2023-09-12 | 2024-09-02 | Latency measurement method and apparatus, and device and computer-readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN119629090A (en) |
WO (1) | WO2025055769A1 (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060239300A1 (en) * | 2005-03-30 | 2006-10-26 | Clifford Hannel | Hardware time stamping and processor synchronization |
CN103427935A (en) * | 2012-05-16 | 2013-12-04 | 中国科学院声学研究所 | Network delay measuring method and system for eliminating position errors |
CN105591912A (en) * | 2015-07-21 | 2016-05-18 | 杭州华三通信技术有限公司 | Forwarding path selection method and device |
CN107147544A (en) * | 2017-05-11 | 2017-09-08 | 郑州云海信息技术有限公司 | A method and device for testing network delay |
CN112152872A (en) * | 2020-08-31 | 2020-12-29 | 新华三大数据技术有限公司 | Network sub-health detection method and device |
WO2022174770A1 (en) * | 2021-02-20 | 2022-08-25 | 中国移动通信有限公司研究院 | Delay measurement method and device |
CN115190070A (en) * | 2022-06-07 | 2022-10-14 | 阿里巴巴(中国)有限公司 | Route detection method and device |
CN115811484A (en) * | 2022-11-10 | 2023-03-17 | 阿里巴巴(中国)有限公司 | Network detection method, device and storage medium |
-
2023
- 2023-09-12 CN CN202311172026.XA patent/CN119629090A/en active Pending
-
2024
- 2024-09-02 WO PCT/CN2024/116298 patent/WO2025055769A1/en unknown
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060239300A1 (en) * | 2005-03-30 | 2006-10-26 | Clifford Hannel | Hardware time stamping and processor synchronization |
CN103427935A (en) * | 2012-05-16 | 2013-12-04 | 中国科学院声学研究所 | Network delay measuring method and system for eliminating position errors |
CN105591912A (en) * | 2015-07-21 | 2016-05-18 | 杭州华三通信技术有限公司 | Forwarding path selection method and device |
CN107147544A (en) * | 2017-05-11 | 2017-09-08 | 郑州云海信息技术有限公司 | A method and device for testing network delay |
CN112152872A (en) * | 2020-08-31 | 2020-12-29 | 新华三大数据技术有限公司 | Network sub-health detection method and device |
WO2022174770A1 (en) * | 2021-02-20 | 2022-08-25 | 中国移动通信有限公司研究院 | Delay measurement method and device |
CN115190070A (en) * | 2022-06-07 | 2022-10-14 | 阿里巴巴(中国)有限公司 | Route detection method and device |
CN115811484A (en) * | 2022-11-10 | 2023-03-17 | 阿里巴巴(中国)有限公司 | Network detection method, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN119629090A (en) | 2025-03-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9917745B2 (en) | Validation of chained network services | |
US6983294B2 (en) | Redundancy systems and methods in communications systems | |
US20220200896A1 (en) | Path Detection Method, Apparatus, and Computer Storage Medium | |
US20190109776A1 (en) | Network device service quality detection method and apparatus | |
CN112311580B (en) | Method, device and system for determining message transmission path, and computer storage medium | |
CN111404822B (en) | Data transmission method, device, equipment and computer readable storage medium | |
WO2022062931A1 (en) | Network anomaly determination method and apparatus | |
EP4149058A1 (en) | Network performance measurement method, apparatus, device and system, and storage medium | |
US11909581B2 (en) | Cross-domain fault analysis method and system | |
JP2023554325A (en) | Packet processing method and device | |
JP5352502B2 (en) | Packet communication system and packet communication apparatus control method | |
US8929200B2 (en) | Communication device, communication system, and communication method | |
JP4985872B2 (en) | Route analyzer | |
EP3977680B1 (en) | Trace routing in virtual networks | |
WO2025055769A1 (en) | Latency measurement method and apparatus, and device and computer-readable storage medium | |
Osukhivska et al. | Method for estimating the convergence parameters of dynamic routing protocols in computer networks | |
WO2014000509A1 (en) | Transmission monitoring method and device | |
Kim et al. | Protection switching methods for point‐to‐multipoint connections in packet transport networks | |
Ramadža et al. | Network performance monitoring within MPLS traffic engineering enabled networks | |
CN118075195B (en) | Data center network fault rerouting method and device, electronic equipment and medium | |
CN119629036A (en) | Fault positioning method, device, equipment, system and storage medium | |
Delfino et al. | Proactive Fault-Recovery on Distributed Software-Defined Network Controllers | |
CN118400318A (en) | Route recovery method based on service quality and self-adaptive flow rule aggregation | |
WO2024199024A1 (en) | Link detection method and related apparatus | |
CN119676106A (en) | Transmission quality detection method, device, equipment, system and storage medium |