Communication tunnel creation method and device, equipment and storage medium

By receiving VXLAN messages in the cloud gateway and searching or creating VXLAN tunnels in the hash table, the problem of message discarding caused by source IP changes is solved, and correct parsing and efficient forwarding of messages are achieved.

CN118802410APending Publication Date: 2024-10-18CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311064878.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-23
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Due to the change in source IP, the user's VXLAN tunnel cannot be resolved, causing the cloud gateway to be unable to correctly process messages sent by the user, causing the messages to be discarded.

Method used

By receiving VXLAN packets from the virtual extended LAN, the target virtual network identifier is obtained, and the VXLAN tunnel is searched or created in the hash table, and the IP address and routing information are updated to ensure that the packets are forwarded correctly.

Benefits of technology

It achieves real-time updating of changing source IPs and correct parsing and forwarding of messages, improves the forwarding efficiency and accuracy of messages, and avoids message discarding due to the inability to parse the VXLAN tunnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802410A_ABST
    Figure CN118802410A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and provides a communication tunnel creation method and device, equipment and a storage medium. The method comprises the following steps: receiving a VXLAN (Virtual Extensible Local Area Network) message; based on the VXLAN message, obtaining a target virtual network identifier; searching the target virtual network identifier from a set hash table, and if the target virtual network identifier is not searched, creating a VXLAN tunnel; the set hash table is created by taking a virtual network identifier as an index value. According to the embodiment of the invention, the message is adopted to trigger the creation of the VXLAN tunnel, the situation that the VXLAN message is discarded in the cloud gateway due to the fact that the VXLAN tunnel cannot be analyzed due to the change of the source IP of the user is avoided, and on the basis, the message can be analyzed and forwarded in time, so that the forwarding efficiency and forwarding accuracy of the message are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication tunnel creation method, device, equipment and storage medium. Background Art

[0002] In order to meet the requirements for computing network infrastructure construction, the solution adopted is to deploy the cloud gateway as a network element after the BRAS (Broadband Remote Access Server) in the provincial or municipal computer room. Figure 2 As shown, the network architecture uses VXLAN (Virtual Extensible Local Area Network) tunnels to terminate user messages. Each white box gateway, namely ONU (Optical Network Unit) will create a unique VXLAN tunnel with the cloud gateway. Among them, the source IP of the ONU encapsulated VXLAN tunnel is obtained based on PPPOE (Point-to-Point Protocol Over Ethernet), which is allocated by BRAS. For a single ONU, this IP is not fixed. At the same time, the user's upstream VXLAN message, the outer layer message will be SNAT (Source Network Address Translation) processed by BRAS, and randomly NAT (Network Address Translation) into an IP in the address pool. In addition, if the ONU is restarted, BRAS will randomly assign a new PPPOE IP to the ONU, and the new IP will be SNATed into another IP when passing through BRAS.

[0003] The above reasons will cause the source IP of the user's VXLAN tunnel to change continuously. That is, the source IP of the same user's message will change after it reaches the cloud gateway. However, the cloud gateway's management platform cannot be notified of the change of the source IP (because BRAS cannot be controlled by the management platform). The VXLAN tunnel configuration on the cloud gateway side cannot be obtained and issued, resulting in the message sent by the user being discarded at the cloud gateway because the VXLAN tunnel cannot be parsed. Summary of the invention

[0004] The embodiments of the present application provide a communication tunnel creation method, apparatus, device and storage medium to solve the problem that data packets are discarded at the cloud gateway because the VXLAN tunnel cannot be parsed due to changes in the source IP.

[0005] In a first aspect, an embodiment of the present application provides a communication tunnel creation method, including:

[0006] Receive virtual extended local area network VXLAN messages;

[0007] Based on the VXLAN message, obtaining a target virtual network identifier;

[0008] The target virtual network identifier is searched from a set hash table. If the target virtual network identifier is not found, a VXLAN tunnel is created; the set hash table is created with the virtual network identifier as an index value.

