Vxlan test method and system of SDN cloud network
By binding the MAC address of the virtual VXLAN tunnel of SDN to the VTEP and performing packet encapsulation and decapsulation on the load balancing device, the problem of MAC address learning failure in SDN cloud network is solved, and network communication is normalized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU DPTECH TECH
- Filing Date
- 2023-06-29
- Publication Date
- 2026-04-14
AI Technical Summary
Existing VXLAN testing methods cannot effectively schedule network traffic in SDN cloud networks, causing SDN cloud networks to fail to learn MAC addresses correctly and affecting network communication.
By binding the MAC address and VNI of the virtual VXLAN gateway of SDN to the load balancer, a VXLAN tunnel is established, and packet encapsulation and decapsulation are performed between VTEPs to ensure that the inner MAC address is the MAC address of the LB device, thus realizing the tunnel connection between the hardware network and the software network.
It enables the correct learning of MAC addresses and the normalization of network communication in SDN cloud networks, and allows for functional verification of software that interconnects with IP networks.
Smart Images

Figure CN116827825B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer information processing, and more specifically, to a VXLAN testing method and system for SDN cloud networks. Background Technology
[0002] Existing VXLAN testing methods require establishing VXLAN tunnels between VTEPs and associating the VXLAN with the tunnel. The VTEP learns the MAC addresses of virtual machines within its local site, adds these MAC addresses to the VXLAN's MAC address table for encapsulation and forwarding. The VTEP decapsulates received VXLAN packets, restores the Layer 2 data frames, determines the VXLAN to which the packet belongs based on the VNI carried in the packet, learns the MAC address of the remote virtual machine, and forwards the packet within that VNI.
[0003] VXLAN technology uses MAC in UDP encapsulation. For SDN (Software Defined Network) domain-based network architecture, where different domains communicate with each other via public IP network protocols in a public cloud, the MAC address learned by the SDN cloud network is the MAC address of the device, not the MAC address of the VXLAN gateway. Therefore, the SDN cloud network cannot effectively schedule network traffic based on MAC addresses.
[0004] Therefore, a new VXLAN testing method and system for SDN cloud networks is needed.
[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] In view of this, this application provides a VXLAN testing method and system for SDN cloud networks, which can specify routes for SDN cloud networks, establish VXLAN tunnels between hardware networks and software networks, and comprehensively verify the functionality of software based on IP network interconnection, such as SDN public clouds.
[0007] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0008] According to one aspect of this application, a VXLAN testing method for an SDN cloud network is proposed. The method includes: deploying a test environment, the test environment comprising: a virtual machine, an SDN cloud network, a public network, and a load balancer; the virtual machine sending a test packet to the public network; the SDN cloud network encapsulating the test packet and sending the encapsulated test packet to the load balancer through a first VXLAN tunnel; the load balancer decapsulating the test packet and recapsulating it; the load balancer sending the recapsulated test packet to the SDN cloud network through the first VXLAN tunnel; and the SDN cloud network decapsulating the test packet and sending it to the public network to test its functionality.
[0009] In one exemplary embodiment of this application, the method further includes: a response message returned by the public network to the test message; the SDN cloud network encapsulating the response message and sending the encapsulated response message to the load balancing device through a second VXLAN tunnel; the load balancing device decapsulating the response message and encapsulating it again; the load balancing device sending the re-encapsulated response message to the SDN cloud network through the second VXLAN tunnel; and the SDN cloud network decapsulating the response message and sending it to the virtual machine for functionality testing.
[0010] In one exemplary embodiment of this application, deploying a test environment includes: establishing a first VXLAN tunnel and a second VXLAN tunnel between the SDN cloud network and the load balancing device; establishing a VLAN tunnel between the SDN cloud network and the virtual machine; establishing a VLAN tunnel between the SDN cloud network and the public network; and deploying a binding relationship between the SDN cloud network and the VXLAN tunnel on the load balancing device.
[0011] In one exemplary embodiment of this application, the binding relationship between the SDN cloud network and the VXLAN tunnel deployed on the load balancer includes: the binding relationship between the gateway MAC address and VNI of the SDN cloud network and the first VXLAN tunnel deployed on the load balancer; and the binding relationship between the gateway MAC address and VNI of the SDN cloud network and the second VXLAN tunnel deployed on the load balancer.
[0012] In one exemplary embodiment of this application, the SDN cloud network encapsulates the test packet and sends the encapsulated test packet to the load balancing device through a first VXLAN tunnel, including: the SDN cloud network encapsulating the test packet in UDP; using the IP and MAC address of the SDN cloud network as the outer layer for encapsulation; adding the MAC address of the virtual machine to the MAC address table of the first VXLAN; and sending the encapsulated test packet to the load balancing device through the first VXLAN tunnel.
[0013] In one exemplary embodiment of this application, the load balancing device decapsulates the test packet and then recapsulates it, including: the load balancing device learning the mapping relationship between the inner MAC and outer IP in the test packet; decapsulating the test packet; and encapsulating the IP and MAC addresses of the SDN cloud network into a first VXLAN tunnel.
[0014] In one exemplary embodiment of this application, the SDN cloud network encapsulates the response message and sends the encapsulated response message to the load balancing device through a second VXLAN tunnel, including: the SDN cloud network encapsulating the response message in UDP; encapsulating the IP and MAC addresses of the SDN cloud network as the outer layer; adding the public MAC address to the MAC address table of the second VXLAN; and sending the encapsulated response message to the load balancing device through the second VXLAN tunnel.
[0015] In one exemplary embodiment of this application, the load balancing device decapsulates the response message and then recapsulates it, including: the load balancing device learning the mapping relationship between the inner MAC and outer IP in the response message; decapsulating the response message; and encapsulating the IP and MAC addresses of the SDN cloud network into a second VXLAN tunnel.
[0016] According to one aspect of this application, a VXLAN testing system for an SDN cloud network is proposed. The device includes: a deployment module for deploying a test environment, the test environment including: a virtual machine, an SDN cloud network, a public network, and a load balancer; the virtual machine for sending test packets to the public network; the SDN cloud network for encapsulating the test packets and sending the encapsulated test packets to the load balancer through a first VXLAN tunnel; and decapsulating the test packets from the load balancer and sending them to the public network for functional testing; the load balancer for decapsulating the test packets and recapsulating them; and sending the recapsulated test packets to the SDN cloud network through the first VXLAN tunnel.
[0017] In one exemplary embodiment of this application, the system further includes: an SDN cloud network, further configured to obtain a response message from the public network; encapsulate the response message and send the encapsulated response message to a load balancing device through a second VXLAN tunnel; and decapsulate the response message from the load balancing device and send it to a virtual machine; the load balancing device is further configured to decapsulate the response message and encapsulate it again; and send the re-encapsulated response message to the SDN cloud network through the second VXLAN tunnel; the virtual machine is further configured to perform functional testing on the SDN cloud network using the response message.
[0018] According to one aspect of this application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the method as described above.
[0019] According to one aspect of this application, a computer-readable medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described above.
[0020] According to the VXLAN testing method and system for SDN cloud networks disclosed in this application, by deploying a test environment including: a virtual machine, an SDN cloud network, a public network, and a load balancing device; the virtual machine sends test packets to the public network; the SDN cloud network encapsulates the test packets and sends the encapsulated test packets to the load balancing device through a first VXLAN tunnel; the load balancing device decapsulates the test packets and recapsulates them; the load balancing device sends the recapsulated test packets to the SDN cloud network through the first VXLAN tunnel; and the SDN cloud network decapsulates the test packets and sends them to the public network to test their functionality, this method can specify routes for the SDN cloud network, establish VXLAN tunnels between the hardware network and the software network, and comprehensively verify the functionality of software such as SDN public clouds that are based on IP network interconnection.
[0021] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0022] The above and other objects, features, and advantages of this application will become more apparent from the detailed description of exemplary embodiments with reference to the accompanying drawings. The drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0023] Figure 1 It is the existing VXLAN tunnel model.
[0024] Figure 2 It is the VXLAN message format in existing technology.
[0025] Figure 3 This is a system block diagram illustrating a VXLAN testing system for an SDN cloud network according to an exemplary embodiment.
[0026] Figure 4 This is a flowchart illustrating a VXLAN testing method for an SDN cloud network according to an exemplary embodiment.
[0027] Figure 5 This is a flowchart illustrating a VXLAN testing method for an SDN cloud network according to an exemplary embodiment.
[0028] Figure 6 This is a flowchart illustrating a VXLAN testing method for an SDN cloud network according to another exemplary embodiment.
[0029] Figure 7 This is a flowchart illustrating a VXLAN testing method for an SDN cloud network according to an exemplary embodiment.
[0030] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0031] Figure 9 This is a block diagram illustrating a computer-readable medium according to an exemplary embodiment. Detailed Implementation
[0032] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0033] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0034] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0035] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0036] It should be understood that although the terms first, second, third, etc., may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of this application. As used herein, the term "and / or" includes all combinations of any one and more of the associated listed items.
[0037] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily essential for implementing this application, and therefore cannot be used to limit the scope of protection of this application.
[0038] The technical abbreviations used in this application are explained as follows:
[0039] VXLAN (Virtual eXtensible LAN) is an extension of VLAN, a simple mechanism that encapsulates MAC addresses in UDP, and can create virtual Layer 2 subnets across multiple physical IP subnets.
[0040] A VTEP (VXLAN Tunnel End Point) is an edge device for VXLAN that performs VXLAN service processing: identifying the VXLAN to which an Ethernet data frame belongs, performing Layer 2 forwarding of data frames based on VXLAN, encapsulating / decapsulating packets, etc. It can be a standalone physical device or a server where a virtual machine resides.
[0041] VNE (Network Virtualization Edge) is a network entity that implements network virtualization functionality.
[0042] VNI (VXLAN Network Identifier) is a 24-bit identifier used by VXLAN to identify Layer 2 network segments. VNIs are used to identify Layer 2 network segments and there is a one-to-one correspondence between VXLANs, similar to the role of VLAN IDs.
[0043] LB (Load Balancer) is a hardware device that distributes network requests across available servers in a server cluster by managing incoming web data traffic and increasing effective network bandwidth.
[0044] SDN (Software-Defined Networking) is a novel network architecture proposed by the Clean-Slate research group at Stanford University. It is an implementation of network virtualization. Its core technology, OpenFlow, separates the control plane from the data plane of network devices, thereby enabling flexible control of network traffic, making the network more intelligent, and providing a good platform for innovation in core networks and applications.
[0045] UDP (User Datagram Protocol) is a connectionless transport layer protocol in the OSI (Open System Interconnection) reference model, providing a simple, unreliable, transaction-oriented message delivery service.
[0046] VXLAN technology can deploy millions of virtual networks within a data center, using 24-bit identifiers and supporting up to 2^24 VXLANs, thus solving the problem of insufficient VLAN resources in traditional Layer 2 networks. Traditional VLANs perform Layer 2 forwarding by querying MAC addresses, and can only use a maximum of 4096 VLANs.
[0047] VXLAN builds large Layer 2 networks based on IP networks, making network deployment and maintenance easier and making full use of existing IP network technologies. Only edge devices of the IP core network need VXLAN processing, while intermediate network devices only need to forward packets according to the IP header, reducing the difficulty and cost of network deployment.
[0048] VXLAN tunnel model as follows Figure 1 As shown, Server: A Server can create multiple virtual machines. Virtual machines in the same VLAN can communicate with each other at Layer 2, while virtual machines in different VLANs are isolated at Layer 2.
[0049] VTEP: A VXLAN tunnel is created between two VTEPs. The local VTEP encapsulates the data frame with a VXLAN header, UDP header, and IP header, and then forwards the encapsulated message to the remote VTEP through the VXLAN tunnel. The remote VTEP then decapsulates the data frame.
[0050] Core device (SW): Does not participate in VXLAN processing, only performs Layer 3 forwarding of packets.
[0051] VXLAN message format is as follows: Figure 2 As shown, an 8-byte VXLAN header, an 8-byte UDP header, and a 20-byte IP header are added to the outside of the original Layer 2 data frame.
[0052] The destination port number in the UDP header is the VXLAN UDP port number, with a default value of 4789.
[0053] The VXLAN header mainly consists of three parts:
[0054] 1. VXLAN Flags: 8 bits, flag bits. When the "I" bit is 1, it indicates that the VXLAN ID in the VXLAN header is valid; when it is 0, it indicates that the VXLAN ID is invalid. The other bits are reserved and set to 0.
[0055] 2. VNI field: VXLAN network identifier, 24 bits, used to distinguish VXLAN segments.
[0056] 3. Reserved bits: 24 bits + 8 bits, set to 0.
[0057] In view of the technical gaps in the existing technology, this application provides a VXLAN gateway testing method based on MAC address scheduling, which specifies the route to SDN, the MAC address of the virtual SDN, and binds the MAC address to the VXLAN gateway and VNI, so that the local VTEP can learn the ARP of the peer VTEP, thereby enabling more comprehensive functional verification of software such as SDN public cloud based on IP network interconnection.
[0058] The content of this application will be described in detail below with the aid of specific embodiments.
[0059] Figure 3 This is a system block diagram illustrating a VXLAN testing system for an SDN cloud network according to an exemplary embodiment.
[0060] like Figure 3 As shown, the system architecture may include virtual machines, an SDN cloud network, a public network, and a load balancer. Specifically, a first VXLAN tunnel and a second VXLAN tunnel are established between the SDN cloud network and the load balancer; a VLAN tunnel is established between the SDN cloud network and the virtual machines; a VLAN tunnel is established between the SDN cloud network and the public network; and the binding relationship between the SDN cloud network and the VXLAN tunnels is deployed on the load balancer.
[0061] More specifically, the public network, virtual machines, and SDN communicate via VLANs. During testing, it is necessary to ensure good network communication. For example, the SDN and LB devices establish a VXLAN tunnel through VTEPs at both ends of the VXLAN tunnel. The VXLAN tunnel can be the first VXLAN tunnel, with VNIs of 30 and the second VXLAN tunnel VNIs of 40.
[0062] In the existing technology, if the test is performed directly through the above test environment, the inner MAC of the SDN encapsulation is the MAC of the LB device, not the MAC of the VXLAN gateway. This will cause the ARP (Address Resolution Protocol) learning of the load balancer to fail and the LB device to forward abnormally.
[0063] Therefore, in this application, the VXLAN gateway MAC address of the SDN needs to be encapsulated into the VXLAN tunnel. Since SDN is based on IP network interconnection, it is necessary to bind a virtual VXLAN gateway MAC address of the SDN on the LB device and associate the VXLAN gateway MAC address with the VNI of the VXLAN tunnel. The LB device can then encapsulate the VXLAN gateway MAC address of the SDN and specify the next hop to the SDN, ensuring that the inner MAC address encapsulated by the SDN is from the LB device. This ensures successful ARP learning and guarantees that the LB device can forward request and response packets normally, enabling network communication.
[0064] In one specific embodiment, a virtual machine is used to send test messages to the public network;
[0065] The SDN cloud network is used to encapsulate the test message and send the encapsulated test message to the load balancing device through the first VXLAN tunnel; and to decapsulate the test message from the load balancing device and send it to the public network for functional testing.
[0066] A load balancing device is used to decapsulate the test packet and recapsulate it; the recapsulated test packet is sent to the SDN cloud network through the first VXLAN tunnel.
[0067] In one specific embodiment, the SDN cloud network is further configured to obtain response messages from the public network; encapsulate the response messages and send the encapsulated response messages to the load balancing device through a second VXLAN tunnel; and decapsulate the response messages from the load balancing device and send them to the virtual machine.
[0068] The load balancing device is also used to decapsulate the response message and recapsulate it; and send the recapsulated response message to the SDN cloud network through the second VXLAN tunnel.
[0069] Virtual machines are also used to perform functional testing of the SDN cloud network via response messages.
[0070] According to the VXLAN test system of the SDN cloud network in this application, by binding the MAC address of the SDN virtual VXLAN gateway on the LB device and associating the VXLAN gateway MAC address with the VNI of the VXLAN tunnel, the LB device can encapsulate the SDN VXLAN gateway MAC and specify the next hop to the SDN. This ensures that the inner MAC of the SDN encapsulation is that of the LB device, and that ARP is successfully learned, ensuring that the LB device can forward request and response packets normally, and that the network can communicate.
[0071] Figure 4 This is a flowchart illustrating a VXLAN testing method for an SDN cloud network according to an exemplary embodiment. The VXLAN testing method 40 for the SDN cloud network may include steps S402 to S416.
[0072] like Figure 4 As shown, in S402, the virtual machine sends a test message.
[0073] In S404, the SDN cloud network encapsulates the test message. The SDN cloud network may, for example, encapsulate the test message in UDP, or, for example, encapsulate the IP and MAC addresses of the SDN cloud network as an outer layer; or, for example, add the MAC address of the virtual machine to the MAC address table of the first VXLAN.
[0074] In S406, the first tunnel forwards test messages to the load balancer.
[0075] In S408, the load balancer deseals the test packet. The load balancer may, for example, learn the mapping relationship between the inner MAC address and the outer IP address in the test packet; the load balancer may also, for example, deseal the test packet.
[0076] In the S410, the load balancer encapsulates test packets. The load balancer can encapsulate the IP and MAC addresses of the SDN cloud network into the first VXLAN tunnel.
[0077] In S412, the first tunnel forwards test packets to the SDN cloud network.
[0078] In S414, SDN cloud network decryption test packets are performed. SDN cloud network can then recover the IP and MAC addresses of virtual machines through decryption.
[0079] In S416, test messages are sent to the public network.
[0080] Figure 5 This is a flowchart illustrating a VXLAN testing method for an SDN cloud network according to another exemplary embodiment. Figure 5 The process shown in step 50 is... Figure 4A detailed description of the process shown.
[0081] like Figure 5 As shown, in S502, a test environment is deployed, which includes: virtual machines, SDN cloud network, public network, and load balancing equipment.
[0082] In S504, the virtual machine sends a test message to the public network.
[0083] In S506, the SDN cloud network encapsulates the test message and sends the encapsulated test message to the load balancing device through the first VXLAN tunnel.
[0084] More specifically, the data packets sent by the virtual machine can be encapsulated in UDP, with the IP and MAC addresses of the SDN used as the outer layer of encapsulation. The virtual machine's MAC address is added to the MAC address table of the first VXLAN tunnel, and the request packet is sent from the first VXLAN tunnel (VNI can be, for example, 30) to the LB device.
[0085] In S508, the load balancer decapsulates the test packet and then recapsulates it. More specifically, after receiving the request packet, the LB learns the mapping from the inner MAC address to the outer IP address, decapsulates the packet, then encapsulates the MAC address of the SDN's VXLAN gateway into a VXLAN tunnel, and forwards it to the SDN through the first VXLAN tunnel.
[0086] In the S510, the load balancer will re-encapsulate the test message and send it to the SDN cloud network through the first VXLAN tunnel.
[0087] In S512, the SDN cloud network decapsulates the test packets and sends them to the public network for functionality testing. More specifically, after receiving the request packets forwarded by the LB device, the SDN decapsulates the packets to restore the virtual machine IP and MAC data frames. The test packets are then forwarded to the public network, and the request packets are forwarded.
[0088] According to the VXLAN testing method for SDN cloud networks in this application, a test environment is deployed, including: a virtual machine, an SDN cloud network, a public network, and a load balancing device. The virtual machine sends test packets to the public network. The SDN cloud network encapsulates the test packets and sends the encapsulated test packets to the load balancing device through a first VXLAN tunnel. The load balancing device decapsulates the test packets and recapsulates them. The load balancing device sends the recapsulated test packets to the SDN cloud network through the first VXLAN tunnel. The SDN cloud network decapsulates the test packets and sends them to the public network to test their functionality. This method allows for specifying routes for the SDN cloud network, establishing VXLAN tunnels between the hardware and software networks, and comprehensively verifying the functionality of software like SDN public clouds that are based on IP network interconnection.
[0089] Figure 6 This is a flowchart illustrating a VXLAN testing method for an SDN cloud network according to an exemplary embodiment. The VXLAN testing method 60 for the SDN cloud network may further include steps S602 to S616.
[0090] like Figure 6 As shown, in S602, the public network returns a response message.
[0091] In S604, the SDN cloud network encapsulates the response message. The SDN cloud network can encapsulate the response message in UDP; it can also encapsulate the IP and MAC address of the SDN cloud network as an outer layer; and it can also add the public network MAC address to the MAC address table of the second VXLAN.
[0092] In S606, the second tunnel forwards the response message to the load balancer.
[0093] In S608, the load balancer deseals the response message. The load balancer may, for example, learn the mapping relationship between the inner MAC address and the outer IP address in the response message; the load balancer may also, for example, deseal the response message.
[0094] In the S610, the load balancer encapsulates response messages. The load balancer can encapsulate the IP and MAC addresses of the SDN cloud network into a second VXLAN tunnel.
[0095] In S612, the second tunnel forwards the response message to the SDN cloud network.
[0096] In S614, the SDN cloud network decrypts the response message. The SDN cloud network can then restore its public IP and MAC addresses through decryption.
[0097] In S616, the response message is sent to the virtual machine.
[0098] Figure 7 This is a flowchart illustrating a VXLAN testing method for an SDN cloud network according to another exemplary embodiment. Figure 7 The process shown in step 70 is... Figure 6 A detailed description of the process shown.
[0099] like Figure 7 As shown in S702, the public network returns a response message to the test message.
[0100] In S704, the SDN cloud network encapsulates the response message and sends the encapsulated response message to the load balancing device through the second VXLAN tunnel.
[0101] More specifically, SDN encapsulates packets, while VXLAN encapsulates public network response data packets in UDP, uses the IP and MAC addresses of the SDN as the outer layer for encapsulation, adds the public network MAC address to the VXLAN MAC address table entry, and forwards it to the LB device through the second VXLAN tunnel.
[0102] In S706, the load balancer decapsulates the response message and then recapsulates it. The LB device decapsulates the message, learns the mapping from the inner MAC address to the outer IP address, decapsulates the message, and then encapsulates the MAC address of the SDN's VXLAN gateway into the second VXLAN tunnel.
[0103] In the S708, the load balancer will re-encapsulate the response message and send it to the SDN cloud network through the second VXLAN tunnel.
[0104] In the S710, the SDN cloud network decapsulates the response message and sends it to the virtual machine for functionality testing. Upon receiving the response message, the SDN decapsulates it, returns it to a public network data frame, and forwards it to the virtual machine.
[0105] According to the VXLAN testing method for SDN cloud networks in this application, a response message is returned to the test message via the public network; the SDN cloud network encapsulates the response message and sends the encapsulated response message to a load balancing device through a second VXLAN tunnel; the load balancing device decapsulates the response message and encapsulates it again; the load balancing device sends the re-encapsulated response message to the SDN cloud network through the second VXLAN tunnel; the SDN cloud network decapsulates the response message and sends it to a virtual machine for functional testing. This method allows for specifying routes for the SDN cloud network, establishing VXLAN tunnels between the hardware and software networks, and comprehensively verifying the functionality of software like SDN public clouds that are based on IP network interconnection.
[0106] It should be clearly understood that this application describes how specific examples are formed and used, but the principles of this application are not limited to any details of these examples. Rather, based on the teachings of the disclosure of this application, these principles can be applied to many other embodiments.
[0107] Those skilled in the art will understand that all or part of the steps of the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, it performs the functions defined by the method provided in this application. The program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.
[0108] Furthermore, it should be noted that the above figures are merely illustrative representations of the processes included in the method according to exemplary embodiments of this application, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0109] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0110] The following reference Figure 8 To describe an electronic device 800 according to this embodiment of the present application. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0111] like Figure 8 As shown, the electronic device 800 is presented in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, a bus 830 connecting different system components (including storage unit 820 and processing unit 810), a display unit 840, etc.
[0112] The storage unit stores program code that can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in this specification according to various exemplary embodiments of this application. For example, the processing unit 810 can perform actions such as... Figure 4 , Figure 5 , Figure 6 , Figure 7 The steps are shown in the figure.
[0113] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache storage unit 8202, and may further include a read-only memory unit (ROM) 8203.
[0114] The storage unit 820 may also include a program / utility 8204 having a set (at least one) program module 8205, such program module 8205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0115] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0116] Electronic device 800 can also communicate with one or more external devices 800' (e.g., keyboard, pointing device, Bluetooth device, etc.), enabling users to communicate with devices that interact with electronic device 800, and / or any device (e.g., router, modem, etc.) that allows electronic device 800 to communicate with one or more other computing devices. This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. Network adapter 860 can communicate with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0117] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software, or by combining software with necessary hardware. Therefore, as... Figure 9 As shown, the technical solution according to the embodiments of this application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.) or on a network, and includes several instructions to cause a computing device (such as a personal computer, server, or network device, etc.) to execute the above-described method according to the embodiments of this application.
[0118] In general, this disclosure also provides a VXLAN testing method for SDN cloud networks. The method first deploys a test environment where the public network, virtual machines, and SDN communicate via VLANs to ensure good network communication. VTEPs serve as the two ends of the VXLAN tunnel, establishing a VXLAN tunnel between the SDN and LB devices, with VNIs distributed at 30 and 40. When a virtual machine actively accesses the public network, the message passes through the SDN. The VXLAN encapsulates the data packet sent by the virtual machine in UDP, using the SDN's IP and MAC addresses as the outer layer. The virtual machine's MAC address is added to the MAC address table of the VXLAN tunnel, and the request message is sent from VNI 30 to the LB device. Upon receiving the request message, the LB learns the mapping from the inner MAC to the outer IP, decapsulates the message, then encapsulates the MAC address of the SDN's VXLAN gateway into the VXLAN tunnel and forwards it to the SDN through VNI 30. Upon receiving the request message forwarded by the LB device, the SDN decapsulates the message, restores the virtual machine's IP and MAC data frame, and forwards it to the public network, thus forwarding the request message. For the response message returned from the public network, SDN encapsulates the message, and VXLAN encapsulates the public network response data message in UDP, using the SDN's IP and MAC addresses as the outer layer of encapsulation. The public network MAC address is added to the VXLAN MAC address table entry, and the message is forwarded to the LB device via VNI40. The LB device decapsulates the message, learns the mapping from the inner MAC to the outer IP, decapsulates the message, and then encapsulates the MAC address of the SDN's VXLAN gateway into the VXLAN tunnel, forwarding it to SDN via the VXLAN tunnel VNI40. After receiving the response message, SDN decapsulates the message, restores the public cloud data frame, and forwards it to the virtual machine. In steps 3 and 6, the inner MAC encapsulation used by SDN is the LB device's MAC address, not the VXLAN gateway's MAC address. ARP learning fails, leading to forwarding anomalies on the LB device. Therefore, the VXLAN gateway MAC address of the SDN needs to be encapsulated into the VXLAN tunnel. Since SDN is based on IP network interconnection, a virtual VXLAN gateway MAC address of the SDN needs to be bound to the LB device, and the VXLAN gateway MAC address is associated with the VNI of the VXLAN tunnel. The LB device can then encapsulate the VXLAN gateway MAC address of the SDN and specify the next hop to the SDN, ensuring that the inner MAC address encapsulated by the SDN is from the LB device. This ensures that the ARP is successfully learned, guaranteeing that the LB device can forward request and response packets normally, and that the network can communicate.In both processes, the LB device binds a virtual VXLAN gateway MAC address of SDN and associates this VXLAN gateway MAC address with the VNI of the VXLAN tunnel. The LB device can then encapsulate the VXLAN gateway MAC address of SDN and specify the next hop to SDN. This ensures that the inner MAC address encapsulated by SDN is from the LB device, and that ARP is successfully learned, ensuring that the LB device can forward request and response packets normally, and that the network can communicate.
[0119] The software product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0120] The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0121] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0122] The aforementioned computer-readable medium carries one or more programs. When these programs are executed by a device, the computer-readable medium performs the following functions: deploying a test environment, which includes: a virtual machine, an SDN cloud network, a public network, and a load balancing device; controlling the virtual machine to send test packets to the public network; controlling the SDN cloud network to encapsulate the test packets and send the encapsulated test packets to the load balancing device through a first VXLAN tunnel; controlling the load balancing device to decapsulate the test packets and recapsulate them; controlling the load balancing device to send the recapsulated test packets to the SDN cloud network through the first VXLAN tunnel; and controlling the SDN cloud network to decapsulate the test packets and send them to the public network for functional testing.
[0123] The computer-readable medium can also perform the following functions: return a response message to the test message on the public network; control the SDN cloud network to encapsulate the response message and send the encapsulated response message to the load balancing device through a second VXLAN tunnel; control the load balancing device to decapsulate the response message and encapsulate it again; control the load balancing device to send the re-encapsulated response message to the SDN cloud network through the second VXLAN tunnel; control the SDN cloud network to decapsulate the response message and send it to the virtual machine for functional testing.
[0124] Those skilled in the art will understand that the above modules can be distributed in the device as described in the embodiments, or they can be modified to be uniquely different from one or more devices in this embodiment. The modules in the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.
[0125] Through the description of the above embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0126] Exemplary embodiments of this application have been specifically shown and described above. It should be understood that this application is not limited to the detailed structures, arrangements, or implementation methods described herein; rather, this application is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended claims.
Claims
1. A VXLAN testing method for SDN cloud networks, characterized in that, include: Deploy a test environment, which includes: virtual machines, an SDN cloud network, a public network, and a load balancer. Specifically, a first VXLAN tunnel and a second VXLAN tunnel are established between the SDN cloud network and the load balancer; a VLAN tunnel is established between the SDN cloud network and the virtual machines; a VLAN tunnel is established between the SDN cloud network and the public network; the binding relationship between the gateway MAC addresses and VNIs of the SDN cloud network and the first VXLAN tunnel is deployed on the load balancer; and the binding relationship between the gateway MAC addresses and VNIs of the SDN cloud network and the second VXLAN tunnel is deployed on the load balancer. The virtual machine sends a test message to the public network; The SDN cloud network encapsulates the test message and sends the encapsulated test message to the load balancing device through the first VXLAN tunnel. The load balancing device decapsulates the test message and then recapsulates it. The load balancing device will re-encapsulate the test packets and send them to the SDN cloud network through the first VXLAN tunnel; The SDN cloud network decrypts the test message and sends it to the public network to test its functionality.
2. The method as described in claim 1, characterized in that, Also includes: The public network returns a response message to the test message; The SDN cloud network encapsulates the response message and sends the encapsulated response message to the load balancing device through a second VXLAN tunnel. The load balancing device decapsulates the response message and then recapsulates it. The load balancing device will re-encapsulate the response message and send it to the SDN cloud network through the second VXLAN tunnel; The SDN cloud network decrypts the response message and sends it to the virtual machine to test its functionality.
3. The method as described in claim 1, characterized in that, The SDN cloud network encapsulates the test message and sends the encapsulated test message to the load balancing device through the first VXLAN tunnel, including: SDN cloud network encapsulates the test message in UDP; The IP and MAC addresses of the SDN cloud network are used as the outer layer for encapsulation; Add the virtual machine's MAC address to the MAC address table entry of the first VXLAN; The encapsulated test message is sent to the load balancer through the first VXLAN tunnel.
4. The method as described in claim 1, characterized in that, The load balancing device decapsulates the test packet and then recapsulates it, including: The load balancing device learns the mapping relationship between the inner MAC and outer IP in the test message; Deseal the test message; The IP and MAC addresses of the SDN cloud network are encapsulated into the first VXLAN tunnel.
5. The method as described in claim 2, characterized in that, The SDN cloud network encapsulates the response message and sends the encapsulated response message to the load balancing device through a second VXLAN tunnel, including: SDN cloud network encapsulates the response message in UDP; The IP and MAC addresses of the SDN cloud network are used as the outer layer for encapsulation; Add the public MAC address to the MAC address table entry of the second VXLAN; The encapsulated response message is sent to the load balancer via a second VXLAN tunnel.
6. The method as described in claim 2, characterized in that, The load balancing device decapsulates the response message and then recapsulates it, including: The load balancer learns the mapping relationship between the inner MAC address and the outer IP address in the response message; Deseal the response message; The IP and MAC addresses of the SDN cloud network are encapsulated into the second VXLAN tunnel.
7. A VXLAN testing system for SDN cloud networks, characterized in that, include: The deployment module is used to deploy a test environment, which includes: virtual machines, an SDN cloud network, a public network, and a load balancing device. Specifically, a first VXLAN tunnel and a second VXLAN tunnel are established between the SDN cloud network and the load balancing device; a VLAN tunnel is established between the SDN cloud network and the virtual machines; a VLAN tunnel is established between the SDN cloud network and the public network; the binding relationship between the gateway MAC addresses and VNIs of the SDN cloud network and the first VXLAN tunnel is deployed on the load balancing device; and the binding relationship between the gateway MAC addresses and VNIs of the SDN cloud network and the second VXLAN tunnel is deployed on the load balancing device. Virtual machine, used to send test messages to the public network; The SDN cloud network is used to encapsulate the test message and send the encapsulated test message to the load balancing device through the first VXLAN tunnel; and to decapsulate the test message from the load balancing device and send it to the public network for functional testing. A load balancing device is used to decapsulate the test packet and recapsulate it; the recapsulated test packet is sent to the SDN cloud network through the first VXLAN tunnel.
8. The system as described in claim 7, characterized in that, Also includes: The SDN cloud network is also used to obtain response messages from the public network; encapsulate the response messages and send the encapsulated response messages to the load balancing device through the second VXLAN tunnel; and decapsulate the response messages from the load balancing device and send them to the virtual machine. The load balancing device is also used to decapsulate the response message and recapsulate it; and send the recapsulated response message to the SDN cloud network through the second VXLAN tunnel. Virtual machines are also used to perform functional testing of the SDN cloud network via response messages.
Citation Information
Patent Citations
Communication system and method for physical host and virtual cloud host based on SDN
CN110519075A
Message forwarding method and device based on SDN and OVN, and medium
CN111800329A