A cloud network data packet tracking method and related equipment
By using collaborative tracking identifiers in cloud networks to track virtual network paths and physical network paths in data packets, the problem of end-to-end packet loss positioning in the prior art is solved, and faster and more efficient packet loss positioning is achieved.
Patent Information
- Application Number
- CN202411535600.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-10-31
AI Technical Summary
Existing cloud network technology is less efficient when diagnosing end-to-end packet loss problems, because the tracking process of virtual network paths and physical network paths is relatively independent, resulting in a large inspection scope and large positioning overhead.
By adding a collaborative tracking identifier (DSCP_VP) to the data packet, virtual network devices and physical network devices can coordinately track target data packets, count their sending and receiving records, and report them to the tracking system, thereby achieving simultaneous tracking and positioning of virtual network paths and physical network paths.
This method improves the location efficiency of network packet loss, can quickly locate packet loss paths and packet loss locations, and reduces the troubleshooting scope and positioning overhead.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The disclosed embodiments relate to the field of cloud network technology, and more particularly to a cloud network data packet tracing method and related equipment. Background Art
[0002] In a public cloud environment, tenants' private networks are built on a virtual network plane. Data transmission in a virtual network generally uses packet encapsulation technology to encapsulate tenants' data packets and then transmit them on a physical network plane. Therefore, when a tenant has a network packet loss problem, the packet loss may be in a virtual network device or in a physical network device or link between virtual network devices.
[0003] Since the virtual network plane and the physical network plane are two independent network planes, the existing public cloud technology has established independent packet tracking systems for virtual network paths and physical network paths. The virtual network is a network used directly by tenants, and tracking the virtual network path is generally done by marking tenant packets. In the physical network, tenant information is not perceived and processed, and tracking the physical network path is generally done by constructing and injecting point-to-point detection packets. Therefore, the existing technical solution is used to perform end-to-end packet loss location analysis. The two tracking processes are relatively independent, and the scope of investigation is relatively large, so its location overhead is large and the efficiency is low. Summary of the invention
[0004] The disclosed embodiments provide a cloud network data packet tracing method and related devices, which can improve the efficiency of locating network packet loss.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for tracing data packets in a cloud network, comprising:
[0006] Sending a first tracking task to a starting virtual network device on a transmission path, wherein the first tracking task is used to instruct to collaboratively track a target data packet based on the virtual network device and the physical network device;
[0007] The target data packet is received by the starting virtual network device, a collaborative tracking identifier is added to the target data packet, and then the target data packet carrying the collaborative tracking identifier is forwarded via the intermediate virtual network device and the physical network device on the transmission path; wherein the collaborative tracking identifier is used to instruct the virtual network device and the physical network device on the transmission path to count and report the sending and receiving records of the target data packet;
[0008] receiving a first sending and receiving record about the collaborative tracking identifier reported by each virtual network device on the transmission path, and receiving a second sending and receiving record about the collaborative tracking identifier reported by each physical network device on the transmission path;
[0009] Packet loss determination and location are performed based on the first receiving and sending records reported by each virtual network device and the second receiving and sending records reported by each physical network device.
[0010] In a second aspect, an embodiment of the present disclosure provides a data packet tracing device for a cloud network, comprising:
[0011] A sending unit, configured to send a first tracking task to a starting virtual network device on a transmission path, wherein the first tracking task is used to instruct to track a target data packet based on the collaboration between the virtual network device and the physical network device;
[0012] A marking unit, used to receive a target data packet through the starting virtual network device, add a collaborative tracking identifier to the target data packet, and then forward the target data packet carrying the collaborative tracking identifier through the intermediate virtual network devices and physical network devices on the transmission path; wherein the collaborative tracking identifier is used to instruct the virtual network devices and physical network devices on the transmission path to count and report the sending and receiving records of the target data packet;
[0013] a receiving unit, configured to receive a first sending and receiving record about the collaborative tracking identifier reported by each virtual network device on the transmission path, and to receive a second sending and receiving record about the collaborative tracking identifier reported by each physical network device on the transmission path;
[0014] The tracking unit is used to determine and locate packet loss based on the first receiving and sending records reported by each virtual network device and the second receiving and sending records reported by each physical network device.
[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0016] The memory stores computer-executable instructions;
[0017] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the data packet tracing method for the cloud network as described in the first aspect and various possible designs of the first aspect.
[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the cloud network data packet tracking method described in the first aspect and various possible designs of the first aspect is implemented.
[0019] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the cloud network data packet tracing method as described in the first aspect and various possible designs of the first aspect.
[0020] The cloud network data packet tracking method and related equipment provided in this embodiment include: sending a first tracking task to the starting virtual network device on the transmission path, the first tracking task is used to indicate the collaborative tracking of the target data packet based on the virtual network device and the physical network device; receiving the target data packet through the starting virtual network device and adding a collaborative tracking identifier in the target data packet, and then forwarding the target data packet carrying the collaborative tracking identifier through the intermediate virtual network devices and physical network devices on the transmission path; wherein the collaborative tracking identifier is used to indicate that the virtual network devices and physical network devices on the transmission path count and report the sending and receiving records of the target data packet; receiving the first sending and receiving record about the collaborative tracking identifier reported by each virtual network device on the transmission path, and receiving the second sending and receiving record about the collaborative tracking identifier reported by each physical network device on the transmission path; and determining and locating packet loss according to the first sending and receiving record reported by each virtual network device and the second sending and receiving record reported by each physical network device. In this technical solution, a collaborative tracking identifier that can be recognized by both virtual network devices and physical network devices is added to the data packet. When the target data packet carrying the collaborative tracking identifier is forwarded via the virtual network devices and physical network devices on the transmission path, the sending and receiving records of the target data packet can be counted and reported. Then, packet loss can be determined and located based on the first sending and receiving records reported by each virtual network device and the second sending and receiving records reported by each physical network device. This achieves simultaneous tracking of the virtual network path and the physical network path passed by the tenant data packet, and can quickly locate the packet loss path and location when packet loss occurs in the physical network. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 A schematic diagram of an application scenario of a data packet tracing method for a cloud network provided by an embodiment of the present disclosure;
[0023] Figure 2 The process of the data packet tracing method of the cloud network provided by the embodiment of the present disclosure Figure 1 ;
[0024] Figure 3 Schematic diagram of a cloud network data packet tracing method provided by an embodiment of the present disclosure Figure 1 ;
[0025] Figure 4The process of the data packet tracing method of the cloud network provided by the embodiment of the present disclosure Figure 2 ;
[0026] Figure 5 Schematic diagram of a cloud network data packet tracing method provided by an embodiment of the present disclosure Figure 2 ;
[0027] Figure 6 The process of the data packet tracing method of the cloud network provided by the embodiment of the present disclosure Figure 3 ;
[0028] Figure 7 Schematic diagram of a cloud network data packet tracing method provided by an embodiment of the present disclosure Figure 3 ;
[0029] Figure 8 A schematic diagram of the structure of a data packet tracing device for a cloud network provided by an embodiment of the present disclosure;
[0030] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0032] In a public cloud environment, tenants' private networks are built on a virtual network plane. Data transmission in a virtual network generally uses packet encapsulation technology to encapsulate tenants' data packets and then transmit them on a physical network plane. Therefore, when a tenant has a network packet loss problem, the packet loss may be in a virtual network device or in a physical network device or link between virtual network devices.
[0033] Since the virtual network plane and the physical network plane are two independent network planes, existing public cloud technologies have established independent packet tracking systems for virtual network paths and physical network paths. Virtual networks are networks used directly by tenants, and virtual network paths are generally tracked by marking tenant packets. In physical networks, tenant information is not perceived or processed, and physical network paths are generally tracked by constructing and injecting point-to-point detection packets.
[0034] The existing technologies have the following problems when diagnosing physical network paths:
[0035] 1. It is impossible to track the physical network path of the actual tenant data packets while tracking the virtual network path. When a tenant has a network packet loss problem, it is necessary to mark the tenant data packets and construct and inject point-to-point detection data packets, which leads to low efficiency in determining network packet loss problems through the above tracking method.
[0036] 2. Two virtual network devices often pass through multiple levels of switches, and there are multiple physical links to each level of switches. Therefore, there are a large number of physical paths between the two nodes, the investigation range is large, and the positioning efficiency is low.
[0037] 3. When reproducing and verifying the problem, there is no guarantee that the constructed detection data packet can be replayed on the original packet loss path.
[0038] In view of the technical problems in the prior art, the inventors have the following technical ideas: using the DSCP (Differentiated Services Code Point) in the packet header to distinguish and track traffic according to the tracking method and purpose, and using different DSCP values to mark the packets. These DSCP values are respectively recorded as DSCP_V, DSCP_P and DSCP_VP, and their use and processing methods are as follows:
[0039] DSCP_VP (also known as collaborative tracking identifier): It is marked by the virtual network device, and the marking object is the tenant's data packet. It is used to track the virtual network path and physical network path that the tenant's data packet passes through at the same time. Both the virtual network device and the physical network device should identify this DSCP value and report the sending and receiving records of the data packet.
[0040] DSCP_V (also known as virtual network tracking identifier): It is marked by the virtual network device. The marking object is the tenant's data packet and is only used for virtual network path tracking. The virtual network device should identify this DSCP value and report the sending and receiving records of the data packet. The physical network device should ignore this DSCP value and do not change it when forwarding the data packet.
[0041] DSCP_P (also known as physical network tracking identifier): marked by the physical network detection system, the marking object is the constructed physical node detection data packet, used for physical network path tracking. Virtual network devices should discard data packets marked with this DSCP value. Physical network devices should identify this DSCP value and report the sending and receiving records of data packets.
[0042] First, in the packet loss determination and positioning scenario, the virtual network path and the physical network path through which the tenant data packet passes can be tracked simultaneously through the first tracking information to achieve packet loss determination and positioning. Accordingly, the specific steps may include: first, sending a first tracking task to the starting virtual network device on the transmission path, the first tracking task is used to indicate the collaborative tracking of the target data packet based on the virtual network device and the physical network device; receiving the target data packet through the starting virtual network device and adding a collaborative tracking identifier to the target data packet, and then forwarding the target data packet carrying the collaborative tracking identifier through the intermediate virtual network device and the physical network device on the transmission path; wherein the collaborative tracking identifier is used to indicate that the virtual network device and the physical network device on the transmission path count the sending and receiving records of the target data packet and report it. Then, receiving the first sending and receiving record about the collaborative tracking identifier reported by each virtual network device on the transmission path, and receiving the second sending and receiving record about the collaborative tracking identifier reported by each physical network device on the transmission path. Finally, packet loss determination and positioning are performed according to the first sending and receiving record reported by each virtual network device and the second sending and receiving record reported by each physical network device.
[0043] In this technical solution, a collaborative tracking identifier that can be recognized by both virtual network devices and physical network devices is added to the data packet. When the target data packet carrying the collaborative tracking identifier is forwarded via the virtual network devices and physical network devices on the transmission path, the sending and receiving records of the target data packet can be counted and reported. Then, packet loss can be determined and located based on the first sending and receiving records reported by each virtual network device and the second sending and receiving records reported by each physical network device. This achieves simultaneous tracking of the virtual network path and the physical network path passed by the tenant data packet, and can quickly locate the packet loss path and location when packet loss occurs in the physical network.
[0044] The application scenarios of the embodiments of the present disclosure are explained below:
[0045] The cloud network data packet tracing method provided by the embodiments of the present disclosure can be applied in various cloud network maintenance scenarios. Figure 1 A schematic diagram of an application scenario of a cloud network data packet tracing method provided by an embodiment of the present disclosure. Figure 1 As shown, the display terminal 101 transmits the tracking task request to the server 102 via the wireless network. The server 102 receives the tracking task request and performs packet loss determination and location through the cloud network data packet tracking method provided by the embodiment of the present disclosure. The server 102 returns the located packet loss position to the display terminal 101 for display.
[0046] Figure 2 The data packet tracing method process of the cloud network provided by the embodiment of the present disclosure Figure 1In the embodiment of the present disclosure, the execution subject of the data packet tracing method may be an electronic device for performing abnormal analysis, and the electronic device may be a terminal or a server. Figure 2 As shown, the data packet tracing method of the cloud network may include:
[0047] S201. Send a first tracking task to a starting virtual network device on a transmission path, where the first tracking task is used to instruct to collaboratively track a target data packet based on the virtual network device and the physical network device.
[0048] In the disclosed embodiment, when a user service is abnormal, a transmission path of a data packet transmitting the service is determined, and a first tracking task is sent to a starting virtual network device on the transmission path to implement packet loss determination and location.
[0049] S202. Receive the target data packet through the starting virtual network device and add a collaborative tracking identifier to the target data packet, and then forward the target data packet carrying the collaborative tracking identifier through the intermediate virtual network devices and physical network devices on the transmission path; wherein the collaborative tracking identifier is used to instruct the virtual network devices and physical network devices on the transmission path to count and report the sending and receiving records of the target data packet.
[0050] In the disclosed embodiment, the collaborative tracking identifier can be any information that can mark a data packet and is recognized by both the virtual network device and the physical network device on the transmission path. For example, the collaborative tracking identifier can be a DSCP value. Both the virtual network device and the physical network device on the transmission path should recognize this DSCP value and report the sending and receiving records of the data packet. In this embodiment, the collaborative tracking identifier can be expressed as DSCP_VP.
[0051] To ensure that both the virtual network device and the physical network device recognize this DSCP value, you can add the value of DSCP_VP to the DSCP configuration of the virtual network device and the physical network device. For example, the DSCP value corresponding to DSCP_VP is 10. At this time, you can add the value of DSCP_VP 10 to the DSCP configuration of the virtual network device and the DSCP configuration of the physical network device. The virtual network device and the physical network device can count the sending and receiving records of the target data packets marked with the value of DSCP_VP 10 and report them.
[0052] The collaborative tracking identifier can be marked by a virtual network device, and the marking object is the tenant's data packet.
[0053] Alternatively, if Figure 3As shown, the data packet can be marked by the first virtual network device (virtual network device 1) that the data packet passes through. All virtual network devices and physical network devices in the end-to-end path count the sending and receiving records of the marked data packets and report them to the respective tracking systems of the virtual network and the physical network to generate virtual network data packet records and physical network data packet records.
[0054] S203: Receive a first receiving and sending record about the collaborative tracking identifier reported by each virtual network device on the transmission path, and receive a second receiving and sending record about the collaborative tracking identifier reported by each physical network device on the transmission path.
[0055] In the disclosed embodiment, the first sending and receiving record about the first tracking information reported by the virtual network device may include: the destination address of the next-hop virtual network device corresponding to the virtual network device, the number of first data packets sent, and the number of first data packets received.
[0056] The second sending and receiving record about the first tracking information reported by the physical network device may include: the destination address of the next-hop physical network device corresponding to the material network device, the number of first data packets sent, and the number of first data packets received.
[0057] S204: Determine and locate packet loss according to the first receiving and sending records reported by each virtual network device and the second receiving and sending records reported by each physical network device.
[0058] In some embodiments, this step may include the following steps (1) to (3):
[0059] (1) Packet loss is determined and located based on the first receiving and sending records reported by each virtual network device.
[0060] Optionally, the first transceiver record includes the number of data packets. Accordingly, this step is: based on the first transceiver record reported by each virtual network device, restore the virtual network path and count the number of data packets at each position therein; if the number of data packets received by any virtual network device in the virtual network path is less than the number of data packets sent by the previous hop virtual network device, it is determined that packet loss has occurred and the packet loss position is located on the physical network path between the two virtual network devices.
[0061] For example, Figure 3As shown, packet loss determination and location based on the first transceiver record reported by each virtual network device may include: determining the next-hop virtual network device of the virtual network device based on the destination address in the first transceiver record reported by the virtual network device; if the first number of first data packets sent in the first transceiver record reported by the virtual network device is greater than the second number of first data packets received in the first transceiver record reported by the next-hop virtual network device, then determining that packet loss has occurred and locating the packet loss location on the physical network path between the two virtual network devices. The two virtual network devices include a sending virtual network device and a receiving virtual network device.
[0062] For example, Figure 3 As shown, the number of packets received by virtual network device N+1 is less than the number of packets sent by virtual network device N, and packet loss occurs in the physical network between the two devices. At this time, it is determined that packet loss occurs and the packet loss position is located on the physical network path between virtual network device N and virtual network device N+1.
[0063] (2) After locating that packet loss occurs on a physical network path between two virtual network devices, restore the physical network path and obtain the second transceiver record reported by each physical network device on the physical network path based on the five-tuple information in the first transceiver record reported by each virtual network device.
[0064] Optionally, the five-tuple information of the data packet is used to identify the above-mentioned physical network packet loss path. The five-tuple information of the data packet includes: source address, destination address, source port, destination port and transmission protocol.
[0065] Exemplarily, the first transceiver record includes a data packet record. Accordingly, this step is: after locating that the packet loss occurs on the physical network path between two virtual network devices, query the physical network data packet tracking system according to the five-tuple information in the first transceiver record reported by each virtual network device, match the physical network device with the same five-tuple information, restore the physical network path according to the matched physical network device, and obtain the second transceiver record reported by each physical network device on the physical network path.
[0066] (3) Locate the packet loss based on the second sending and receiving records reported by each physical network device on the physical network path.
[0067] Optionally, the specific packet loss location can be located according to the number of packets of the physical network devices at each position in the root physical network path. Accordingly, this step may include: if the number of packets received by any physical network device in the physical network path is less than the number of packets sent by the previous hop physical network device, then the physical network device where packet loss occurs is located.
[0068] For example, Figure 3As shown, the number of packets sent by physical network device i is less than the number of packets received, and packet loss occurs at physical network device i. At this time, the packet loss location is located at this physical network device i.
[0069] The disclosed embodiment provides a method for tracing data packets in a cloud network: first, a first tracing task is sent to a starting virtual network device on a transmission path, and the first tracing task is used to indicate the collaborative tracing of a target data packet based on a virtual network device and a physical network device; the target data packet is received by the starting virtual network device and a collaborative tracing identifier is added to the target data packet, and then the target data packet carrying the collaborative tracing identifier is forwarded via the intermediate virtual network devices and the physical network devices on the transmission path; wherein the collaborative tracing identifier is used to indicate that the virtual network devices and the physical network devices on the transmission path count and report the sending and receiving records of the target data packet. Then, the first sending and receiving record about the collaborative tracing identifier reported by each virtual network device on the transmission path is received, and the second sending and receiving record about the collaborative tracing identifier reported by each physical network device on the transmission path is received. Finally, packet loss determination and location are performed based on the first sending and receiving record reported by each virtual network device and the second sending and receiving record reported by each physical network device. In this technical solution, a collaborative tracking identifier that can be recognized by both virtual network devices and physical network devices is added to the data packet. When the target data packet carrying the collaborative tracking identifier is forwarded via the virtual network devices and physical network devices on the transmission path, the sending and receiving records of the target data packet can be counted and reported. Then, packet loss can be determined and located based on the first sending and receiving records reported by each virtual network device and the second sending and receiving records reported by each physical network device. This achieves simultaneous tracking of the virtual network path and the physical network path passed by the tenant data packet, and can quickly locate the packet loss path and location when packet loss occurs in the physical network.
[0070] It should be noted that if the packet loss location is a virtual network device, it will cause unnecessary packet tracking overhead to the physical network device. In the embodiment of the present disclosure, the virtual network path can be tracked first without tracking the physical network path at the same time, so as to avoid unnecessary packet tracking overhead to the physical network device before eliminating the packet loss of the virtual network device itself. Figure 4 As shown, before sending the first tracing task to the starting virtual network device on the transmission path, the method further includes:
[0071] S401: Send a second tracing task to a starting virtual network device on a transmission path, where the second tracing task is used to indicate tracing a target data packet based only on the virtual network device.
[0072] In the disclosed embodiment, when a user service is abnormal, a transmission path of a data packet transmitting the service is determined, and a second tracking task is sent to a starting virtual network device on the transmission path to implement packet loss determination and location.
[0073] S402, receiving a target data packet through an initial virtual network device and adding a virtual network tracking identifier to the target data packet, and then forwarding the target data packet carrying the virtual network tracking identifier through an intermediate virtual network device on a transmission path.
[0074] In the disclosed embodiment, the second tracking information may be any information that can mark the data packet and is recognized by the virtual network device on the transmission path. The virtual network device on the transmission path should recognize this DSCP value and report the sending and receiving records of the data packet. The physical network device should ignore this DSCP value and not change this DSCP when forwarding the data packet.
[0075] For example, the second tracking information may be a DSCP value. In this embodiment, the second tracking information may be expressed as DSCP_V. In order to ensure that the virtual network device recognizes this DSCP value, the value of DSCP_P may be added to the DSCP configuration of the virtual network device. For example, the DSCP value corresponding to DSCP_P is 20. In this case, the value of DSCP_V 20 may be added to the DSCP configuration of the virtual network device. The virtual network device may count the sending and receiving records of the target data packets marked with the value of DSCP_V 20 and report them.
[0076] The second tracking information is marked by the virtual network device, and the marked object is the data packet of the tenant.
[0077] Alternatively, if Figure 5 As shown, the data packet can be marked by the first virtual network device through which the data packet passes. All virtual network devices in the end-to-end path count the sending and receiving records of the marked data packet and report them to the tracking system of the virtual network.
[0078] S403: Receive third sending and receiving records about the virtual network tracking identifier reported by each virtual network device on the transmission path.
[0079] S404, determining and locating packet loss based on the third receiving and sending records of all received virtual network tracking identifiers, and triggering the step of sending a first tracking task to the starting virtual network device on the transmission path when it is located that the packet loss occurs on the physical network between two virtual network devices.
[0080] Optionally, packet loss is determined and located based on the third sending and receiving records of all received virtual network tracking identifiers, including: restoring the virtual network path and counting the number of data packets at each position therein based on the third sending and receiving records of all received virtual network tracking identifiers; if the number of data packets received by any virtual network device in the virtual network path is less than the number of data packets sent by the previous-hop virtual network device, it is determined that packet loss has occurred and the packet loss position is located on the physical network between the two virtual network devices.
[0081] For example, Figure 5 As shown, the number of packets received by virtual network device N+1 is less than the number of packets sent by virtual network device N, and packet loss occurs in the physical network between the two devices.
[0082] In the disclosed embodiment, since the virtual network path is tracked first without tracking the physical network path at the same time, it is possible to eliminate the packet loss of the virtual network device itself, thereby avoiding unnecessary data packet tracking overhead for the physical network device.
[0083] It should be noted that since it is impossible to actively control the sending behavior of tenant data packets, in order to reproduce the packet loss behavior for further observation and verify the network connectivity after repair, it is necessary to construct a detection data packet for replay. Figure 6 As shown, the method for constructing a detection data packet for replay may include:
[0084] S601. Construct a detection data packet according to the lost target data packet, and add a physical network tracking identifier in the detection data packet, where the physical network tracking identifier indicates that data packet tracking is performed only based on physical network devices.
[0085] In the embodiment of the present disclosure, a detection data packet may be constructed according to the five-tuple information of the lost target data packet, wherein the five-tuple information of the detection data packet is the same as the five-tuple information of the lost target data packet.
[0086] The physical network tracking identifier can be any information that can mark the data packet and is recognized by the physical network device on the transmission path. The virtual network device should discard the data packet marked with this DSCP value. The physical network device should recognize this DSCP value and report the sending and receiving records of the data packet. For example, the physical network tracking identifier can be a DSCP value. In this embodiment, the physical network tracking identifier can be expressed as DSCP_P.
[0087] Optionally, the physical network tracking identifier is marked by the physical network detection system, and the marking object is the constructed physical node detection data packet, which is used for physical network path tracking. In order to ensure that all physical network devices recognize this DSCP value, the value of DSCP_P can be added to the DSCP configuration of the physical network device. For example, the DSCP value corresponding to DSCP_P is 30. At this time, the DSCP_P value 30 can be added to the DSCP configuration of the physical network device. At this time, the physical network device can count the sending and receiving records of the target data packet marked with the DSCP_P value 30 and report it.
[0088] S602: replay the detection data packet carrying the physical network tracking identifier on the faulty physical network path where packet loss occurs, and receive a fourth sending and receiving record of the physical network tracking identifier reported by each physical network device on the faulty physical network path.
[0089] S603: Determine and locate packet loss according to the fourth sending and receiving records reported by each physical network device.
[0090] Optionally, this step may include: if the number of received detection data packets in the fourth receiving and sending record of a physical network device is greater than the number of sent detection data packets, the packet loss position is located at this physical network device.
[0091] For example, Figure 7 As shown, the number of detection data packets sent by physical network device i is less than the number of detection data packets received, and packet loss occurs in physical network device i.
[0092] In the disclosed embodiment, since the packet loss behavior is reproduced by constructing a detection data packet for replay, the network connectivity can be observed and verified after repair, thereby improving the accuracy of the data packet tracing method.
[0093] Figure 8 A schematic diagram of the structure of a data packet tracking device for a cloud network provided by an embodiment of the present disclosure, such as Figure 8 As shown, the data packet tracking device of the cloud network includes:
[0094] A sending unit 801 is used to send a first tracking task to a starting virtual network device on a transmission path, wherein the first tracking task is used to instruct to track a target data packet based on the virtual network device and the physical network device in a collaborative manner;
[0095] The marking unit 802 is used to receive the target data packet through the starting virtual network device and add a cooperative tracking identifier to the target data packet, and then forward the target data packet carrying the cooperative tracking identifier through the intermediate virtual network devices and physical network devices on the transmission path; wherein the cooperative tracking identifier is used to instruct the virtual network devices and physical network devices on the transmission path to count and report the sending and receiving records of the target data packet;
[0096] The receiving unit 803 is configured to receive a first sending and receiving record about the collaborative tracking identifier reported by each virtual network device on the transmission path, and to receive a second sending and receiving record about the collaborative tracking identifier reported by each physical network device on the transmission path;
[0097] The tracking unit 804 is used to determine and locate packet loss according to the first sending and receiving records reported by each virtual network device and the second sending and receiving records reported by each physical network device.
[0098] According to one or more embodiments of the present disclosure, before sending a first tracking task to a starting virtual network device on a transmission path, the apparatus further includes: a condition judgment unit, the condition judgment unit being used to send a second tracking task to the starting virtual network device on the transmission path, the second tracking task being used to indicate that a target data packet is tracked based only on the virtual network device; receiving a target data packet through the starting virtual network device and adding a virtual network tracking identifier to the target data packet, and then forwarding the target data packet carrying the virtual network tracking identifier through an intermediate virtual network device on the transmission path; receiving a third sending and receiving record about the virtual network tracking identifier reported by each of the virtual network devices on the transmission path; performing packet loss determination and positioning based on the third sending and receiving records of all received virtual network tracking identifiers, and triggering the step of sending the first tracking task to the starting virtual network device on the transmission path when it is located that the packet loss occurs on the physical network path between two virtual network devices.
[0099] According to one or more embodiments of the present disclosure, the condition judgment unit performs packet loss judgment and location based on the third sending and receiving records of all received virtual network tracking identifiers, including: restoring the virtual network path and counting the number of data packets at each position therein based on the third sending and receiving records of all received virtual network tracking identifiers; if the number of data packets received by any virtual network device in the virtual network path is less than the number of data packets sent by the previous-hop virtual network device, it is determined that packet loss has occurred and the packet loss position is located on the physical network path between the two virtual network devices.
[0100] According to one or more embodiments of the present disclosure, the tracking unit 804 determines and locates packet loss based on the first transceiver record reported by each virtual network device and the second transceiver record reported by each physical network device, including: determining and locating packet loss based on the first transceiver record reported by each virtual network device; upon locating that the packet loss occurs on the physical network path between two virtual network devices, restoring the physical network path and obtaining the second transceiver record reported by each physical network device on the physical network path based on the five-tuple information in the first transceiver record reported by each virtual network device; and locating the packet loss based on the second transceiver record reported by each physical network device on the physical network path.
[0101] According to one or more embodiments of the present disclosure, the tracking unit 804 determines and locates packet loss based on the first sending and receiving records reported by each virtual network device, including: restoring the virtual network path and counting the number of data packets at each position therein based on the first sending and receiving records reported by each virtual network device; if the number of data packets received by any virtual network device in the virtual network path is less than the number of data packets sent by the previous-hop virtual network device, it is determined that packet loss has occurred and the packet loss position is located on the physical network path between the two virtual network devices.
[0102] According to one or more embodiments of the present disclosure, the tracking unit 804 performs packet loss location based on the second sending and receiving records reported by each physical network device on the physical network path, including: if the number of data packets received by any physical network device in the physical network path is less than the number of data packets sent by the previous-hop physical network device, then locating the packet loss occurrence of the physical network device.
[0103] According to one or more embodiments of the present disclosure, the device also includes: a detection unit; the detection unit is used to construct a detection data packet based on the lost target data packet, and add a physical network tracking identifier in the detection data packet, wherein the physical network tracking identifier indicates that data packet tracking is performed only based on physical network devices; based on the detection data packet carrying the physical network tracking identifier, replay is performed on the faulty physical network path where packet loss occurs, and fourth sending and receiving records about the physical network tracking identifier reported by each physical network device on the faulty physical network path are received; packet loss is determined and located based on the fourth sending and receiving records reported by each physical network device.
[0104] According to one or more embodiments of the present disclosure, the detection unit determines and locates packet loss based on the fourth transceiver record reported by each physical network device, including: if the number of received detection data packets in the fourth transceiver record of a physical network device is greater than the number of sent detection data packets, then the packet loss position is located as this physical network device.
[0105] refer to Fig. 9 , which shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure, and the electronic device 900 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0106] like Fig. 9 As shown, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 to a random access memory (RAM) 903. Various programs and data required for the operation of the electronic device 900 are also stored in the RAM 903. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0107] Typically, the following devices may be connected to the I / O interface 905: input devices 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0108] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0109] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0110] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0111] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0112] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0114] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0115] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0116] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0117] In a first aspect, according to one or more embodiments of the present disclosure, a method for tracing data packets in a cloud network is provided, comprising:
[0118] Sending a first tracking task to a starting virtual network device on a transmission path, wherein the first tracking task is used to instruct to collaboratively track a target data packet based on the virtual network device and the physical network device;
[0119] The target data packet is received by the starting virtual network device, a collaborative tracking identifier is added to the target data packet, and then the target data packet carrying the collaborative tracking identifier is forwarded via the intermediate virtual network device and the physical network device on the transmission path; wherein the collaborative tracking identifier is used to instruct the virtual network device and the physical network device on the transmission path to count and report the sending and receiving records of the target data packet;
[0120] receiving a first sending and receiving record about the collaborative tracking identifier reported by each virtual network device on the transmission path, and receiving a second sending and receiving record about the collaborative tracking identifier reported by each physical network device on the transmission path;
[0121] Packet loss determination and location are performed based on the first receiving and sending records reported by each virtual network device and the second receiving and sending records reported by each physical network device.
[0122] According to one or more embodiments of the present disclosure, before sending a first tracking task to a starting virtual network device on a transmission path, the method further includes: sending a second tracking task to the starting virtual network device on the transmission path, the second tracking task being used to indicate that a target data packet is tracked based only on the virtual network device; receiving a target data packet through the starting virtual network device and adding a virtual network tracking identifier to the target data packet, and then forwarding the target data packet carrying the virtual network tracking identifier through an intermediate virtual network device on the transmission path; receiving a third sending and receiving record about the virtual network tracking identifier reported by each virtual network device on the transmission path; performing packet loss determination and location based on the third sending and receiving records of all received virtual network tracking identifiers, and triggering the step of sending the first tracking task to the starting virtual network device on the transmission path when it is located that the packet loss occurs on the physical network path between two virtual network devices.
[0123] According to one or more embodiments of the present disclosure, packet loss is determined and located based on the third sending and receiving records of all received virtual network tracking identifiers, including: restoring the virtual network path and counting the number of data packets at each position therein based on the third sending and receiving records of all received virtual network tracking identifiers; if the number of data packets received by any virtual network device in the virtual network path is less than the number of data packets sent by the previous-hop virtual network device, it is determined that packet loss has occurred and the packet loss position is located on the physical network path between the two virtual network devices.
[0124] According to one or more embodiments of the present disclosure, the packet loss determination and location based on the first transceiver record reported by each virtual network device and the second transceiver record reported by each physical network device includes: determining and locating packet loss based on the first transceiver record reported by each virtual network device; upon locating that the packet loss occurs on the physical network path between two virtual network devices, restoring the physical network path and obtaining the second transceiver record reported by each physical network device on the physical network path based on the five-tuple information in the first transceiver record reported by each virtual network device; and locating the packet loss based on the second transceiver record reported by each physical network device on the physical network path.
[0125] According to one or more embodiments of the present disclosure, packet loss determination and location based on the first sending and receiving records reported by each virtual network device include: restoring the virtual network path and counting the number of data packets at each position therein based on the first sending and receiving records reported by each virtual network device; if the number of data packets received by any virtual network device in the virtual network path is less than the number of data packets sent by the previous-hop virtual network device, it is determined that packet loss has occurred and the packet loss position is located on the physical network path between the two virtual network devices.
[0126] According to one or more embodiments of the present disclosure, packet loss location is performed based on the second sending and receiving records reported by each physical network device on the physical network path, including: if the number of data packets received by any physical network device in the physical network path is less than the number of data packets sent by the previous-hop physical network device, then packet loss is located in the physical network device.
[0127] According to one or more embodiments of the present disclosure, the method also includes: constructing a detection data packet based on the lost target data packet, and adding a physical network tracking identifier in the detection data packet, wherein the physical network tracking identifier indicates that data packet tracking is performed only based on physical network devices; based on the detection data packet carrying the physical network tracking identifier, replaying it on the faulty physical network path where packet loss occurs, and receiving the fourth sending and receiving record about the physical network tracking identifier reported by each physical network device on the faulty physical network path; and determining and locating packet loss based on the fourth sending and receiving record reported by each physical network device.
[0128] According to one or more embodiments of the present disclosure, packet loss determination and location are performed based on the fourth transceiver record reported by each physical network device, including: if the number of received probe data packets in the fourth transceiver record of a physical network device is greater than the number of sent probe data packets, then the packet loss position is located as this physical network device.
[0129] In a second aspect, according to one or more embodiments of the present disclosure, a data packet tracing device for a cloud network is provided, comprising:
[0130] A sending unit, configured to send a first tracking task to a starting virtual network device on a transmission path, wherein the first tracking task is used to instruct to track a target data packet based on the collaboration between the virtual network device and the physical network device;
[0131] A marking unit, used to receive a target data packet through the starting virtual network device, add a collaborative tracking identifier to the target data packet, and then forward the target data packet carrying the collaborative tracking identifier through the intermediate virtual network devices and physical network devices on the transmission path; wherein the collaborative tracking identifier is used to instruct the virtual network devices and physical network devices on the transmission path to count and report the sending and receiving records of the target data packet;
[0132] a receiving unit, configured to receive a first sending and receiving record about the collaborative tracking identifier reported by each virtual network device on the transmission path, and to receive a second sending and receiving record about the collaborative tracking identifier reported by each physical network device on the transmission path;
[0133] The tracking unit is used to determine and locate packet loss based on the first receiving and sending records reported by each virtual network device and the second receiving and sending records reported by each physical network device.
[0134] According to one or more embodiments of the present disclosure, before sending a first tracking task to a starting virtual network device on a transmission path, the apparatus further includes: a condition judgment unit, the condition judgment unit being used to send a second tracking task to the starting virtual network device on the transmission path, the second tracking task being used to indicate tracking of a target data packet based only on the virtual network; receiving a target data packet through the starting virtual network device and adding a virtual network tracking identifier to the target data packet, and then forwarding the target data packet carrying the virtual network tracking identifier through an intermediate virtual network device on the transmission path; receiving a third sending and receiving record about the virtual network tracking identifier reported by each of the virtual network devices on the transmission path; performing packet loss determination and location based on the third sending and receiving records of all received virtual network tracking identifiers, and triggering the step of sending the first tracking task to the starting virtual network device on the transmission path when it is located that the packet loss occurs on the physical network path between two virtual network devices.
[0135] According to one or more embodiments of the present disclosure, the condition judgment unit performs packet loss judgment and location based on the third sending and receiving records of all received virtual network tracking identifiers, including: restoring the virtual network path and counting the number of data packets at each position therein based on the third sending and receiving records of all received virtual network tracking identifiers; if the number of data packets received by any virtual network device in the virtual network path is less than the number of data packets sent by the previous-hop virtual network device, it is determined that packet loss has occurred and the packet loss position is located on the physical network path between the two virtual network devices.
[0136] According to one or more embodiments of the present disclosure, the tracking unit determines and locates packet loss based on the first sending and receiving records reported by each virtual network device and the second sending and receiving records reported by each physical network device, including: determining and locating packet loss based on the first sending and receiving records reported by each virtual network device; upon locating that the packet loss occurs on the physical network path between two virtual network devices, restoring the physical network path and obtaining the second sending and receiving records reported by each physical network device on the physical network path based on the five-tuple information in the first sending and receiving records reported by each virtual network device; and locating the packet loss based on the second sending and receiving records reported by each physical network device on the physical network path.
[0137] According to one or more embodiments of the present disclosure, the tracking unit determines and locates packet loss based on the first sending and receiving records reported by each virtual network device, including: restoring the virtual network path and counting the number of data packets at each position therein based on the first sending and receiving records reported by each virtual network device; if the number of data packets received by any virtual network device in the virtual network path is less than the number of data packets sent by the previous-hop virtual network device, it is determined that packet loss has occurred and the packet loss position is located on the physical network path between the two virtual network devices.
[0138] According to one or more embodiments of the present disclosure, the tracking unit locates packet loss based on the second sending and receiving records reported by each physical network device on the physical network path, including: if the number of data packets received by any physical network device in the physical network path is less than the number of data packets sent by the previous-hop physical network device, then locating the packet loss occurrence of the physical network device.
[0139] According to one or more embodiments of the present disclosure, the device also includes: a detection unit; the detection unit is used to construct a detection data packet based on the lost target data packet, and add a physical network tracking identifier in the detection data packet, wherein the physical network tracking identifier indicates that data packet tracking is performed only based on physical network devices; based on the detection data packet carrying the physical network tracking identifier, replay is performed on the faulty physical network path where packet loss occurs, and fourth sending and receiving records about the physical network tracking identifier reported by each physical network device on the faulty physical network path are received; packet loss is determined and located based on the fourth sending and receiving records reported by each physical network device.
[0140] According to one or more embodiments of the present disclosure, the detection unit determines and locates packet loss based on the fourth transceiver record reported by each physical network device, including: if the number of received detection data packets in the fourth transceiver record of a physical network device is greater than the number of sent detection data packets, then the packet loss position is located as this physical network device.
[0141] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0142] The memory stores computer-executable instructions;
[0143] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the data packet tracing method for the cloud network as described in the first aspect and various possible designs of the first aspect.
[0144] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the cloud network data packet tracking method described in the first aspect and various possible designs of the first aspect is implemented.
[0145] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the cloud network data packet tracing method as described in the first aspect and various possible designs of the first aspect.
[0146] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0147] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0148] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for tracing data packets in a cloud network, characterized in that: include: Sending a first tracking task to a starting virtual network device on a transmission path, wherein the first tracking task is used to instruct to collaboratively track a target data packet based on the virtual network device and the physical network device; The target data packet is received by the starting virtual network device, a collaborative tracking identifier is added to the target data packet, and then the target data packet carrying the collaborative tracking identifier is forwarded via the intermediate virtual network device and the physical network device on the transmission path; wherein the collaborative tracking identifier is used to instruct the virtual network device and the physical network device on the transmission path to count and report the sending and receiving records of the target data packet; receiving a first sending and receiving record about the collaborative tracking identifier reported by each virtual network device on the transmission path, and receiving a second sending and receiving record about the collaborative tracking identifier reported by each physical network device on the transmission path; Packet loss is determined and located based on the first sending and receiving records reported by each virtual network device; when it is located that the packet loss occurs on the physical network path between two virtual network devices, the physical network path is restored and the second sending and receiving records reported by each physical network device on the physical network path are obtained based on the five-tuple information in the first sending and receiving records reported by each virtual network device; packet loss is located based on the second sending and receiving records reported by each physical network device on the physical network path.
2. The data packet tracing method according to claim 1, characterized in that: Before sending the first tracing task to the starting virtual network device on the transmission path, the method further includes: Sending a second tracing task to a starting virtual network device on the transmission path, wherein the second tracing task is used to indicate tracing of a target data packet based only on the virtual network device; Receive a target data packet through the starting virtual network device and add a virtual network tracking identifier to the target data packet, and then forward the target data packet carrying the virtual network tracking identifier through an intermediate virtual network device on the transmission path; receiving a third sending and receiving record about the virtual network tracking identifier reported by each virtual network device on the transmission path; Packet loss is determined and located based on the third receiving and sending records of all received virtual network tracking identifiers. When it is located that the packet loss occurs on the physical network path between two virtual network devices, the step of sending the first tracking task to the starting virtual network device on the transmission path is triggered.
3. The data packet tracing method according to claim 2, characterized in that: The packet loss determination and location according to the third receiving and sending records of all received virtual network tracking identifiers includes: According to the received third sending and receiving records of all virtual network tracking identifiers, the virtual network path is restored and the number of data packets at each position therein is counted; If the number of data packets received by any virtual network device in the virtual network path is less than the number of data packets sent by the previous hop virtual network device, it is determined that packet loss occurs and the packet loss position is located on the physical network path between the two virtual network devices.
4. The data packet tracing method according to claim 1, characterized in that: The packet loss determination and location according to the first receiving and sending records reported by each virtual network device includes: According to the first sending and receiving records reported by each virtual network device, the virtual network path is restored and the number of data packets at each position therein is counted; If the number of data packets received by any virtual network device in the virtual network path is less than the number of data packets sent by the previous hop virtual network device, it is determined that packet loss occurs and the packet loss position is located on the physical network path between the two virtual network devices.
5. The data packet tracing method according to claim 1, characterized in that: The performing packet loss location according to the second sending and receiving records reported by each physical network device on the physical network path includes: If the number of data packets received by any physical network device in the physical network path is less than the number of data packets sent by the previous-hop physical network device, packet loss occurs in the physical network device being located.
6. The data packet tracing method according to any one of claims 1 to 5, characterized in that: The method further comprises: Constructing a detection data packet according to the lost target data packet, and adding a physical network tracking identifier to the detection data packet, wherein the physical network tracking identifier indicates that data packet tracking is performed only based on a physical network device; Based on the detection data packet carrying the physical network tracking identifier, replay is performed on the faulty physical network path where packet loss occurs, and a fourth sending and receiving record about the physical network tracking identifier reported by each physical network device on the faulty physical network path is received; Packet loss is determined and located based on the fourth sending and receiving records reported by each physical network device.
7. The data packet tracing method according to claim 6, characterized in that: The determining and locating packet loss according to the fourth sending and receiving records reported by each physical network device includes: If the number of received detection data packets in the fourth receiving and sending record of a physical network device is greater than the number of sent detection data packets, the packet loss position is located at this physical network device.
8. A data packet tracking device for a cloud network, characterized in that: include: A sending unit, configured to send a first tracking task to a starting virtual network device on a transmission path, wherein the first tracking task is used to instruct to track a target data packet based on the collaboration between the virtual network device and the physical network device; A marking unit, used to receive a target data packet through the starting virtual network device, add a collaborative tracking identifier to the target data packet, and then forward the target data packet carrying the collaborative tracking identifier through the intermediate virtual network devices and physical network devices on the transmission path; wherein the collaborative tracking identifier is used to instruct the virtual network devices and physical network devices on the transmission path to count and report the sending and receiving records of the target data packet; a receiving unit, configured to receive a first sending and receiving record about the collaborative tracking identifier reported by each virtual network device on the transmission path, and to receive a second sending and receiving record about the collaborative tracking identifier reported by each physical network device on the transmission path; A tracking unit is used to determine and locate packet loss based on the first sending and receiving records reported by each virtual network device; when it is located that the packet loss occurs on the physical network path between two virtual network devices, restore the physical network path and obtain the second sending and receiving records reported by each physical network device on the physical network path based on the five-tuple information in the first sending and receiving records reported by each virtual network device; and locate the packet loss based on the second sending and receiving records reported by each physical network device on the physical network path.
9. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the data packet tracing method for the cloud network as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the cloud network data packet tracing method as described in any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data packet tracing method of the cloud network as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Multi-link data transmission method and apparatus
CN105656747A
Unified monitoring method and system for physical machine and virtual machine and electronic device
CN112383502A