[0009] In one embodiment, after searching the target virtual network identifier from the set hash table, the method further includes:

[0010] If the target virtual network identifier is found, obtaining the first IP address associated with the target virtual network identifier from the set hash table;

[0011] If the first IP address is different from the second IP address carried by the VXLAN message, the first IP address associated with the target virtual network identifier is updated to the second IP address.

[0012] In one embodiment, if the first IP address is different from the second IP address carried by the VXLAN message, after updating the first IP address associated with the target virtual network identifier to the second IP address, the method further includes:

[0013] updating routing information based on a destination IP address of the second IP address;

[0014] The VXLAN message is forwarded based on the updated routing information.

[0015] In one embodiment, creating the set hash table includes:

[0016] The virtual network identifier is used as an index value, and mapping information between the virtual network identifier and tunnel information is determined to obtain the set hash table.

[0017] In one embodiment, creating a VXLAN tunnel includes:

[0018] Configure tunnel parameters of the VXLAN tunnel;

[0019] Based on the tunnel parameters, create the VXLAN tunnel.

[0020] In one embodiment, after creating the VXLAN tunnel, the method further includes:

[0021] Obtain mapping information between the target virtual network identifier and the tunnel information of the VXLAN tunnel;

[0022] The target virtual network identifier, the tunnel information, and the mapping information are added to the set hash table.

[0023] In one embodiment, obtaining a target virtual network identifier based on the VXLAN message includes:

[0024] Obtaining header information of the VXLAN message;

[0025] The target virtual network identifier is obtained from the virtual network identifier field of the header information.

[0026] In a second aspect, an embodiment of the present application provides a communication tunnel creation device, including:

[0027] A receiving module, used for receiving a virtual extended local area network VXLAN message;

[0028] An acquisition module, configured to acquire a target virtual network identifier based on the VXLAN message;

[0029] A creation module is used to search for the target virtual network identifier from a set hash table, and if the target virtual network identifier is not found, create a VXLAN tunnel; the set hash table is created with the virtual network identifier as an index value.

[0030] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the program, the steps of the communication tunnel creation method described in the first aspect are implemented.

[0031] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the communication tunnel creation method described in the first aspect are implemented.

[0032] The communication tunnel creation method, device, equipment and storage medium provided in the embodiment of the present application receive a virtual extended local area network VXLAN message; based on the VXLAN message, obtain the target virtual network identifier; search the target virtual network identifier from the set hash table, and if the target virtual network identifier is not found, create a VXLAN tunnel; the set hash table is created with the virtual network identifier as the index value. The embodiment of the present application uses a message to trigger the creation of a VXLAN tunnel to avoid the VXLAN message being discarded at the cloud gateway because the VXLAN tunnel cannot be resolved due to the change of the user's source IP. Based on this, the message can be parsed and forwarded in time, thereby improving the forwarding efficiency and forwarding accuracy of the message. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 This is one of the flow diagrams of the communication tunnel creation method provided in the embodiment of the present application;

[0035] Figure 2 This is a schematic diagram of the network architecture based on cloud gateway communication;

[0036] Figure 3 This is the second flow chart of the communication tunnel creation method provided in the embodiment of the present application;

[0037] Figure 4 It is a structural diagram of a communication tunnel creation device provided in an embodiment of the present application;

[0038] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0040] Figure 1 This is one of the flow diagrams of the communication tunnel creation method provided in the embodiment of the present application. Figure 1 , the embodiment of the present application provides a communication tunnel creation method, which may include:

[0041] Step 100, receiving a virtual extended local area network VXLAN message;

[0042] The execution subject of the embodiment of the present application is a cloud gateway. The cloud gateway receives a virtual extended local area network VXLAN message.

[0043] Among them, VXLAN message is a network encapsulation protocol used for virtualization in data center networks. It is designed to solve the problems of scale, flattening and virtual machine migration in traditional Ethernet networks. VXLAN message encapsulates the original Ethernet frame in a UDP (User Datagram Protocol) packet. Through UDP-based encapsulation, virtual network traffic can be transmitted across physical networks on existing network infrastructure. VXLAN uses a 24-bit virtual network identifier to identify different virtual networks.

