Virtual network path detection method and apparatus, and device
By using a server to map virtual network configuration information into physical network information for path detection, the high cost and low versatility of existing technologies are solved, achieving efficient and accurate virtual network path detection.
Patent Information
- Application Number
- PCT/CN2025/101670
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-02
- Filing Date
- 2025-06-18
- Publication Date
- 2026-02-05
AI Technical Summary
Existing technologies have high adaptation costs and processing overhead in virtual network path detection, and lack versatility and scalability. They cannot simulate actual paths in complex network architectures, and cannot complete large-scale path detection under latency constraints.
The server obtains the target detection request from the client, performs mapping and transformation using the network configuration information of the virtual network to obtain the physical network information, performs path detection, and finally maps the result back to the virtual network to achieve virtual network path detection.
It reduces the adaptation cost and processing overhead of virtual network path detection, improves versatility and scalability, and can accurately simulate application traffic paths in complex network architectures to meet latency requirements.
Smart Images

Figure CN2025101670_05022026_PF_FP_ABST
Abstract
Description
Virtual network path detection methods, devices and equipment
[0001] This disclosure claims priority to Chinese Patent Application No. 202411063623.3, filed with the China Patent Office on August 2, 2024, entitled “Virtual Network Path Detection Method, Apparatus and Device”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This disclosure relates to the field of computer technology, and in particular to a method, apparatus and device for detecting virtual network paths. Background Technology
[0003] With the continuous development of internet technology, cloud computing technologies such as server virtualization have been widely used in data centers. Examples include various virtual networks based on physical networks. During the construction of data centers, factors such as network architecture, network topology, network routing, and path quality have a significant impact on overall network quality and performance. Therefore, path detection for virtual networks is becoming increasingly important.
[0004] When probing virtual networks, the relevant technologies usually rely on specific virtual network protocols to encapsulate probe data packets. Each network node needs to identify and respond to the data packet to achieve path probing. This path probing method requires all network nodes, including virtual network nodes and physical network nodes, to adapt to the probe data packet. The adaptation cost is high, the processing overhead is large, and the universality and scalability of this virtual network path probing method are not high. Summary of the Invention
[0005] This disclosure provides a method, apparatus, and device for detecting virtual network paths, which can reduce the adaptation cost and processing overhead of virtual network path detection, and has high versatility and scalability.
[0006] In a first aspect, embodiments of this disclosure provide a virtual network path detection method, applied to a server, the method comprising:
[0007] Obtain a target detection request sent by the client, wherein the target detection request includes virtual network information corresponding to the target virtual network;
[0008] The virtual network information is mapped and transformed according to the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information;
[0009] Based on the physical network information, path detection is performed on the target physical network corresponding to the target virtual network to obtain the physical network detection result corresponding to the target physical network.
[0010] The physical network detection results are mapped and transformed according to the network configuration information of the target virtual network to obtain the target detection results corresponding to the target virtual network, and the target detection results are returned to the client.
[0011] In one possible implementation, the network configuration information includes physical network device information and network environment configuration information; the method further includes:
[0012] Obtain the physical network device information of the target virtual network, wherein the physical network device information includes the Internet Protocol (IP) address and / or the Media Access Control (MAC) address of the physical network device;
[0013] Parse the target configuration file corresponding to the target virtual network to obtain the network environment configuration information corresponding to the target virtual network. The network environment configuration information includes at least one of the following: the target interaction method between the server and the client, the mapping and conversion method between the target virtual network and the target physical network, and the path detection method of the target physical network.
[0014] In one possible implementation, obtaining the target probe request sent by the client includes:
[0015] Based on the target interaction method between the server and the client, a communication channel with the client is opened;
[0016] The target detection request sent by the client is obtained based on the communication channel.
[0017] In one possible implementation, the step of mapping and converting the virtual network information according to the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information includes:
[0018] The virtual IP address information in the virtual network information is mapped and converted to obtain the physical IP address information corresponding to the virtual IP address information;
[0019] The virtual port information in the virtual network information is mapped and converted to obtain the physical port information corresponding to the virtual port information.
[0020] In one possible implementation, the step of mapping and converting the virtual IP address information in the virtual network information to obtain the physical IP address information corresponding to the virtual IP address information includes:
[0021] Based on the target configuration file corresponding to the target virtual network, determine the network management environment corresponding to the target virtual network;
[0022] When the network management environment is an Open Virtual Switch (OVS) dynamic flow table management environment, the physical IP address information corresponding to the virtual IP address information is determined according to the dynamic flow table corresponding to the OVS dynamic flow table management environment; the dynamic flow table is generated by the client assembling invalid data packets and triggering the distribution based on the invalid data packets;
[0023] When the network management environment is an OVS static flow table management environment, the physical IP address information corresponding to the virtual IP address information is determined by interacting with the network component corresponding to the OVS static flow table management environment.
[0024] When the network management environment is not an OVS management environment, the physical IP address information corresponding to the virtual IP address information is determined by interacting with the server local IP address management plugin or the container distributed key-value storage system.
[0025] In one possible implementation, the mapping and conversion of the virtual port information in the virtual network information to obtain the physical port information corresponding to the virtual port information includes:
[0026] Determine the physical destination port information corresponding to the virtual port information;
[0027] Based on the data packet encapsulation device type, determine the physical source port information corresponding to the virtual port information.
[0028] In one possible implementation, the packet encapsulation device type includes a kernel type; determining the physical source port information corresponding to the virtual port information based on the packet encapsulation device type includes:
[0029] If the target socket cache corresponding to the kernel type includes a preset hash value, then the physical source port information corresponding to the virtual port information is determined based on the preset hash value.
[0030] If the target socket cache does not contain the preset hash value and the IP data packet is a fragmented packet, then the source IP address and destination IP address of the IP data packet are hashed to obtain the physical source port information corresponding to the virtual port information;
[0031] If the target socket cache does not contain the preset hash value and the IP packet is a non-fragmented packet, then the source port and destination port of the IP packet are hashed to obtain the physical source port information corresponding to the virtual port information.
[0032] In one possible implementation, the step of performing path probing on the target physical network corresponding to the target virtual network based on the physical network information to obtain the physical network probing result corresponding to the target physical network includes:
[0033] Based on the mapping and conversion method between the target virtual network and the target physical network in the network configuration information, the target physical network corresponding to the target virtual network is determined;
[0034] When the path detection method in the network configuration information is static path detection, the network topology and static computing configuration corresponding to the target physical network are determined according to the network configuration information, and the physical network detection result corresponding to the physical network information is calculated according to the network topology and static computing configuration.
[0035] When the path probing method in the network configuration information is dynamic path probing, a target probe packet is constructed based on the physical network information and sent to the target physical network. The physical network probing result is calculated based on the return packet corresponding to the target probe packet.
[0036] In one possible implementation, the target virtual network includes a virtual overlay network based on a physical underlay network.
[0037] Secondly, embodiments of this disclosure provide a virtual network path detection method, applied to a client, the method comprising:
[0038] Obtain a target detection request and send the target detection request to the server. The target detection request includes virtual network information corresponding to the target virtual network.
[0039] The server returns the target detection result corresponding to the target virtual network. The target detection result is obtained by the server mapping and converting the physical network detection result according to the network configuration information. The physical network detection result is obtained by the server performing path detection on the target physical network corresponding to the target virtual network according to the physical network information corresponding to the virtual network information. The physical network information is obtained by the server mapping and converting the virtual network information based on the network configuration information of the target virtual network.
[0040] In one possible implementation, the method further includes:
[0041] Parse the target configuration file corresponding to the target virtual network to obtain the network management environment corresponding to the target virtual network;
[0042] When the network management environment is an Open Virtual Switch (OVS) dynamic flow table management environment, invalid data packets are assembled according to the virtual network information, and the dynamic flow table corresponding to the invalid data packets is sent to the server.
[0043] Thirdly, embodiments of this disclosure provide a virtual network path detection device, comprising:
[0044] The acquisition module is used to acquire target detection requests sent by the client, wherein the target detection requests include virtual network information corresponding to the target virtual network;
[0045] The first mapping module is used to map and transform the virtual network information according to the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information.
[0046] The detection module is used to perform path detection on the target physical network corresponding to the target virtual network based on the physical network information, and obtain the physical network detection result corresponding to the target physical network.
[0047] The second mapping module is used to map and transform the physical network detection results according to the network configuration information of the target virtual network, obtain the target detection results corresponding to the target virtual network, and return the target detection results to the client.
[0048] In one possible implementation, the network configuration information includes physical network device information and network environment configuration information; the device is further configured to:
[0049] Obtain the physical network device information of the target virtual network, wherein the physical network device information includes the Internet Protocol (IP) address and / or the Media Access Control (MAC) address of the physical network device;
[0050] Parse the target configuration file corresponding to the target virtual network to obtain the network environment configuration information corresponding to the target virtual network. The network environment configuration information includes at least one of the following: the target interaction method between the server and the client, the mapping and conversion method between the target virtual network and the target physical network, and the path detection method of the target physical network.
[0051] In one possible implementation, the acquisition module is specifically used for:
[0052] Based on the target interaction method between the server and the client, a communication channel with the client is opened;
[0053] The target detection request sent by the client is obtained based on the communication channel.
[0054] In one possible implementation, the first mapping module is specifically used for:
[0055] The virtual IP address information in the virtual network information is mapped and converted to obtain the physical IP address information corresponding to the virtual IP address information;
[0056] The virtual port information in the virtual network information is mapped and converted to obtain the physical port information corresponding to the virtual port information.
[0057] In one possible implementation, the first mapping module is specifically used for:
[0058] Based on the target configuration file corresponding to the target virtual network, determine the network management environment corresponding to the target virtual network;
[0059] When the network management environment is an Open Virtual Switch (OVS) dynamic flow table management environment, the physical IP address information corresponding to the virtual IP address information is determined according to the dynamic flow table corresponding to the OVS dynamic flow table management environment; the dynamic flow table is generated by the client assembling invalid data packets and triggering the distribution based on the invalid data packets;
[0060] When the network management environment is an OVS static flow table management environment, the physical IP address information corresponding to the virtual IP address information is determined by interacting with the network component corresponding to the OVS static flow table management environment.
[0061] When the network management environment is not an OVS management environment, the physical IP address information corresponding to the virtual IP address information is determined by interacting with the server local IP address management plugin or the container distributed key-value storage system.
[0062] In one possible implementation, the first mapping module is specifically used for:
[0063] Determine the physical destination port information corresponding to the virtual port information;
[0064] Based on the data packet encapsulation device type, determine the physical source port information corresponding to the virtual port information.
[0065] In one possible implementation, the packet encapsulation device type includes a kernel type; the first mapping module is specifically used for:
[0066] If the target socket cache corresponding to the kernel type includes a preset hash value, then the physical source port information corresponding to the virtual port information is determined based on the preset hash value.
[0067] If the target socket cache does not contain the preset hash value and the IP data packet is a fragmented packet, then the source IP address and destination IP address of the IP data packet are hashed to obtain the physical source port information corresponding to the virtual port information;
[0068] If the target socket cache does not contain the preset hash value and the IP packet is a non-fragmented packet, then the source port and destination port of the IP packet are hashed to obtain the physical source port information corresponding to the virtual port information.
[0069] In one possible implementation, the detection module is specifically used for:
[0070] Based on the mapping and conversion method between the target virtual network and the target physical network in the network configuration information, the target physical network corresponding to the target virtual network is determined;
[0071] When the path detection method in the network configuration information is static path detection, the network topology and static computing configuration corresponding to the target physical network are determined according to the network configuration information, and the physical network detection result corresponding to the physical network information is calculated according to the network topology and static computing configuration.
[0072] When the path probing method in the network configuration information is dynamic path probing, a target probe packet is constructed based on the physical network information and sent to the target physical network. The physical network probing result is calculated based on the return packet corresponding to the target probe packet.
[0073] In one possible implementation, the target virtual network includes a virtual overlay network based on a physical underlay network.
[0074] Fourthly, embodiments of this disclosure provide a virtual network path detection device, comprising:
[0075] The first acquisition module is used to acquire a target detection request and send the target detection request to the server. The target detection request includes virtual network information corresponding to the target virtual network.
[0076] The second acquisition module is used to acquire the target detection result corresponding to the target virtual network returned by the server; the target detection result is obtained by the server mapping and converting the physical network detection result according to the network configuration information; the physical network detection result is obtained by the server performing path detection on the target physical network corresponding to the target virtual network according to the physical network information corresponding to the virtual network information; the physical network information is obtained by the server mapping and converting the virtual network information based on the network configuration information of the target virtual network.
[0077] In one possible implementation, the device is further used for:
[0078] Parse the target configuration file corresponding to the target virtual network to obtain the network management environment corresponding to the target virtual network;
[0079] When the network management environment is an Open Virtual Switch (OVS) dynamic flow table management environment, invalid data packets are assembled according to the virtual network information, and the dynamic flow table corresponding to the invalid data packets is sent to the server.
[0080] Fifthly, embodiments of this disclosure provide a virtual network path detection system, the system comprising a server and a client; wherein,
[0081] The client is used to obtain a target detection request and send the target detection request to the server. The target detection request includes virtual network information corresponding to the target virtual network.
[0082] The server is used to obtain the target detection request sent by the client, and to map and convert the virtual network information according to the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information;
[0083] The server is also used to perform path detection on the target physical network corresponding to the target virtual network based on the physical network information, and obtain the physical network detection result corresponding to the target physical network.
[0084] The server is also configured to map and convert the physical network detection results according to the network configuration information of the target virtual network to obtain the target detection results corresponding to the target virtual network, and return the target detection results to the client.
[0085] The client is also used to obtain the target detection results returned by the server.
[0086] Sixthly, embodiments of this disclosure provide an electronic device, including: a memory and a processor;
[0087] The memory stores computer-executed instructions;
[0088] The processor executes computer execution instructions stored in the memory, causing the processor to execute the virtual network path detection method described in either the first or second aspect.
[0089] In a seventh aspect, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the virtual network path detection method described in either the first or second aspect.
[0090] Eighthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the virtual network path detection method described in either the first or second aspect.
[0091] In this embodiment, the server receives a target probe request sent by the client, the target probe request including virtual network information corresponding to the target virtual network; maps and transforms the virtual network information according to the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information; performs path probing on the target physical network corresponding to the target virtual network according to the physical network information to obtain the physical network probing result corresponding to the target physical network; maps and transforms the physical network probing result according to the network configuration information of the target virtual network to obtain the target probe result corresponding to the target virtual network, and returns the target probe result to the client. In this disclosure, after receiving the target probe request sent by the client, the server maps and transforms the virtual network information in the target path probing request according to the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information, then performs path probing on the target physical network corresponding to the target virtual network according to the physical network information to obtain the physical network probing result, and then maps and transforms the physical network probing result to obtain the target probe result corresponding to the target virtual network. In this way, the server can use the physical network capabilities to perform path detection on the target virtual network by mapping and converting between virtual network information and physical network information. This eliminates the need for all network nodes to be adapted, reducing the adaptation cost and processing overhead of virtual network path detection. Furthermore, the mapping and conversion of network information and the path detection are decoupled, resulting in higher versatility and scalability. Attached Figure Description
[0092] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:
[0093] Figure 1 is a schematic diagram of a VXLAN message in related technologies;
[0094] Figure 2 is a schematic diagram of a VXLAN-GPE header format in related technologies;
[0095] Figure 3 is a schematic diagram of an application scenario provided by an exemplary embodiment of this disclosure;
[0096] Figure 4 is a flowchart illustrating a virtual network path detection method provided by an exemplary embodiment of this disclosure;
[0097] Figure 5 is a flowchart illustrating another virtual network path detection method provided by an exemplary embodiment of this disclosure;
[0098] Figure 6 is a flowchart illustrating another virtual network path detection method provided by an exemplary embodiment of this disclosure;
[0099] Figure 7 is an interactive schematic diagram of virtual network path probing provided by an exemplary embodiment of this disclosure;
[0100] Figure 8 is a schematic diagram of the technical link of virtual network path detection provided by an exemplary embodiment of this disclosure;
[0101] Figure 9 is a schematic diagram of the structure of a virtual network path detection device provided in an exemplary embodiment of this disclosure;
[0102] Figure 10 is a schematic diagram of the structure of a virtual network path detection device provided in an exemplary embodiment of the present disclosure;
[0103] Figure 11 is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present disclosure. Detailed Implementation
[0104] To make the objectives, technical solutions, and advantages of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure. The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0105] The following explains some of the technical terms used in this disclosure:
[0106] 1. Overlay network
[0107] Overlay networks use existing physical (underlay) networks as a foundation, building upon them as logical networks to virtualize network resources. Essentially, an overlay network is a virtual network built on an existing physical network, possessing independent control and forwarding planes. For terminal devices (e.g., servers) connected to the overlay, the physical network is transparent, thus separating the bearer network from the actual processing network. Various overlay technologies exist, such as Virtual eXtensible Local Area Network (VXLAN), Network Virtualization using Generic Routing Encapsulation (NVGRE), and Stateless Transport Tunneling (STT), among which VXLAN is the most widely used overlay technology.
[0108] The VXLAN protocol defines an 8-byte VXLAN header, with 24 bits used to identify different Layer 2 networks. This allows for the identification of over 16 million different Layer 2 networks, offering greater flexibility. While typical transport layer port numbers are used to identify processes or applications, in VXLAN, Ethernet frames are encapsulated in User Datagram Protocol (UDP). The UDP source port is used for load balancing in Equal-cost multi-path routing (ECMP) or Link Aggregation Control Protocol (LACP); the destination port is used to identify the VXLAN data. VXLAN data is encapsulated and decapsulated through VXLAN Tunnel Endpoints (VTEPs), and the outer IP address of the VXLAN data is the IP address of the VTEP. The outermost Media Access Control (MAC) address is used to enable data transfer between VTEPs.
[0109] For example, Figure 1 is a schematic diagram of a VXLAN packet in the related art. As shown in Figure 1, the VXLAN packet has a 50-byte (or 54-byte) encapsulated packet header, including a 14-byte (or 18-byte) external Ethernet frame header (corresponding to the MAC address of the physical machine where the virtual machine is located), a 20-byte external IP header (corresponding to the IP address of the physical machine where the virtual machine is located), an 8-byte external UDP header, and an 8-byte VXLAN header. In addition, the VXLAN packet also includes the original Layer 2 frame portion and a checksum portion.
[0110] 2. VXLAN Universal Protocol Encapsulation
[0111] VXLAN Generic Protocol Extension (VXLAN-GPE) refers to an extension of VXLAN that allows for the encapsulation of data packets at any layer. Furthermore, VXLAN-GPE provides support for Operations Administration and Management (OAM) protocols. The VXLAN-GPE extension modifies some reserved bits in the VXLAN header. For example, Figure 2 illustrates a VXLAN-GPE header format from related technologies. As shown in Figure 2, VXLAN-GPE encapsulation uses some reserved bits specified in the original RFC 7348 (the VXLAN specification document), specifically as follows:
[0112] Version (Version): Indicates the VXLAN GPE protocol version. The initial value is 0.
[0113] Encapsulation Protocol Field (Next Protocol Bit, P bit): If the P bit is 1, the network next protocol field is valid.
[0114] BUM (BUN Traffic Bit, B bit): If the B bit is 1, it indicates that the encapsulated message inside the VXLAN is a broadcast traffic, unknown-unicast traffic, or multicast traffic (BUM) message.
[0115] OAM Flag Bit (O bit): If the O bit is 1, it indicates that the encapsulated message inside the VXLAN is an OAM message.
[0116] Next Protocol: 8 bits. Indicates the protocol format of the encapsulated messages within VXLAN.
[0117] In addition, the VXLAN-GPE header format in Figure 2 also includes the VXLAN Network Identifier (VNI) and some reserved fields.
[0118] With the continuous development of technologies such as the Internet and cloud computing, server virtualization, as one of the core technologies of cloud computing, has been widely used in various data centers. Meanwhile, cloud-native technologies can maximize the decoupling of non-application code in cloud applications, featuring lightweight, agile, and highly automated characteristics. This enables enterprises to iterate their functions faster and improves the system's ability to withstand various levels of traffic surges. Based on this, more and more technology stacks are being deployed on container orchestration platforms or engines (Kubernetes, K8s), such as for large-scale computing applications (training and inference of large models, etc.).
[0119] As cloud infrastructure continues to grow, the rapid increase in the number of virtual machines / containers and their migration have become routine tasks. Based on this, more flexible virtual networking technologies are being used more widely, such as overlay networking. Overlay networks encapsulate data packets within Internet Protocol (IP) packets, presenting only the encapsulated network parameters to the network. This reduces the MAC address requirements of large Layer 2 networks, lowering network specification limitations. IP packets are transmitted through the network via routing, and virtual machine / container migration is not restricted by the network architecture. Furthermore, network capabilities existing in the physical underlay network need to be flexibly ported to the overlay network, i.e., implemented in different ways to reduce the adaptation costs for upper-layer applications.
[0120] In the construction of data centers, network architecture plays a decisive role in the overall physical network quality. End-to-end network topology, routing, and path quality information can be used to optimize the network performance of upper-layer applications and to detect and locate faults during network operation and maintenance. Therefore, network capabilities such as network topology discovery, route tracing, and path detection in overlay networks in large-scale virtualization scenarios of data centers become increasingly important in large-scale cloud application scenarios (including large model training and inference).
[0121] When probing virtual networks, related technologies are typically based on specific virtual network technology protocols such as VXLAN-GPE, with certain extensions and optimizations. Probe packets are constructed using VXLAN-GPE, and the identification, forwarding, and processing of these packets are implemented at each network node. However, these virtual path probing methods require all network nodes (including virtual and physical network nodes) to support the packet encapsulation and response rules for probe packets, resulting in high adaptation costs and poor scalability. Furthermore, processing probe packets at non-end-side network nodes (such as routers and Layer 3 switches) increases processing overhead and affects their forwarding capabilities. Additionally, these path probing methods cannot guarantee that the encapsulated 5-tuple information (IP address pair, port pair, and transport protocol) of the outer packet matches the actual packet's 5-tuple information, thus failing to fully simulate the actual path of application traffic in complex network architectures, such as dual-transmit and dual-receive NIC bonding and the actual network devices routed to. Moreover, the high cost of virtual network path probing means that if the upper-layer application has latency constraints, it cannot complete a certain scale of virtual network path probing within a specific timeframe.
[0122] To address the aforementioned issues, the inventors of this disclosure, based on the nature of virtual networks, discovered that after encapsulation, virtual networks inherently rely on the underlying physical network. Therefore, in a virtualized scenario, the essence of a virtual network path is still a physical network path. Taking a virtual overlay as an example, after encapsulation, the virtual overlay inherently depends on the underlying physical network (Underlay). In other words, in a virtualized scenario, the essence of an overlay network path is still an Underlay physical network path. Based on this concept, this disclosure proposes a virtual network path detection method, apparatus, and device. After receiving a target detection request from a client, the server maps and transforms the virtual network information in the target path detection request based on the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information. Then, based on the physical network information, path detection is performed on the target physical network to obtain the physical network detection result. Finally, the physical network detection result is mapped and transformed to obtain the target detection result corresponding to the target virtual network, and the target detection result is returned to the client. In this way, the server in this disclosure can realize path detection of the target virtual network by mapping and converting between virtual network information and physical network information, without the need for all network nodes to be adapted. This reduces the adaptation cost and processing overhead of virtual network path detection, and has higher versatility and scalability.
[0123] Figure 3 is a schematic diagram of an application scenario provided by an exemplary embodiment of this disclosure. As shown in Figure 3, in related technologies, when probing virtual networks, probe data packets are typically encapsulated based on virtual network protocols such as VXLAN-GPE. Each network node adapts to and responds to the probe data packets to achieve virtual network path probing. This virtual network path probing method has high adaptation costs and processing overhead, and its versatility and scalability are not strong.
[0124] In this embodiment, the server receives a target probing request sent by the client. Then, based on the network configuration information of the target virtual network to be probed, it maps and transforms the virtual network information in the target probing request to obtain the physical network information corresponding to the virtual network information. Next, based on this physical network information, it performs path probing on the target physical network corresponding to the target virtual network to obtain the physical network probing result. Finally, it maps and transforms this physical network probing result to obtain the target probing result of the target virtual network. In this way, the server completes path probing of the target virtual network by mapping and converting virtual network information to physical network information and utilizing physical network capabilities. This reduces the adaptation cost and processing overhead of network nodes, resulting in higher versatility and scalability.
[0125] The technical solutions disclosed herein will be described in detail below through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other, and the same or similar content will not be described again in different embodiments.
[0126] Figure 4 is a flowchart illustrating a virtual network path detection method provided by an exemplary embodiment of this disclosure. Referring to Figure 4, the virtual network path detection method may include:
[0127] S401. Obtain the target probe request sent by the client. The target probe request includes the virtual network information corresponding to the target virtual network.
[0128] The execution subject of this disclosure can be a server or a virtual network path detection device installed on the server. The virtual network path detection device can be implemented in software or a combination of software and hardware. For ease of understanding, the following description uses a server as the execution subject. The server can refer to a host or a host machine, etc. Of course, this virtual network path detection method can also be implemented based on a specific process in the server, such as a daemon process, etc., and this disclosure does not limit this approach.
[0129] In this embodiment, the client can refer to a client communicating with the server, or it can refer to a client process running in a virtual machine (VM) or container. This client can act as a generator for virtual network path probing. The target probing request can be a request to initiate path probing of a target virtual network, where the target virtual network is the virtual network to be probing, such as an overlay virtual network based on an underlay physical network. Virtual network information can refer to network parameters or request parameters included in the target probing request. For example, the virtual network information can include the virtual network's five-tuple information, namely, source IP address, destination IP address, source port, destination port, and the transport layer protocol used for path probing.
[0130] In this step, when the client needs to perform path probing on the target virtual network, it can obtain the user's request parameters and generate a target probing request based on these parameters. This target probing request includes the virtual network information corresponding to the target virtual network. The client can then send this target probing request to the server, which can retrieve it and subsequently execute the following virtual network path probing process based on the target probing request.
[0131] S402. Based on the network configuration information of the target virtual network, the virtual network information is mapped and transformed to obtain the physical network information corresponding to the virtual network information.
[0132] In this embodiment, network configuration information can refer to the configuration information of the physical network devices and network environment of the target virtual network. This includes physical network device information and overall network environment configuration information of the target virtual network. Physical network device information can refer to the device information of network devices included in the physical network of the target virtual network, such as the type, IP address, and MAC address of the physical network devices. Network environment configuration information can refer to various environment or parameter configuration information in the target virtual network, such as the target interaction method between the server and the client, the mapping and conversion method between the virtual network and the physical network, and the path detection method for the physical network. Of course, this network configuration information can also include other types of information, which can be obtained based on actual needs, and this embodiment does not limit this.
[0133] Physical network information can refer to network information at the physical network layer that corresponds to virtual network information. Corresponding to virtual network information, physical network information can refer to the five-tuple information of the target probe request in the physical network, which can also include source IP address, destination IP address, source port, destination port, and the transport layer protocol used for path probing.
[0134] In this step, the server can obtain the network configuration information of the target virtual network. This network configuration information can be obtained by the server directly identifying and reading the network environment of the target virtual network, and / or by parsing the target configuration file (i.e., the network configuration file) of the target virtual network. This embodiment of the disclosure does not limit the timing or method of obtaining the network configuration information. After receiving the target probe request sent by the client, the server can map and convert the virtual network information in the target probe request based on the mapping and conversion methods in the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information. Thus, by mapping virtual network information to physical network information on the host side, this disclosure allows for the subsequent conversion of virtual network path probing in a virtualized scenario into physical network path probing, exhibiting good versatility and scalability.
[0135] S403. Based on the physical network information, perform path detection on the target physical network corresponding to the target virtual network to obtain the physical network detection results corresponding to the target physical network.
[0136] S404. Based on the network configuration information of the target virtual network, the physical network detection results are mapped and transformed to obtain the target detection results corresponding to the target virtual network, and the target detection results are returned to the client.
[0137] In this embodiment of the disclosure, the physical network detection result can refer to the path information and other detection results obtained after path detection of the target physical network. The target physical network can refer to the physical network corresponding to the target virtual network. The target detection result can refer to the path information and other detection results corresponding to the target virtual network.
[0138] Specifically, after mapping the virtual network information in the target probing request to physical network information, the server can perform path probing on the target physical network corresponding to the target virtual network based on this physical network information, obtaining the physical network probing result. Then, the server can map and convert the physical network probing result according to the network configuration information to obtain the target probing result corresponding to the target virtual network, and return the target probing result to the client. The server's specific path probing method can be static path probing or dynamic path probing, etc., which can be flexibly selected based on actual needs. In this embodiment, the server's network information conversion and actual path probing are decoupled. The actual path probing performance depends on the underlying physical network path probing performance. During the specific path probing process, the server can flexibly switch between dynamic and static probing methods, and can use general probing methods or utilize the network capabilities of specific network environments, exhibiting good scalability.
[0139] In this embodiment, the server receives a target probe request sent by the client, the target probe request including virtual network information corresponding to the target virtual network; maps and transforms the virtual network information according to the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information; performs path probing on the target physical network corresponding to the target virtual network according to the physical network information to obtain the physical network probing result corresponding to the target physical network; maps and transforms the physical network probing result according to the network configuration information of the target virtual network to obtain the target probe result corresponding to the target virtual network, and returns the target probe result to the client. In this disclosure, after receiving the target probe request sent by the client, the server maps and transforms the virtual network information in the target path probing request according to the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information, then performs path probing on the target physical network corresponding to the target virtual network according to the physical network information to obtain the physical network probing result, and then maps and transforms the physical network probing result to obtain the target probe result corresponding to the target virtual network. In this way, the server can use the physical network capabilities to perform path detection on the target virtual network by mapping and converting between virtual network information and physical network information. This eliminates the need for all network nodes to be adapted, reducing the adaptation cost and processing overhead of virtual network path detection. Furthermore, the mapping and conversion of network information and the path detection are decoupled, resulting in higher versatility and scalability.
[0140] Based on the above embodiments, Figure 5 is a flowchart illustrating another virtual network path detection method provided by an exemplary embodiment of this disclosure. Referring to Figure 5, this virtual network path detection method may include:
[0141] S501. Obtain the physical network device information of the target virtual network, including the Internet Protocol IP address and / or the Media Access Control MAC address of the physical network device.
[0142] In this embodiment, the network configuration information of the target virtual network may include physical network device information and network environment configuration information. Specifically, the physical network device information may include the IP addresses and / or MAC addresses of the physical network devices in the target virtual network. Specifically, the server can start a daemon process in its initial state to perform initialization processing on the target virtual network, which may specifically refer to the initialization processing of the physical network. The daemon process can run in the background of the server and is mainly responsible for interacting with all client processes corresponding to the server host, receiving target probe requests sent by clients, and returning the final target probe results to the client processes. The server can obtain the physical network device information of the target virtual network through the daemon process, such as the IP addresses and / or MAC addresses of the physical network devices.
[0143] In one possible implementation, the target virtual network includes a virtual overlay network based on the physical (underlay) network.
[0144] In this embodiment, the target virtual network includes, but is not limited to, a virtual overlay network built upon a physical network. The virtual network path detection method in this embodiment can be an overlay network path detection method for large-scale virtualization scenarios, where the server maps and converts overlay network information to underlay network information, utilizing physical network capabilities to complete overlay network path detection. Of course, the target virtual network can also include other types of virtual networks in other scenarios, and this embodiment does not limit this.
[0145] S502. Parse the target configuration file corresponding to the target virtual network to obtain the network environment configuration information corresponding to the target virtual network. The network environment configuration information includes at least one of the following: the target interaction method between the server and the client, the mapping and conversion method between the target virtual network and the target physical network, and the path detection method of the target physical network.
[0146] In this embodiment of the disclosure, the target configuration file may refer to the configuration file corresponding to the target virtual network, which may include various network environment configuration information of the target virtual network. The target interaction method may refer to the communication interaction method between the server and the client, such as the interaction method based on Unix domain sockets and the interaction method based on the virtual machine internal agent (Qemu Guest Agent, QGA), etc.
[0147] The mapping conversion method can refer to the mapping conversion relationship between the target virtual network and the target physical network, as well as the mapping processing algorithm, which can be used to realize the mapping conversion between the target virtual network and the target physical network. Path detection methods can include static path detection and dynamic path detection. It should be noted that the network environment configuration information can also include other types of information, such as the management environment of the target virtual network, the network topology, and the processing algorithm in the path detection process, etc., which are not limited in this embodiment. Specifically, the server's daemon process can parse the target configuration file corresponding to the target virtual network, and then read the network environment configuration information corresponding to the target virtual network from the target configuration file.
[0148] In this embodiment of the disclosure, the server obtains the physical network device information and network environment configuration information of the target virtual network through a daemon process, which can improve the comprehensiveness and accuracy of the network configuration information of the target virtual network and improve the accuracy of subsequent path detection to a certain extent.
[0149] S503. Based on the target interaction method between the server and the client, open a communication channel with the client; obtain the target detection request sent by the client based on the communication channel.
[0150] In this embodiment, the communication channel refers to the communication interaction channel between the server and the client process. After the server obtains the network configuration information of the target virtual network through the daemon process, it can open a communication channel with the client process through the daemon process according to the target interaction method included in the network configuration information. Then, the server can continuously monitor the communication channel process through the daemon process to determine whether any new target probe requests have arrived. In this way, the server can obtain the target probe requests sent by the client process in a timely manner, ensuring the real-time performance and reliability of the interaction between the server and the client.
[0151] Specifically, in this embodiment of the disclosure, the server can open a specific local domain socket, which enables inter-process communication with the host. In this way, the communication interaction between the server's daemon process and the client process does not need to go through the network protocol stack, nor does it need to go through processes such as packet packing and unpacking, calculation and verification, maintenance of sequence numbers and responses, which is more efficient and more versatile.
[0152] For client processes, in cloud-native scenarios, container-level isolation is relatively simple. Client processes can directly mount the server-side domain socket file path to the upper-layer application container, achieving efficient interaction through sockets. In virtual machine (VM) scenarios, the isolation level of VMs is higher than that of cloud-native containers. To enable communication between the host machine and the VM (where client processes are running), the target interaction method can employ specific virtualization technologies. Taking the open-source Linux Kernel-based Virtual Machine (KVM) as an example, the target interaction method can be based on the QGA (Quick Access Controller) agent program within the VM. This allows communication between the VM and the host machine's local domain sockets. QGA is a regular application running inside a virtual machine, enabling interaction between the host machine and the virtual machine. This interaction does not rely on a network but rather on a serial port device (virtio-serial) (the default method) or a bus serial port (isa-serial). The virtualization software (Quick EMUlator, QEMU) provides the simulation of the serial port device and the data exchange channel. Ultimately, it presents a serial port device (inside the virtual machine) and a local domain socket file (on the host machine). QGA interacts with the socket channel on the host machine by reading and writing to the serial port device. The host machine can use ordinary local domain socket read / write methods to read and write to the socket file, ultimately achieving interaction with QGA. Serial port devices typically have low speeds, suitable for small data exchanges, thus ensuring the accuracy of communication between the client process and the server.
[0153] S504. Map and convert the virtual IP address information in the virtual network information to obtain the physical IP address information corresponding to the virtual IP address information.
[0154] In this embodiment, virtual IP address information can refer to IP address information included in virtual network information. Physical IP address information can refer to IP address information in the physical network. Specifically, the server can run a virtual network / physical network converter to map and convert virtual network information in the virtual network to physical network information in the physical network. Specifically, this can refer to mapping and converting network layer IP addresses and transport layer port information. In this step, the server can use the virtual network / physical network converter to map and convert the virtual IP address information in the virtual network information to obtain the physical IP address information corresponding to the virtual IP address information.
[0155] The server can employ different processing methods for IP address mapping in different scenarios. In one possible implementation, IP address mapping can be achieved through the following steps (1) to (4):
[0156] (1) Determine the network management environment corresponding to the target virtual network based on the target configuration file corresponding to the target virtual network.
[0157] In this embodiment, the server can parse the target configuration file corresponding to the target virtual network and determine the network management environment corresponding to the target virtual network from the target configuration file. This network management environment can refer to the actual network management (or control) scenario corresponding to the target virtual network, such as an Open vSwitch (OVS) dynamic flow table management environment, an OVS static flow table management environment, and a non-OVS management environment. The OVS dynamic flow table management environment and the OVS static flow table management environment are applicable to cloud-native or virtual machine virtualization scenarios, while the non-OVS management environment is applicable to cloud-native scenarios. Specifically, the OVS dynamic flow table management environment refers to the virtualized network devices and physical network devices under which OVS acts as the management plane; the OVS static flow table management environment can refer to a non-dynamic management scenario of OVS. A non-OVS management environment refers to a scenario where network management is not performed by OVS. Of course, this network management environment can also include other types of management environments, and there can be other methods for obtaining IP address mapping relationships; this embodiment does not limit this.
[0158] (2) In the case of an open virtual switch (OVS) dynamic flow table management environment, the physical IP address information corresponding to the virtual IP address information is determined according to the dynamic flow table corresponding to the OVS dynamic flow table management environment; the dynamic flow table is generated by the client assembling invalid data packets and triggering the distribution based on the invalid data packets.
[0159] In this embodiment, the dynamic flow table refers to a flow table dynamically generated by a network device (such as OVS) based on network traffic, which can be used to control the forwarding and processing of data packets. Invalid data packets can refer to invalid Transmission Control Protocol (TCP) / UDP data packets generated by the client based on the user's target probe request. In this step, under the OVS dynamic flow table management environment, OVS, as the management plane, takes over the virtualized network devices and physical network devices under its control. Through OVS rules, it automatically issues corresponding forwarding flow table rules based on the first packet when communication is initiated. The flow table is accessible on the server side. Specifically, under the OVS dynamic flow table management environment, the client process generates a target probe request and assembles an invalid TCP / UDP data packet to trigger the issuance of the dynamic flow table. The daemon process in the server can query the dynamic flow table on the server host side to obtain the IP address mapping relationship. This IP address mapping relationship includes the mapping relationship between virtual IP address information and physical IP address information, thereby determining the physical IP address information corresponding to the virtual IP address information in the virtual network information. In this way, the server does not need to interact with the OVS network component; it can obtain the IP address mapping relationship through flow table queries, resulting in greater flexibility.
[0160] (3) When the network management environment is an OVS static flow table management environment, the physical IP address information corresponding to the virtual IP address information is determined by interacting with the network components corresponding to the OVS static flow table management environment.
[0161] In this embodiment, the network component can refer to the OVS network component in the OVS static flow table management environment. In this step, under the OVS static flow table management environment (i.e., the OVS flow table static interaction scenario), since OVS is not dynamically triggered, there is no dynamic flow table triggering or distribution process. The server needs to interact with the OVS network component to obtain the IP address mapping relationship. Specifically, in the OVS static flow table management environment, after receiving a target probe request initiated by the client, the server can interact with the OVS network component through a daemon process to determine the physical IP address information corresponding to the virtual IP address information.
[0162] (4) In the case of a non-OVS network management environment, the physical IP address information corresponding to the virtual IP address information is determined by interacting with the server local IP address management plugin or the container distributed key-value storage system.
[0163] In this embodiment, the local IP address management plugin (IPAM) can refer to an IP address management application deployed locally on the server. The containerized distributed key-value store (Kubernetes etcd) can store the IP address mapping relationship between virtual networks and physical networks. In this step, in a third-party network management environment, i.e., a non-OVS management environment, after receiving a target probe request initiated by the client, the server can interact with the local IPAM plugin via a daemon process or with Kubernetes etcd to obtain the physical IP address information corresponding to the virtual IP address information in the virtual network information.
[0164] In this embodiment of the disclosure, the server determines the network management environment corresponding to the target virtual network by parsing the target configuration file of the target virtual network, and uses different methods to obtain the IP address mapping relationship under different network management environments, so as to realize the conversion of virtual IP address information to physical IP address information, which can improve the flexibility of mapping conversion and has higher versatility and scalability.
[0165] S505. Map and convert the virtual port information in the virtual network information to obtain the physical port information corresponding to the virtual port information.
[0166] In this embodiment of the disclosure, virtual port information can refer to virtual network port information within virtual network information. Physical port information can refer to port information within the physical network. Both virtual port information and physical port information refer to port information at the transport layer. To match the characteristics of actual application traffic and simulate the actual path under a complex network architecture, the server can use a virtual network / physical network converter to map and convert the virtual port information within the virtual network information, thereby determining the corresponding physical port information and achieving the mapping and conversion of transport layer ports.
[0167] In one possible implementation, the port mapping process in step S505 can be implemented as follows:
[0168] Determine the physical destination port information corresponding to the virtual port information; determine the physical source port information corresponding to the virtual port information based on the packet encapsulation device type.
[0169] In this embodiment of the disclosure, the physical destination port information can refer to the target port information in the physical network. The packet encapsulation device type can refer to different data encapsulation device types in different application scenarios, such as kernel type or physical network interface card device type. The physical source port information can refer to the source port information in the physical network.
[0170] Specifically, when mapping and converting port information, the server can determine the physical destination port information in the physical network based on the virtual port information in the virtual network information, and can determine the physical source port information in the physical network based on the packet encapsulation device type and the five-tuple information of the IP packet. Taking VXLAN as an example, in the mapping and conversion process, in addition to mapping and converting IP addresses, the server also needs to fit the encapsulated VXLAN outer transport layer, i.e., UDP port information. In the path probing embodiments of this disclosure, the probe packet constructed during path probing has an outer UDP destination port that can be determined based on the virtual network information in the target probe request, while the outer UDP source port depends on the actual packet processing process, such as being determined based on the packet encapsulation device type. In this way, the server determines the physical port information based on the actual packet processing process, which can simulate the actual traffic path and improve the accuracy of path probing.
[0171] In one possible implementation, when the packet encapsulation device type includes a kernel type, the physical network source port information can be implemented through the following steps (5) to (7):
[0172] (5) If the target socket cache corresponding to the kernel type includes a preset hash value, then the physical source port information corresponding to the virtual port information is determined based on the preset hash value.
[0173] In this embodiment of the disclosure, the kernel can refer to the basic part of the operating system. The target socket buffer (skb) corresponding to the kernel type can refer to the temporary storage area in the kernel when sending and receiving network data. The preset hash value can refer to a pre-set hash calculation value, specifically a four-level hash value (I4_hash) or a software hash value (sw_hash), etc.
[0174] In this step, when the data packet encapsulation device type is kernel-type, meaning the server selects the physical source port information corresponding to the virtual network information through the kernel, it can determine this based on hashing the target socket cache. Since the server may have pre-set a preset hash value in the target socket cache for specific driver types (such as network card drivers), when determining the physical source port information corresponding to the virtual network information based on the kernel, the server can first determine whether a preset hash value has already been set in the target socket cache. If it exists, the server can directly determine the physical source port information corresponding to the virtual port information based on that preset hash value. This eliminates the need for further hash calculations, saving computational resources and reducing processing overhead.
[0175] (6) If the target socket cache does not contain the preset hash value and the IP data packet is a fragmented packet, then the source IP address and destination IP address of the IP data packet are hashed to obtain the physical source port information corresponding to the virtual port information.
[0176] In this embodiment, an IP data packet can refer to an actually encapsulated data packet, specifically an IP data packet corresponding to virtual network information. A fragmented packet can refer to a smaller data packet obtained by fragmenting an IP data packet when it is too large. Specifically, when the target socket buffer does not contain a preset hash value and the IP data packet is a fragmented packet, the server can perform hash processing on the source IP address and destination IP address of the IP data packet to obtain the physical source port information corresponding to the virtual port information. The specific process of hash processing can be as follows: the server can select a first preset hash function, which can be one of the hash algorithms such as MD5, cryptographic hash function (SHA-1, SHA256), etc. Then, the source IP address and destination IP address of the IP data packet can be used as input to the first preset hash function. After the calculation and processing by the first preset hash function, a first hash value can be obtained. The server can use the first hash value as the physical source port information corresponding to the virtual port information. Of course, the server can also use other methods to perform hash processing, and this embodiment does not limit this. Whether an IP packet is a fragmented packet can be determined based on the Fragment Offset field in the IP packet header. If the Fragment Offset field is not zero, then the IP packet is a fragmented packet.
[0177] (7) If the target socket cache does not contain the preset hash value and the IP data packet is a non-fragmented packet, then the source port and destination port of the IP data packet are hashed to obtain the physical source port information corresponding to the virtual port information.
[0178] In this embodiment, a non-fragmented packet can refer to the entire data packet without being fragmented. Specifically, when the target socket buffer does not contain a preset hash value and the IP data packet is a non-fragmented packet, the server can perform hash processing on the source port and destination port of the IP data packet to obtain the physical port information corresponding to the virtual port information. The specific process of hash processing can be as follows: the server can select a second preset hash function, which can be one of the hash algorithms such as MD5, cryptographic hash function (SHA-1, SHA256), etc. Then, the source port and destination port of the IP data packet can be used as input to the second preset hash function. After the second preset hash function calculates and processes the data, a second hash value can be obtained. The server can use this second hash value as the physical source port information corresponding to the virtual port information. Of course, the server can also use other methods to perform hash processing, and this embodiment does not limit this.
[0179] In this embodiment of the disclosure, when the data packet encapsulation device type is kernel type, the server can determine the physical source port information corresponding to the virtual network information based on the actual situation of the target socket cache corresponding to the kernel type. Furthermore, the server can adopt different determination methods depending on whether the target socket cache includes a preset hash value and whether the IP data packet is a fragmented packet. The determination method of physical source port information is more flexible and can simulate actual application traffic scenarios, which can improve the accuracy and effectiveness of subsequent path detection.
[0180] S506. Based on the mapping and conversion method between the target virtual network and the target physical network in the network configuration information, determine the target physical network corresponding to the target virtual network.
[0181] In this embodiment of the disclosure, after determining the physical network information corresponding to the virtual network information of the target virtual network, the server can further determine the target physical network corresponding to the target virtual network. Specifically, the server can determine the target physical network corresponding to the target virtual network based on the mapping and conversion method between the target virtual network and the target physical network in the network configuration information.
[0182] S507. When the path detection method in the network configuration information is static path detection, determine the network topology and static calculation configuration corresponding to the target physical network based on the network configuration information, and calculate the physical network detection result corresponding to the physical network information based on the network topology and static calculation configuration.
[0183] In this embodiment of the disclosure, a physical network path detector may run on the server, which can be used to perform path detection based on the physical network information obtained through mapping and transformation. The path detection method in the network configuration information may include static path detection and dynamic path detection. Static path detection may refer to a path detection method based on static path calculation; dynamic path detection may refer to a path detection method by sending probe data packets. This path detection method can be determined based on the actual network capabilities of the target virtual network. For example, static path detection can be used in an environment with end-network cooperation capabilities, and this embodiment of the disclosure does not limit this.
[0184] In this step, when the path probing method in the network configuration information is static path probing, the server can determine the network topology corresponding to the target physical network based on the physical network device information in the network configuration information. Simultaneously, it calculates the static configuration of the target physical network, completing the switch configuration simulation. This static configuration may include hash algorithms corresponding to static path probing. After receiving a target probing request, the server can perform path probing based on the network topology and static configuration, using the physical network information as input, and calculate the physical network probing results. In this way, by adopting static path probing, the server can reduce the cost of dynamic probing based on packet sending and optimize the latency of returning probing results.
[0185] S508. When the path detection method in the network configuration information is dynamic path detection, construct a target detection packet based on the physical network information and send the target detection packet to the target physical network. Calculate the physical network detection result based on the return packet corresponding to the target detection packet.
[0186] In this embodiment, the target probe packet can refer to a probe data packet constructed based on physical network information. The return packet can refer to the return packet corresponding to the target probe packet. In this step, when the path probing method in the network configuration information is dynamic path probing, the server can construct a target probe packet based on physical network information and use the system instruction (traceroute) principle to perform path probing of the target physical network. Based on the physical network capabilities, the server uses the information tagging capabilities of devices such as network switches to send the target probe packet and receive the return packet. Based on the return packet, the server parses and calculates the physical network probing result of the path probing. In this way, the server constructs a target probe packet based on physical network information for dynamic path probing, which has stronger applicability. In related technologies, the common approach is to encapsulate probe data packets based on inner virtual network information and outer physical network information. All network nodes need to adapt to this encapsulation method, resulting in high adaptation costs and processing overhead. However, in this embodiment, the server can construct the target probe packet based on physical network information. By using outer physical network information for encapsulation, the adaptation costs and processing overhead of network nodes can be reduced.
[0187] S509. Based on the network configuration information of the target virtual network, the physical network detection results are mapped and transformed to obtain the target detection results corresponding to the target virtual network, and the target detection results are returned to the client.
[0188] In this embodiment of the disclosure, after obtaining the physical network detection results, the server can map and convert the physical network detection results corresponding to the target physical network to the target detection results in the target virtual network according to the mapping conversion method in the network configuration information, and then return the target detection results to the client process to realize path detection for the target virtual network.
[0189] Based on the above embodiments, Figure 6 is a flowchart illustrating another virtual network path detection method provided by an exemplary embodiment of this disclosure. Referring to Figure 6, this virtual network path detection method may include:
[0190] S601. Obtain a target detection request and send the target detection request to the server. The target detection request includes the virtual network information corresponding to the target virtual network.
[0191] The executing entity in this embodiment can be a client or a virtual network path detection device set in the client. The virtual network path detection device can be implemented by software or by a combination of software and hardware. For ease of understanding, the following description uses a client as the executing entity. The client can refer to a client that communicates with the server, or it can refer to a client process running in a virtual machine or container on the host machine. This embodiment does not limit the specific type of client.
[0192] S602. Obtain the target detection result corresponding to the target virtual network returned by the server; the target detection result is obtained by the server mapping and converting the physical network detection result according to the network configuration information; the physical network detection result is obtained by the server performing path detection on the target physical network corresponding to the target virtual network according to the physical network information corresponding to the virtual network information; the physical network information is obtained by the server mapping and converting the virtual network information based on the network configuration information of the target virtual network.
[0193] In this embodiment, the client can obtain a target probe request, which may be initiated by the user based on an interactive operation. The target probe request may include virtual network information of the target virtual network. Then, the client can send the target probe request to the server via a target interaction method. After receiving the target probe request, the server maps and transforms the virtual network information based on the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information. Then, based on the physical network information, it performs path probing on the target physical network corresponding to the target virtual network to obtain the physical network probing result. Furthermore, it maps and transforms the physical network probing result based on the network configuration information to obtain the target probe result corresponding to the target virtual network. The client can then receive the target probe result returned by the server. Thus, in this disclosure, the server, through the mapping and transformation between virtual network information and physical network information, can utilize physical network capabilities to achieve path probing of the target virtual network without requiring adaptation of all network nodes. This reduces the adaptation cost and processing overhead of virtual network path probing. Moreover, the mapping and transformation of network information and the path probing are decoupled, resulting in higher versatility and scalability.
[0194] In one possible implementation, the virtual network path detection method may further include the following steps:
[0195] Parse the target configuration file corresponding to the target virtual network to obtain the network management environment corresponding to the target virtual network; when the network management environment is an Open Virtual Switch (OVS) dynamic flow table management environment, assemble invalid data packets according to the virtual network information and send the dynamic flow table corresponding to the invalid data packets to the server.
[0196] In this embodiment, the client can parse the target configuration file of the target virtual network to determine the network management environment corresponding to the target virtual network. When the network management environment is an OVS dynamic flow table network management environment, the client needs to assist in triggering the OVS dynamic flow table. Before sending the target probe request to the server, the client can assemble invalid data packets based on the virtual network information in the target probe request and trigger the issuance of the dynamic flow table corresponding to the invalid data packets, sending the dynamic flow table to the server. In this way, when performing IP address mapping and conversion later, the server can directly query the corresponding dynamic flow table to determine the physical IP address corresponding to the virtual IP address, improving the flexibility of IP address mapping and conversion.
[0197] It should be understood that in the various embodiments of this disclosure, the sequence number of each process does not imply 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 this disclosure.
[0198] Based on any of the above embodiments, Figure 7 is an interactive schematic diagram of virtual network path probing provided by an exemplary embodiment of this disclosure. As shown in Figure 7, a daemon process, a virtual network / physical network converter, and a physical network path detector can run on the server (host side). The daemon process on the server can interact with the client. Specifically, the client process (or client) can run in a virtual machine or container, acting as a generator for virtual network path probing. It is responsible for generating a target probing request based on the user's request parameters and sending the target probing request to the daemon process on the server side. In addition, in the scenario of OVS dynamic management, the client process can also assemble invalid data packets based on the target probing request and trigger the issuance of dynamic flow tables. After completing the initialization of the target virtual network, the daemon process runs in the background of the server and interacts with all client processes on the server host, receives path probing requests from client processes, interacts with the virtual network / physical network converter and the physical network path detector, obtains the target probing results, and returns the target probing results to the client processes.
[0199] A virtual network / physical network converter can be used to convert virtual network information in a target probe request into physical network information, specifically by mapping and converting network layer IP addresses and transport layer port information. A physical network path detector can then perform path probing on the target physical network based on the converted physical network information, obtaining the physical network probe results. The physical network path detector can then send the physical network probe results to a daemon process, which in turn interacts with the virtual network / physical network converter to perform mapping and conversion on the physical network probe results, obtaining the target probe results corresponding to the target virtual network.
[0200] Based on any of the above embodiments, Figure 8 is a schematic diagram of the technical link of virtual network path detection provided by an exemplary embodiment of this disclosure. As shown in Figure 8, the virtual network path detection may specifically include the following steps:
[0201] S1. On the server side, the server can start a daemon process and initialize the target virtual network.
[0202] S2. Obtain the network configuration information of the target virtual network, which may include physical network device information and network environment configuration information. If the path probing method in the network configuration information is static path probing, the server can use the physical network path detector to determine the static network topology and static network environment configuration based on the network configuration information, facilitating subsequent static path probing calculations. Afterwards, the server can use a daemon process to open a communication channel with the client process based on the target interaction method in the network configuration information and continuously listen for new target probing requests.
[0203] S3. On the client side, the client process starts.
[0204] S4. The client process can generate target probe requests. Specifically, users can initiate path probe requests from upper-layer applications in virtual machines or containers. These requests can include user-defined request parameters. The client process parses these parameters and determines their validity (e.g., whether the parameters fall within a preset value range). If valid, the client can generate a target probe request based on these parameters. Furthermore, the client can parse the target configuration file of the target virtual network to determine its network management environment. If this environment is an OVS dynamic flow table management environment, the client can assemble invalid data packets based on the target probe request and trigger the process of sending dynamic flow tables to servers, etc.
[0205] S5. The client process can establish a connection with the server's daemon process through target interaction and send a target probe request to the server's daemon process. This target probe request includes virtual network information of the target virtual network, such as the virtual IP address (including source and destination addresses), virtual port information, and the transport layer protocol used for probe.
[0206] S6. The server can receive target detection requests sent by the client based on the target interaction method.
[0207] S7. Upon receiving a target probe request, the server's daemon can use a virtual network / physical network converter to map virtual network information to physical network information. Specifically, the server first parses the target configuration file to determine the network management environment of the target virtual network. If the network management environment is an OVS dynamic flow table management environment, the server can determine the physical IP address information corresponding to the virtual IP address information by querying the corresponding dynamic flow table. If the network management environment is an OVS static flow table management environment, the server can determine the physical IP address information corresponding to the virtual IP address information by interacting with the OVS network component. If the network management environment is not an OVS management environment, the server can determine the physical IP address information corresponding to the virtual IP address information by interacting with the server's local IP address management plugin or the container distributed key-value store system. Furthermore, the server can also map and convert virtual port information in the virtual network information to obtain the physical port information corresponding to the virtual port information. Specifically, it can directly determine the physical destination port information corresponding to the virtual port information based on the virtual port information, and simultaneously determine the physical source port information corresponding to the virtual port information based on the data packet encapsulation device type in the actual packet encapsulation process.
[0208] S8. After determining the physical network information corresponding to the virtual network information, the server can perform path probing on the target physical network corresponding to the target virtual network based on the physical network information and the path probing method in the network configuration information, either through static path probing or dynamic path probing, and obtain the physical network probing results.
[0209] S9. After obtaining the physical network detection results, the server can perform mapping and conversion on the physical network detection results to obtain the target detection results corresponding to the target virtual network.
[0210] S10. The server's daemon can return the target detection results to the client.
[0211] S11. The client can receive the target probe results sent by the server. When the probe ends and an exit command is received, the server can exit the daemon process; the client can also terminate the client process when an error occurs (such as timeout without returning a result or invalid request parameters).
[0212] In this embodiment, the server maps virtual network information to physical network information on the host side, thus converting virtual network path detection in a virtualized scenario into physical network path detection. This approach offers good versatility and scalability. Furthermore, the server eliminates the need for processing virtual networks such as VXLAN general encapsulation protocols, instead encapsulating packets based on physical network information. This avoids the additional overhead associated with end-side and network-side network devices adapting to VXLAN general encapsulation protocols, reducing the adaptation costs for network devices to specific packet and response rules and preventing additional processing overhead from affecting their forwarding capabilities.
[0213] Furthermore, the server performs a more thorough fit when mapping virtual network information to physical network information, including transport layer port information and the actual device type for encapsulating and sending data packets. This adds information from the virtual network encapsulation mapping transport layer, enabling a more accurate match to the characteristics of actual application traffic and a true reflection of the path information of actual application traffic. Because the mapping and conversion of virtual network information and the actual path detection are decoupled, the actual path detection performance depends on the underlying physical network path detection performance. This allows for adaptation to various detection methods, such as switching between dynamic and static detection, resulting in stronger robustness and scalability. Moreover, in this embodiment, the virtual network path detection processing is completed on the client side, without introducing additional overhead on the network side. It also adopts a client-server (C / S) architecture, utilizing target interaction methods such as Unix domain sockets to complete communication between the client and server, making it suitable for various virtualization scenarios such as cloud-native and virtual machines, offering greater versatility and scalability.
[0214] Figure 9 is a schematic diagram of a virtual network path detection device provided in an exemplary embodiment of this disclosure. Referring to Figure 9, the virtual network path detection device 90 includes:
[0215] The acquisition module 91 is used to acquire the target detection request sent by the client, which includes the virtual network information corresponding to the target virtual network.
[0216] The first mapping module 92 is used to map and convert virtual network information according to the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information.
[0217] The detection module 93 is used to perform path detection on the target physical network corresponding to the target virtual network based on the physical network information, and obtain the physical network detection result corresponding to the target physical network.
[0218] The second mapping module is used to map and transform the physical network detection results according to the network configuration information of the target virtual network, obtain the target detection results corresponding to the target virtual network, and return the target detection results to the client.
[0219] In one possible implementation, the network configuration information includes physical network device information and network environment configuration information; the device 90 is further configured to:
[0220] Obtain the physical network device information of the target virtual network, including the Internet Protocol (IP) address and / or the Media Access Control (MAC) address of the physical network device;
[0221] Parse the target configuration file corresponding to the target virtual network to obtain the network environment configuration information corresponding to the target virtual network. The network environment configuration information includes at least one of the following: the target interaction method between the server and the client, the mapping and conversion method between the target virtual network and the target physical network, and the path detection method of the target physical network.
[0222] In one possible implementation, the acquisition module 91 is specifically used for:
[0223] Based on the target interaction method between the server and the client, open a communication channel with the client;
[0224] Target detection requests sent by the client are obtained based on the communication channel.
[0225] In one possible implementation, the first mapping module 92 is specifically used for:
[0226] The virtual IP address information in the virtual network information is mapped and converted to obtain the physical IP address information corresponding to the virtual IP address information;
[0227] The virtual port information in the virtual network information is mapped and converted to obtain the physical port information corresponding to the virtual port information.
[0228] In one possible implementation, the first mapping module 92 is specifically used for:
[0229] Based on the target configuration file corresponding to the target virtual network, determine the network management environment corresponding to the target virtual network;
[0230] In a network management environment that is an Open Virtual Switch (OVS) dynamic flow table management environment, the physical IP address information corresponding to the virtual IP address information is determined according to the dynamic flow table corresponding to the OVS dynamic flow table management environment; the dynamic flow table is generated by the client assembling invalid data packets and triggering the distribution based on the invalid data packets;
[0231] When the network management environment is an OVS static flow table management environment, the physical IP address information corresponding to the virtual IP address information is determined by interacting with the network components corresponding to the OVS static flow table management environment.
[0232] In a non-OVS-managed network environment, the physical IP address information corresponding to the virtual IP address information is determined by interacting with the server's local IP address management plugin or the container's distributed key-value store system.
[0233] In one possible implementation, the first mapping module 92 is specifically used for:
[0234] Determine the physical destination port information corresponding to the virtual port information;
[0235] Based on the data packet encapsulation device type, determine the physical source port information corresponding to the virtual port information.
[0236] In one possible implementation, the packet encapsulation device type includes a kernel type; the first mapping module 92 is specifically used for:
[0237] If the target socket cache corresponding to the kernel type includes a preset hash value, then the physical source port information corresponding to the virtual port information is determined based on the preset hash value.
[0238] If the target socket cache does not contain the preset hash value and the IP packet is a fragmented packet, then the source IP address and destination IP address of the IP packet are hashed to obtain the physical source port information corresponding to the virtual port information;
[0239] If the target socket cache does not contain the preset hash value and the IP packet is a non-fragmented packet, then the source port and destination port of the IP packet are hashed to obtain the physical source port information corresponding to the virtual port information.
[0240] In one possible implementation, the detection module 93 is specifically used for:
[0241] Based on the mapping and conversion method between the target virtual network and the target physical network in the network configuration information, determine the target physical network corresponding to the target virtual network;
[0242] When the path probing method in the network configuration information is static path probing, the network topology and static computing configuration corresponding to the target physical network are determined according to the network configuration information, and the physical network probing results corresponding to the physical network information are calculated according to the network topology and static computing configuration.
[0243] When the path probing method in the network configuration information is dynamic path probing, a target probe packet is constructed based on the physical network information and sent to the target physical network. The physical network probing result is calculated based on the return packet corresponding to the target probe packet.
[0244] In one possible implementation, the target virtual network includes a virtual overlay network based on the physical underlay network.
[0245] The virtual network path detection device 90 provided in this embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0246] Figure 10 is a schematic diagram of a virtual network path detection device provided in an exemplary embodiment of this disclosure. Referring to Figure 10, the virtual network path detection device 100 includes:
[0247] The first acquisition module 1001 is used to acquire a target detection request and send the target detection request to the server. The target detection request includes virtual network information corresponding to the target virtual network.
[0248] The second acquisition module 1002 is used to acquire the target detection result corresponding to the target virtual network returned by the server; the target detection result is obtained by the server mapping and converting the physical network detection result according to the network configuration information; the physical network detection result is obtained by the server performing path detection on the target physical network corresponding to the target virtual network according to the physical network information corresponding to the virtual network information; the physical network information is obtained by the server mapping and converting the virtual network information based on the network configuration information of the target virtual network.
[0249] In one possible implementation, the device 100 is further configured to:
[0250] Parse the target configuration file corresponding to the target virtual network to obtain the network management environment corresponding to the target virtual network;
[0251] In a network management environment where the Open Virtual Switch (OVS) is a dynamic flow table management environment, invalid data packets are assembled based on the virtual network information, and the corresponding dynamic flow table for the invalid data packets is sent to the server.
[0252] The virtual network path detection device 100 provided in this embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0253] Furthermore, embodiments of this disclosure also provide a virtual network path detection system, the system including a server and a client; wherein,
[0254] The client is used to obtain target probe requests and send them to the server. The target probe requests include virtual network information corresponding to the target virtual network.
[0255] The server is used to obtain target probe requests sent by clients, and to map and convert virtual network information according to the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information;
[0256] The server is also used to perform path detection on the target physical network corresponding to the target virtual network based on the physical network information, and to obtain the physical network detection results corresponding to the target physical network.
[0257] The server is also used to map and convert the physical network detection results according to the network configuration information of the target virtual network, obtain the target detection results corresponding to the target virtual network, and return the target detection results to the client.
[0258] The client is also used to obtain the target detection results returned by the server.
[0259] The virtual network path detection system provided in this disclosure can execute the technical solutions shown in the above method embodiments. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0260] Figure 11 is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present disclosure. Referring to Figure 11, the electronic device 110 may include a processor 111 and a memory 112. Exemplarily, the processor 111 and the memory 112 are interconnected via a bus 113.
[0261] Memory 112 stores computer-executed instructions;
[0262] The processor 111 executes computer execution instructions stored in the memory 112, causing the processor 111 to execute the virtual network path detection method as shown in the above method embodiment.
[0263] Accordingly, this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the virtual network path detection method of the above method embodiments.
[0264] Accordingly, this disclosure also provides a computer program product, including a computer program, which, when executed by a processor, can implement the virtual network path detection method shown in the above method embodiments.
[0265] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0266] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.
[0267] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0268] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0269] In a typical configuration, a computing device includes one or more processors, input / output interfaces, network interfaces, and memory.
[0270] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0271] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0272] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0273] The above description is merely an embodiment of this disclosure and is not intended to limit the scope of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.
Claims
1. A method of virtual network path exploration, wherein, Applied to a server, the method comprises: Obtaining a target probe request sent by a client, wherein the target probe request comprises virtual network information corresponding to a target virtual network; Mapping and converting the virtual network information according to network configuration information of the target virtual network to obtain physical network information corresponding to the virtual network information; Performing path probing on a target physical network corresponding to the target virtual network according to the physical network information to obtain a physical network probing result corresponding to the target physical network; Mapping and converting the physical network probing result according to the network configuration information of the target virtual network to obtain a target probing result corresponding to the target virtual network, and returning the target probing result to the client.
2. The method of claim 1, wherein, The network configuration information comprises physical network device information and network environment configuration information; the method further comprises: Obtaining the physical network device information of the target virtual network, wherein the physical network device information comprises an Internet Protocol (IP) address of a physical network device and / or a Media Access Control (MAC) address of the physical network device; Parsing a target configuration file corresponding to the target virtual network to obtain the network environment configuration information corresponding to the target virtual network, wherein the network environment configuration information comprises at least one of the following: a target interaction mode between the server and the client, a mapping and conversion mode between the target virtual network and the target physical network, and a path probing mode of the target physical network.
3. The method of claim 1 or 2, wherein, The obtaining of the target probe request sent by the client comprises: Starting a communication channel with the client according to the target interaction mode between the server and the client; Obtaining the target probe request sent by the client based on the communication channel.
4. The method according to any one of claims 1 to 3, wherein, The mapping and conversion of the virtual network information according to the network configuration information of the target virtual network to obtain the physical network information corresponding to the virtual network information comprises: Mapping and converting virtual IP address information in the virtual network information to obtain physical IP address information corresponding to the virtual IP address information; Mapping and converting virtual port information in the virtual network information to obtain physical port information corresponding to the virtual port information.
5. The method of claim 4, wherein, The mapping and conversion of the virtual IP address information in the virtual network information to obtain the physical IP address information corresponding to the virtual IP address information comprises: Determining a network management and control environment corresponding to the target virtual network according to a target configuration file corresponding to the target virtual network; In a case where the network management and control environment is an Open Virtual Switch (OVS) dynamic flow table management and control environment, determining the physical IP address information corresponding to the virtual IP address information according to a dynamic flow table corresponding to the OVS dynamic flow table management and control environment; the dynamic flow table is triggered and issued based on an invalid data packet assembled by the client; In a case where the network management and control environment is an OVS static flow table management and control environment, determining the physical IP address information corresponding to the virtual IP address information by interacting with a network component corresponding to the OVS static flow table management and control environment; In a case where the network management environment is a non-OVS management environment, the physical IP address information corresponding to the virtual IP address information is determined by interacting with the server local IP address management plug-in or a container distributed key-value storage system.
6. The method of claim 4 or 5, wherein, The mapping and conversion of the virtual port information in the virtual network information to obtain physical port information corresponding to the virtual port information comprises: determining physical destination port information corresponding to the virtual port information; determining physical source port information corresponding to the virtual port information according to the data packet encapsulation device type.
7. The method of claim 6, wherein, The data packet encapsulation device type includes a kernel type; and the determination of the physical source port information corresponding to the virtual port information according to the data packet encapsulation device type comprises: if the preset hash value is included in the target socket cache corresponding to the kernel type, determining the physical source port information corresponding to the virtual port information based on the preset hash value; if the preset hash value is not included in the target socket cache and the IP packet is a fragmented packet, performing hash processing on the source IP address and the destination IP address of the IP packet to obtain the physical source port information corresponding to the virtual port information; if the preset hash value is not included in the target socket cache and the IP packet is a non-fragmented packet, performing hash processing on the source port and the destination port of the IP packet to obtain the physical source port information corresponding to the virtual port information.
8. The method according to any one of claims 1 to 7, wherein, The path detection of the target physical network corresponding to the target virtual network according to the physical network information to obtain a physical network detection result corresponding to the target physical network comprises: determining the target physical network corresponding to the target virtual network according to the mapping and conversion mode between the target virtual network and the target physical network in the network configuration information; in a case where the path detection mode in the network configuration information is a static path detection, determining a network topology structure and a static calculation configuration of the target physical network according to the network configuration information, and calculating the physical network detection result corresponding to the physical network information according to the network topology structure and the static calculation configuration; in a case where the path detection mode in the network configuration information is a dynamic path detection, constructing a target detection packet based on the physical network information, sending the target detection packet to the target physical network, and calculating the physical network detection result according to a return packet corresponding to the target detection packet.
9. The method according to any one of claims 1 to 8, wherein, The target virtual network comprises a virtual overlay network based on a physical underlay network.
10. A virtual network path probing method, wherein, The method applied to a client comprises: obtaining a target detection request and sending the target detection request to a server, wherein the target detection request comprises virtual network information corresponding to a target virtual network; obtaining the target detection result corresponding to the target virtual network returned by the server; the target detection result is obtained by the server through mapping and conversion of a physical network detection result according to network configuration information; the physical network detection result is obtained by the server through path detection of a target physical network corresponding to the target virtual network according to physical network information corresponding to the virtual network information; the physical network information is obtained by the server through mapping and conversion of the virtual network information based on network configuration information of the target virtual network.
11. The method of claim 10, wherein, The method further comprises: parsing a target configuration file corresponding to the target virtual network to obtain a network management environment corresponding to the target virtual network; in a case where the network management environment is an open virtual switch (OVS) dynamic flow table management environment, assembling an invalid data packet according to the virtual network information, and issuing a dynamic flow table corresponding to the invalid data packet to the server.
12. A virtual network path probing apparatus, wherein, comprise: an obtaining module configured to obtain a target detection request sent by a client, the target detection request comprising virtual network information corresponding to a target virtual network; a first mapping module configured to map and convert the virtual network information according to network configuration information of the target virtual network to obtain physical network information corresponding to the virtual network information; a detection module configured to perform path detection on a target physical network corresponding to the target virtual network according to the physical network information to obtain a physical network detection result corresponding to the target physical network; a second mapping module configured to map and convert the physical network detection result according to the network configuration information of the target virtual network to obtain a target detection result corresponding to the target virtual network, and return the target detection result to the client.
13. A virtual network path probing system, wherein, The system comprises a server and a client; wherein the client is configured to obtain a target detection request and send the target detection request to the server, the target detection request comprising virtual network information corresponding to a target virtual network; the server is configured to obtain the target detection request sent by the client, map and convert the virtual network information according to network configuration information of the target virtual network to obtain physical network information corresponding to the virtual network information; the server is further configured to perform path detection on a target physical network corresponding to the target virtual network according to the physical network information to obtain a physical network detection result corresponding to the target physical network; the server is further configured to map and convert the physical network detection result according to the network configuration information of the target virtual network to obtain a target detection result corresponding to the target virtual network, and return the target detection result to the client; the client is further configured to obtain the target detection result returned by the server.
14. An electronic device, comprising: comprise: a memory and a processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, so that the processor performs the virtual network path detection method according to any one of claims 1 to 11.
15. A computer readable storage medium, wherein, The computer readable storage medium stores computer-executable instructions for implementing the virtual network path exploration method according to any one of claims 1 to 11 when the computer-executable instructions are executed by a processor.
16. A computer program product, wherein, The computer program is executed by a computer to implement the virtual network path exploration method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Virtual network mapping method and device
CN105681153A
Method and device for determination of network topology
CN106713042A
Overlay network-oriented in-band network telemetering method, system and related device
CN112866075A
Distributed network emulation implemented by a host in a virtualized computing environment
US20180260236A1