[0044] Step 200, obtaining a target virtual network identifier based on the VXLAN message;

[0045] It should be noted that the virtual network identifier VNI (VXLAN Network Identifier) ​​is an identifier of a VXLAN tunnel, which is used to uniquely identify different VXLAN tunnels. Among them, the target virtual network identifier refers to the VNI carried by the currently received VXLAN message, which is used to identify the virtual network to which the VXLAN message belongs.

[0046] After receiving the VXLAN message, the cloud gateway parses the VXLAN message to obtain the target virtual network identifier. Specifically, the header information of the VXLAN message is obtained, and then the target virtual network identifier is obtained from the virtual network identifier field of the header information. For example, the header information of the VXLAN message is read, and then the VNI field is searched or extracted in the header information of the VXLAN message, and finally the target VNI is obtained from the VNI field.

[0047] Step 300, searching the target virtual network identifier from a set hash table, and if the target virtual network identifier is not found, creating a VXLAN tunnel; the set hash table is created using the virtual network identifier as an index value.

[0048] It should be noted that a VXLAN tunnel refers to a channel in a VXLAN network that transmits data packets encapsulated with VXLAN messages on the underlying network. A VXLAN tunnel is used to transmit data traffic between virtual machines from one physical network to another, allowing virtual machines to communicate in an environment across physical networks.

[0049] The cloud gateway stores a hash table created with the virtual network identifier as the index value. The embodiment of the present application utilizes the unique characteristic of each user's VNI to create a hash table with VNI as the unique key value, and the creation steps are as follows: use the virtual network identifier as the index value, and determine the mapping information between the virtual network identifier and the tunnel information to obtain the set hash table. For example, create an empty hash table or dictionary structure, and then use VNI as the key and the tunnel information mapped to it as the value, and store it in the empty hash table or dictionary structure. Among them, the tunnel information includes the interface index, the next node after decapsulation, the tunnel protocol, the tunnel source and destination IP addresses, the tunnel routing information, the tunnel encryption algorithm, the tunnel bandwidth limitation information, etc.

[0050] After the cloud gateway obtains the target virtual network identifier from the VXLAN message, it searches for the target virtual network identifier in the set hash table. If the target virtual network identifier is not found, it means that the target virtual network identifier is a newly appeared VNI. At this time, a VXLAN tunnel is created if necessary.

[0051] Specifically, configure the tunnel parameters of the VXLAN tunnel and create the VXLAN tunnel based on the tunnel parameters. For example, you can call the interface to create a VXLAN tunnel in the following two ways:

[0052] (1) Create a VXLAN tunnel using the command line interface of a network device: Connect to the command line interface of a network device, such as a switch or router; enter the configuration mode of the device or the corresponding VXLAN tunnel configuration mode; use commands to create a VXLAN tunnel and set related tunnel parameters, such as VNI, source IP address, destination IP address, etc.; map the VXLAN tunnel to the corresponding port or logical sub-interface.

[0053] (2) Use the management interface of the network device or network management software: Log in to the management interface of the network device or network management software, such as the web interface of the network switch or the SDN controller; find the relevant options for VXLAN configuration or tunnel configuration; add a new VXLAN tunnel configuration and fill in the relevant tunnel parameters, such as VNI, source IP address, destination IP address, etc.; save and apply the configuration to make it effective.

[0054] The communication tunnel creation method provided in the embodiment of the present application receives a virtual extended local area network VXLAN message; based on the VXLAN message, obtains a target virtual network identifier; searches for the target virtual network identifier from a set hash table, and creates a VXLAN tunnel if the target virtual network identifier is not found; the set hash table is created with the virtual network identifier as an index value. The embodiment of the present application uses a message to trigger the creation of a VXLAN tunnel to avoid the VXLAN message being discarded at the cloud gateway because the VXLAN tunnel cannot be parsed due to a change in the user's source IP. Based on this, the message can be parsed and forwarded in a timely manner, thereby improving the forwarding efficiency and forwarding accuracy of the message.

[0055] Based on the above embodiment, after searching the target virtual network identifier from the set hash table, the method further includes:

[0056] Step 310: if the target virtual network identifier is found, obtaining the first IP address associated with the target virtual network identifier from the set hash table;

[0057] Step 320: If the first IP address is different from the second IP address carried by the VXLAN message, the first IP address associated with the target virtual network identifier is updated to the second IP address.

[0058] It should be noted that the first IP address and the second IP address both include a source IP address and a destination IP address, wherein the source IP address refers to the IP address of the sender of the VXLAN message, that is, the source IP address of the original data packet that sends the VXLAN message; the destination IP address refers to the IP address of the receiver of the VXLAN message, that is, the IP address of the device that is about to receive and process the VXLAN message.

[0059] The cloud gateway can extract the source IP address and destination IP address of the VXLAN message by parsing the tunnel header of the VXLAN message. For example, the source IP address and destination IP address fields are searched or extracted from the header information of the VXLAN message.

[0060] If the target virtual network identifier is found in the set hash table, the tunnel information associated with the target virtual network identifier is obtained from the set hash table, and then the first IP address is obtained from the tunnel information, and the first IP address is compared with the second IP address carried by the VXLAN message. If the first IP address is different from the second IP address, that is, the source IP address and destination IP address corresponding to the two IP addresses are different, then the IP address information in the hash table needs to be updated, that is, the first IP address associated with the target virtual network identifier is updated to the second IP address.

[0061] Furthermore, since the IP address has changed, in order to ensure that the downlink message can be correctly encapsulated and forwarded, the routing information of the destination IP needs to be updated. Specifically, the routing information is updated based on the destination IP address of the second IP address, and then the VXLAN message is forwarded based on the updated routing information. For example, the corresponding routing table entry is updated on the network device (such as a router, switch, etc.), and the destination IP is associated with the correct outbound interface so that the message can be forwarded to the correct target address.

[0062] In the embodiment of the present application, when the IP address changes, timely updating of the IP address in the hash table can ensure that the network is connected to the correct target and avoid connecting to the wrong device or user; at the same time, the correct ANI-associated IP address can ensure that network traffic is correctly routed and delivered, reducing the possibility of network delays and packet loss, thereby improving network performance and user experience. On the other hand, after the IP address changes, timely updating of routing information can ensure that downlink messages can be correctly encapsulated and forwarded, improving the forwarding efficiency of messages.

[0063] Based on the above embodiment, after creating the VXLAN tunnel, the process further includes:

[0064] Step 330, obtaining mapping information between the target virtual network identifier and the tunnel information of the VXLAN tunnel;

[0065] Step 340: Add the target virtual network identifier, the tunnel information, and the mapping information to the set hash table.

[0066] After creating a new VXLAN tunnel, it is also necessary to add the VNI and tunnel information corresponding to the new VXLAN tunnel to the hash table, and determine the routing information of the VXLAN tunnel. Specifically, obtain the mapping information of the target virtual network identifier and the tunnel information of the VXLAN tunnel, and then add the target virtual network identifier, tunnel information and mapping information to the set hash table.

[0067] For example, based on the target virtual network identifier, a new VNI mapping is added to the hash table, with the target virtual network identifier as the key and its corresponding tunnel information as the value, and then the target virtual network identifier, tunnel information and mapping information are added to the set hash table.

[0068] The embodiment of the present application timely adds the new VNI mapping to the hash table. When the VNI needs to be searched or used, it can be quickly accessed directly through the key value, thereby improving the search efficiency. At the same time, it can ensure the normal forwarding of VXLAN messages and improve the message forwarding efficiency.

[0069] In order to further analyze and explain the communication tunnel creation method proposed in this application, refer to Figure 3 And the following examples.

[0070] As shown in Table 1, after the white-box gateway goes online, the broadband access server BRAS allocates the IP address 172.10.0.1 for the first time. The white-box gateway uses this as the source IP to create a VXLAN tunnel. After the upstream source address is converted by the BRAS, the source IP becomes 10.10.10.1. After the white-box gateway is restarted for some reason, the PPPOE IP allocated by the BRAS becomes 172.10.0.2. At this time, the source address of the message is converted to 10.10.10.2 after passing through the BRAS.

[0071] Table 1

[0072]

[0073] As can be seen from Table 1, the source IP of the same user's message will change after it reaches the cloud gateway. However, the management platform of the cloud gateway cannot be notified of the change of the source IP (because BRAS cannot be controlled by the management platform), and the VXLAN tunnel configuration on the cloud gateway side cannot be obtained and issued, resulting in the message sent by the user being discarded at the cloud gateway because the VXLAN tunnel cannot be parsed.

[0074] The creation of traditional VXLAN tunnels is triggered by configuration, that is, the management platform issues commands through the interface to create them, which is called active VXLAN. In the cloud gateway scenario, since the source IP of VXLAN cannot be notified to the management platform, active VXLAN cannot meet the needs of this scenario. Based on this, the embodiment of the present application proposes a passive VXLAN, that is, the creation and modification of VXLAN tunnels are triggered by messages, and a VXLAN data table is created with VNI as the index. Even if the user's source IP changes, the cloud gateway can update the user's VXLAN tunnel configuration in time after receiving the message to ensure the correct forwarding of the message.

[0075] In an embodiment of the present application, the cloud gateway uses a high-performance forwarding framework VPP (Vector Packet Processing) as the forwarding plane, and utilizes the flexible and programmable characteristics of the VPP forwarding node to transform the VXLAN module so that it is compatible with the traditional mode of creating tunnels by issuing commands through the control plane. At the same time, it has the ability to automatically trigger tunnel creation and modification through VXLAN messages on the forwarding plane, thereby supporting cloud gateway scenarios.

[0076] The native VXLAN module of VPP creates a new hash map with VNI and source and destination IP as key values ​​when creating a tunnel. After receiving the VXLAN message, it extracts the VNI and IP information in the message header and combines them into a key to compare and search the existing hash table. The VNI and source and destination IP must be consistent before the VXLAN message can be decapsulated and processed further. If the VNI is the same, but the source IP has changed, this message will be discarded according to the original processing logic. The embodiment of the present application uses the unique characteristic of each user's VNI to create a hash table with VNI as the unique key value. For the VXLAN message received by the cloud gateway, as long as the value of the VNI is legal, the message can be decapsulated, and the source and destination IP is no longer a fixed value but can be changed.

[0077] For the cloud gateway management platform, there is no need to send VXLAN tunnel configuration to the cloud gateway. Instead, the cloud gateway forwarding plane automatically creates the tunnel. Figure 3 , the passive VXLAN processing flow is as follows:

[0078] Step 1: After receiving the VXLAN message, the cloud gateway parses the tunnel header to obtain the VNI and source and destination IP information;

[0079] Step 2: The cloud gateway stores a hash table with VNI as the key value, which contains the mapping relationship between VNI and tunnel information. The VNI is used as the key value to search in the hash table.

[0080] Step 3: If the entry corresponding to the VNI is found, further compare the received message with the IP stored in the VXLAN structure. If they are the same, no further processing is required and the VXLAN message is directly decapsulated. If they are not the same, the latest source and destination IP is updated to the structure of the VXLAN tunnel, and the routing information to the destination IP is updated at the same time to ensure that the message of the same user can be correctly encapsulated and forwarded when it is downlink.

[0081] If the hash mapping of the VNI is not found, a hash mapping is created with the VNI as the key value and the tunnel information as the value and added to the table, and the interface is called to create the corresponding VXLAN tunnel.

[0082] It should be noted that the implementation of the cloud gateway based on the VXLAN tunnel provides necessary and sufficient conditions. If the cloud gateway needs to be deployed on a large scale, a stable and reliable forwarding plane is required to cope with the large traffic of users. The embodiment of the present application is modified on the forwarding platform to provide forwarding plane support for the cloud deployment of the home gateway.

[0083] The embodiment of the present application proposes a passive VXLAN solution, which uses messages to trigger the creation and modification of VXLAN tunnels, subverting the traditional VXLAN command line configuration method, and avoiding the situation where VXLAN messages are discarded at the cloud gateway because the VXLAN tunnel cannot be parsed due to changes in the user's source IP. By creating a tunnel through passive VXLAN, messages can be parsed and forwarded in a timely manner, thereby improving the forwarding efficiency and forwarding accuracy of messages. On the other hand, by utilizing the high-performance forwarding capabilities and flexible and programmable features of VPP, combined with the improved VXLAN module, it can better adapt to the needs of cloud gateway scenarios. At the same time, automated VXLAN tunnel management reduces the workload and risk of errors of manual operations, and improves the reliability and scalability of the network.

[0084] The communication tunnel creation device provided in an embodiment of the present application is described below. The communication tunnel creation device described below and the communication tunnel creation method described above can be referenced to each other.

[0085] refer to Figure 4 , Figure 4 It is a structural diagram of a communication tunnel creation device provided in an embodiment of the present application. The communication tunnel creation device provided in an embodiment of the present application includes a receiving module 401, an acquisition module 402 and a creation module 403.

[0086] The receiving module 401 is used to receive a virtual extended local area network VXLAN message;

[0087] An acquisition module 402 is used to acquire a target virtual network identifier based on the VXLAN message;

[0088] The creation module 403 is used to search for the target virtual network identifier from the set hash table, and if the target virtual network identifier is not found, create a VXLAN tunnel; the set hash table is created with the virtual network identifier as the index value.

[0089] The communication tunnel creation device provided in the embodiment of the present application receives a virtual extended local area network VXLAN message; based on the VXLAN message, obtains a target virtual network identifier; searches for the target virtual network identifier from a set hash table, and creates a VXLAN tunnel if the target virtual network identifier is not found; the set hash table is created with the virtual network identifier as an index value. The embodiment of the present application uses a message to trigger the creation of a VXLAN tunnel to avoid the VXLAN message being discarded at the cloud gateway because the VXLAN tunnel cannot be resolved due to a change in the user's source IP. Based on this, the message can be parsed and forwarded in a timely manner, thereby improving the forwarding efficiency and forwarding accuracy of the message.

[0090] In one embodiment, the creation module 403 is further used to:

[0091] If the target virtual network identifier is found, obtaining the first IP address associated with the target virtual network identifier from the set hash table;

[0092] If the first IP address is different from the second IP address carried by the VXLAN message, the first IP address associated with the target virtual network identifier is updated to the second IP address.

[0093] In one embodiment, the creation module 403 is further used to:

[0094] updating routing information based on a destination IP address of the second IP address;

[0095] The VXLAN message is forwarded based on the updated routing information.

[0096] In one embodiment, the creation module 403 is further used to:

[0097] The virtual network identifier is used as an index value, and mapping information between the virtual network identifier and tunnel information is determined to obtain the set hash table.

[0098] In one embodiment, the creation module 403 is specifically used to:

[0099] Configure tunnel parameters of the VXLAN tunnel;

[0100] Based on the tunnel parameters, create the VXLAN tunnel.

[0101] In one embodiment, the creation module 403 is further used to:

[0102] Obtain mapping information between the target virtual network identifier and the tunnel information of the VXLAN tunnel;

[0103] The target virtual network identifier, the tunnel information, and the mapping information are added to the set hash table.

[0104] In one embodiment, the acquisition module 402 is specifically used for:

[0105] Obtaining header information of the VXLAN message;

[0106] The target virtual network identifier is obtained from the virtual network identifier field of the header information.

[0107] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call a computer program in the memory 530 to execute the steps of the communication tunnel creation method, for example, including:

[0108] Receive virtual extended local area network VXLAN messages;

[0109] Based on the VXLAN message, obtaining a target virtual network identifier;

[0110] The target virtual network identifier is searched from a set hash table. If the target virtual network identifier is not found, a VXLAN tunnel is created; the set hash table is created with the virtual network identifier as an index value.

[0111] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0112] On the other hand, an embodiment of the present application further provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the communication tunnel creation method provided in the above embodiments are implemented, for example, including:

[0113] Receive virtual extended local area network VXLAN messages;

[0114] Based on the VXLAN message, obtaining a target virtual network identifier;

[0115] The target virtual network identifier is searched from a set hash table. If the target virtual network identifier is not found, a VXLAN tunnel is created; the set hash table is created with the virtual network identifier as an index value.

[0116] On the other hand, an embodiment of the present application further provides a computer program product, the computer program product including a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can perform the steps of the communication tunnel creation method provided in the above embodiments, for example, including:

[0117] Receive virtual extended local area network VXLAN messages;

[0118] Based on the VXLAN message, obtaining a target virtual network identifier;

[0119] The target virtual network identifier is searched from a set hash table. If the target virtual network identifier is not found, a VXLAN tunnel is created; the set hash table is created with the virtual network identifier as an index value.

[0120] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0121] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A communication tunnel creation method, characterized in that: include: Receive virtual extended local area network VXLAN messages; Based on the VXLAN message, obtaining a target virtual network identifier; The target virtual network identifier is searched from a set hash table. If the target virtual network identifier is not found, a VXLAN tunnel is created; the set hash table is created with the virtual network identifier as an index value.

2. The communication tunnel creation method according to claim 1, characterized in that: After searching the target virtual network identifier from the set hash table, the method further includes: If the target virtual network identifier is found, obtaining the first IP address associated with the target virtual network identifier from the set hash table; If the first IP address is different from the second IP address carried by the VXLAN message, the first IP address associated with the target virtual network identifier is updated to the second IP address.

3. The communication tunnel creation method according to claim 2, characterized in that: If the first IP address is different from the second IP address carried by the VXLAN message, after updating the first IP address associated with the target virtual network identifier to the second IP address, the method further includes: updating routing information based on a destination IP address of the second IP address; The VXLAN message is forwarded based on the updated routing information.

4. The communication tunnel creation method according to claim 1, characterized in that: Create a hash table of the settings, including: The virtual network identifier is used as an index value, and mapping information between the virtual network identifier and tunnel information is determined to obtain the set hash table.

5. The communication tunnel creation method according to claim 1, characterized in that: The step of creating a VXLAN tunnel includes: Configure tunnel parameters of the VXLAN tunnel; Based on the tunnel parameters, create the VXLAN tunnel.

6. The communication tunnel creation method according to claim 1, characterized in that: After the VXLAN tunnel is created, the following steps are also included: Obtain mapping information between the target virtual network identifier and the tunnel information of the VXLAN tunnel; The target virtual network identifier, the tunnel information, and the mapping information are added to the set hash table.

7. The communication tunnel creation method according to claim 1, characterized in that: The acquiring, based on the VXLAN message, a target virtual network identifier, includes: Obtaining header information of the VXLAN message; The target virtual network identifier is obtained from the virtual network identifier field of the header information.

8. A communication tunnel creation device, characterized in that: include: A receiving module, used for receiving a virtual extended local area network VXLAN message; An acquisition module, configured to acquire a target virtual network identifier based on the VXLAN message; A creation module is used to search for the target virtual network identifier from a set hash table, and if the target virtual network identifier is not found, create a VXLAN tunnel; the set hash table is created with the virtual network identifier as an index value.

9. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the steps of the communication tunnel creation method according to any one of claims 1 to 7 are implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the communication tunnel creation method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Creation method, device and equipment of switch tunnel, medium and product

    CN119052088A

  • Message sending method and electronic equipment

    CN121547412A