Cloud communication method and device, computer equipment, readable storage medium and program product
By using Eip gateway network elements, external network switches and SDN controllers in the cloud communication system, the extraction of packet IP addresses and the configuration of target MAC addresses is solved, and the problem of overloading of external network switches when the cloud host accesses the external network is solved, ensuring that The normal access of cloud hosts and the normal operation of external network switches.
Patent Information
- Application Number
- CN202411781869.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-12-05
AI Technical Summary
In the prior art, the communication between the cloud host and the external network is too high due to the dynamic ARP matching process, and the CPU usage of the external network switch may not be processed successfully, resulting in the cloud host being unable to access the external network.
By introducing Eip gateway network elements, external network switches and SDN controllers in the cloud communication system, the extraction of packet IP addresses, routing information query and target MAC address configuration are realized, and dynamic ARP matching process is avoided, thereby reducing the external network switches CPU occupancy.
It effectively solves the problem of overloading of the external network switch when the cloud host accesses the external network, ensures that the cloud host can access the external network normally, and avoids additional load on the external network switch.
Smart Images

Figure CN119484466A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing, and in particular to a cloud communication method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] At present, Eip (Elastic IP Address) is usually bound to the cloud host to achieve communication between the cloud host and the external network. Specifically, when the cloud host binds Eip to access the external network, it is necessary to perform dynamic ARP (Address Resolution Protocol) matching on the IP address of the data packet to match the target MAC address, so as to achieve cloud host access to the external network.
[0003] However, the dynamic ARP matching process will send an ARP request to the external network switch. When the external network switch processes the ARP request, it needs to be processed by the CPU (Central Processing Unit) of the external network switch. It is easy for the external network switch to occupy a lot of CPU, causing the external network switch to be overloaded and unable to process successful ARP requests, resulting in the inability to realize the cloud host's access to the external network. Summary of the invention
[0004] Based on this, it is necessary to provide a cloud communication method, device, computer equipment, computer-readable storage medium and computer program product that can realize the access of the cloud host to the external network in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a cloud communication method, which is applied to a cloud communication system, wherein the cloud communication system includes an Eip gateway network element, an external network switch, and an SDN controller; including:
[0006] If the Eip gateway network element detects a cloud host data packet bound to the cloud host, the IP address in the cloud host data packet is extracted by the Eip gateway network element to obtain the data packet IP address;
[0007] According to the IP address of the data packet, query the routing information in the routing IP address set of the Eip gateway network element to obtain the target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element;
[0008] According to the target IP address, an address query is performed in the static address set of the Eip gateway network element to obtain a target MAC address, wherein the static address set is obtained by configuring the SDN controller for the external network switch;
[0009] The target MAC address is configured on the external network port of the external network switch through the SDN controller.
[0010] In one of the embodiments, according to the target IP address, before performing an address query in the static address of the Eip gateway network element to obtain the target MAC address, the method also includes: configuring a switch IP address and a switch MAC address for the external network switch through the SDN controller, and configuring an Eip routing IP address for the Eip gateway network element through the SDN controller; sending the switch IP address, the switch MAC address and the Eip routing IP address to the Eip gateway network element through the SDN controller, and sending the switch IP address and the switch MAC address to the external network switch through the SDN controller.
[0011] In one embodiment, configuring a switch IP address for the external network switch and configuring an Eip routing IP address for the Eip gateway network element include: obtaining an external network switching segment corresponding to the external network switch, obtaining an Eip switching segment corresponding to the Eip gateway network element, and obtaining multiple idle network segments; selecting a first network segment that does not overlap with the external network switching segment from the multiple idle network segments, and selecting a second network segment that does not overlap with the Eip switching segment from the multiple idle network segments; randomly selecting a switch IP address from the first network segment, and randomly selecting an Eip routing IP address from the second network segment.
[0012] In one of the embodiments, after the switch IP address, the switch MAC address and the Eip routing IP address are sent to the Eip gateway network element by the SDN controller, the method further includes: configuring the static address table entry corresponding to the external network switch by the Eip gateway network element according to the received switch IP address and the switch MAC address; updating the static address set corresponding to the Eip gateway network element by the Eip gateway network element according to the static address table entry, and updating the routing IP address set corresponding to the Eip gateway network element by the Eip gateway network element according to the received Eip routing IP address.
[0013] In one of the embodiments, after the SDN controller configures the switch IP address and the switch MAC address of the external network switch and sends them to the external network switch, the method further includes: obtaining a preset configuration protocol through the SDN controller; and configuring the switch IP address and the switch MAC address on the loopback port of the external network switch according to the preset configuration protocol through the SDN controller.
[0014] In one of the embodiments, the method further includes: when the IP address of the data packet does not match the routing IP address set of the Eip gateway network element, sending address mismatch indication information to the cloud host through the Eip gateway network element.
[0015] In a second aspect, the present application further provides a cloud communication device, which is applied to a cloud communication system, wherein the cloud communication system includes an Eip gateway network element, an external network switch and an SDN controller; including:
[0016] An extraction module is used to extract the IP address in the cloud host data packet through the Eip gateway network element to obtain the data packet IP address if the Eip gateway network element detects the cloud host data packet bound to the cloud host;
[0017] A first query module is used to query routing information in a routing IP address set of the Eip gateway network element according to the IP address of the data packet to obtain a target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element;
[0018] A second query module is used to perform an address query in the static address set of the Eip gateway network element according to the target IP address to obtain a target MAC address, wherein the static address set is obtained by the SDN controller configuring the external network switch;
[0019] A configuration module is used to configure the target MAC address on the external network port of the external network switch through the SDN controller.
[0020] In one of the embodiments, according to the target IP address, before performing an address query in the static address of the Eip gateway network element to obtain the target MAC address, the device also includes a configuration module, which is used to configure the switch IP address and the switch MAC address for the external network switch through the SDN controller, and configure the Eip routing IP address for the Eip gateway network element through the SDN controller; send the switch IP address, the switch MAC address and the Eip routing IP address to the Eip gateway network element through the SDN controller, and send the switch IP address and the switch MAC address to the external network switch through the SDN controller.
[0021] In one of the embodiments, the configuration module is further used to obtain the external network switching segment corresponding to the external network switch, obtain the Eip switching segment corresponding to the Eip gateway network element, and obtain multiple idle segments; select a first segment that does not overlap with the external network switching segment from the multiple idle segments, and select a second segment that does not overlap with the Eip switching segment from the multiple idle segments; randomly select a switch IP address from the first segment, and randomly select an Eip routing IP address from the second segment.
[0022] In one of the embodiments, after the switch IP address, the switch MAC address and the Eip routing IP address are sent to the Eip gateway network element through the SDN controller, the device also includes: an updating module, which is used to configure the static address table entry corresponding to the external network switch through the Eip gateway network element according to the received switch IP address and the switch MAC address; update the static address set corresponding to the Eip gateway network element through the Eip gateway network element according to the static address table entry, and update the routing IP address set corresponding to the Eip gateway network element through the Eip gateway network element according to the received Eip routing IP address.
[0023] In one of the embodiments, after the switch IP address and the switch MAC address of the external network switch are configured and sent to the external network switch through the SDN controller, the configuration module is also used to obtain a preset configuration protocol through the SDN controller; and configure the switch IP address and the switch MAC address on the loopback port of the external network switch through the SDN controller according to the preset configuration protocol.
[0024] In one of the embodiments, the device also includes: a sending module, which is used to send address mismatch indication information to the cloud host through the Eip gateway network element when the IP address of the data packet does not match the routing IP address set of the Eip gateway network element.
[0025] In a third aspect, the present application further provides a computer device, which is applied to a cloud communication system, wherein the cloud communication system includes an Eip gateway network element, an external network switch, and an SDN controller; and includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0026] If the Eip gateway network element detects a cloud host data packet bound to the cloud host, the IP address in the cloud host data packet is extracted by the Eip gateway network element to obtain the data packet IP address;
[0027] According to the IP address of the data packet, query the routing information in the routing IP address set of the Eip gateway network element to obtain the target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element;
[0028] According to the target IP address, an address query is performed in the static address set of the Eip gateway network element to obtain a target MAC address, wherein the static address set is obtained by configuring the SDN controller for the external network switch;
[0029] The target MAC address is configured on the external network port of the external network switch through the SDN controller.
[0030] In a fourth aspect, the present application further provides a computer-readable storage medium, which is applied to a cloud communication system, wherein the cloud communication system includes an Eip gateway network element, an external network switch, and an SDN controller; a computer program is stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0031] If the Eip gateway network element detects a cloud host data packet bound to the cloud host, the IP address in the cloud host data packet is extracted by the Eip gateway network element to obtain the data packet IP address;
[0032] According to the IP address of the data packet, query the routing information in the routing IP address set of the Eip gateway network element to obtain the target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element;
[0033] According to the target IP address, an address query is performed in the static address set of the Eip gateway network element to obtain a target MAC address, wherein the static address set is obtained by configuring the SDN controller for the external network switch;
[0034] The target MAC address is configured on the external network port of the external network switch through the SDN controller.
[0035] In a fifth aspect, the present application further provides a computer program product, which is applied to a cloud communication system, wherein the cloud communication system includes an Eip gateway network element, an external network switch, and an SDN controller; and includes a computer program, which implements the following steps when executed by a processor:
[0036] If the Eip gateway network element detects a cloud host data packet bound to the cloud host, the IP address in the cloud host data packet is extracted by the Eip gateway network element to obtain the data packet IP address;
[0037] According to the IP address of the data packet, query the routing information in the routing IP address set of the Eip gateway network element to obtain the target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element;
[0038] According to the target IP address, an address query is performed in the static address set of the Eip gateway network element to obtain a target MAC address, wherein the static address set is obtained by configuring the SDN controller for the external network switch;
[0039] The target MAC address is configured on the external network port of the external network switch through the SDN controller.
[0040] The above-mentioned cloud communication method, apparatus, computer equipment, computer-readable storage medium and computer program product are applied to a cloud communication system, wherein the cloud communication system includes an Eip gateway network element, an external network switch and an SDN controller; if the Eip gateway network element detects a cloud host data packet bound to a cloud host, the IP address in the cloud host data packet is extracted by the Eip gateway network element to obtain the data packet IP address; according to the data packet IP address, a routing information query is performed in the routing IP address set of the Eip gateway network element to obtain a target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element; according to the target IP address, an address query is performed in the static address set of the Eip gateway network element to obtain a target MAC address, wherein the static address set is configured by the SDN controller for the Eip gateway network element. The SDN controller is configured for the external network switch; the target MAC address is configured on the external network port of the external network switch by the SDN controller. In this solution, both the static address set and the routing IP address set are configured by the SDN controller for the external network switch. Therefore, there will be no situation where the data packet IP address matches the routing IP address set corresponding to the Eip gateway network element, while the target IP address matched in the routing IP address set does not match the static address set. Moreover, the static address set is a static matching process, so the process of sending an ARP request to the external network switch will not be triggered. Therefore, when the data packet IP address matches the routing IP address set corresponding to the Eip gateway network element, the query of the target MAC address can be realized, that is, it is guaranteed that the cloud host can access the external network without affecting the normal operation of the external network switch. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 An application environment diagram of a cloud communication method in an embodiment;
[0043] Figure 2 A schematic diagram of a flow chart of a cloud communication method in one embodiment;
[0044] Figure 3 A flowchart of the steps of configuring the switch IP address, Eip routing IP address and switch MAC address through the SDN controller in one embodiment;
[0045] Figure 4 is a structural block diagram of a cloud communication device in one embodiment;
[0046] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] It should be noted that the information and data involved in this application (including but not limited to data for analysis, data for storage, data for display, etc.) are all information and data authorized by the user or fully authorized by all parties, and the acquisition, transmission, storage, use and processing of relevant data are in compliance with the relevant provisions of national laws and regulations. For content pushed to users (for example, target MAC address, etc.), users can refuse or conveniently refuse content push, etc. In the embodiments of this application, some existing solutions in the industry such as certain software, components, models, etc. may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0049] The cloud communication method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The cloud communication system includes an Eip gateway network element, an external network switch and an SDN controller, which are deployed on the server 104. If the Eip gateway network element of the server 104 detects a cloud host data packet bound to the cloud host, the IP address in the cloud host data packet is extracted through the Eip gateway network element to obtain the data packet IP address; according to the data packet IP address, the routing information is queried in the routing IP address set of the Eip gateway network element to obtain the target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element; according to the target IP address, the address is queried in the static address set of the Eip gateway network element to obtain the target MAC address, wherein the static address set is configured by the SDN controller for the external network switch; the target MAC address is configured on the external network port of the external network switch through the SDN controller. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0050] In an exemplary embodiment, Figure 2 As shown, a cloud communication method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 202 to 208. Among them:
[0051] Step 202: If the Eip gateway network element detects a cloud host data packet bound to the cloud host, the IP address in the cloud host data packet is extracted by the Eip gateway network element to obtain the data packet IP address.
[0052] Among them, in the cloud communication system of step 202, the Eip gateway network element communicates with the external network switch and the SDN controller respectively, and the cloud host accesses the external network switch, that is, the external network, through the Eip gateway network element.
[0053] Exemplarily, the IP address in the cloud host data packet is extracted through the Eip gateway network element to obtain the data packet IP address, including: extracting the message five-tuple information of the cloud host data packet through the Eip gateway network element to obtain message extraction information, and extracting the IP address in the message extraction information through the Eip gateway network element to obtain the data packet IP address.
[0054] The message extraction information includes at least one of SIP (Session Initialization Protocol) information, sport (source IP address), DIP (Destination Internet Protocol) information and dport (destination IP address).
[0055] Further, the IP address in the message extraction information is extracted by the Eip gateway network element to obtain the data packet IP address, including: determining the source IP address in the message extraction information as the data packet IP address by the Eip gateway network element.
[0056] Step 204: According to the IP address of the data packet, a routing information query is performed in the routing IP address set of the Eip gateway network element to obtain the target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element.
[0057] The routing IP address set consists of at least one IP address that is allowed to access the Eip gateway network element, and the routing IP address set can be a routing table.
[0058] Exemplarily, step 204 includes: querying a target IP address that matches the IP address of the data packet from a set of routing IP addresses of the EIP gateway network element.
[0059] As an embodiment, querying the target IP address matching the data packet IP address from the routing IP address set of the Eip gateway network element includes: querying the target IP address belonging to the same network segment as the data packet IP address from the routing IP address set of the Eip gateway network element.
[0060] It is understandable that there may be an Eip gateway network element that does not have an IP address that matches the IP address corresponding to the cloud host, that is, the IP address used by the cloud host does not have permission to access the Eip gateway network element. At this time, the routing IP address set of the Eip gateway network element does not contain a target IP address that matches the IP address of the data packet.
[0061] Optionally, as an embodiment, the method further includes: when the IP address of the data packet does not match the routing IP address set of the Eip gateway network element, sending address mismatch indication information to the cloud host through the Eip gateway network element.
[0062] In this way, the data packet IP address does not match the routing IP address set of the Eip gateway network element. The cloud host can receive the address mismatch indication information in time and then proceed to the next step. For example, the cloud host changes the data packet IP address of the cloud host data packet and then resends the cloud host data packet to the Eip gateway network element.
[0063] Step 206: According to the target IP address, an address query is performed in the static address set of the Eip gateway network element to obtain the target MAC address, wherein the static address set is obtained by configuring the SDN controller for the external network switch.
[0064] The static address set includes the correspondence between the configured IP address and the configured MAC address corresponding to the external network switch, and the static address set may be an ARP table.
[0065] Exemplarily, step 206 includes: querying from the static address set of the Eip gateway network element, the target configuration IP address whose corresponding configuration IP address matches the target IP address, and determining the configuration MAC address corresponding to the target configuration IP address in the static address set of the Eip gateway network element as the target MAC address.
[0066] Further, as an embodiment, querying from the static address set of the Eip gateway network element, the target configuration IP address whose corresponding configuration IP address matches the target IP address includes: obtaining the similarity between the target IP address and each configuration IP address in the static address set of the Eip gateway network element, and querying from the static address set of the Eip gateway network element, the target configuration IP address whose corresponding similarity is greater than a preset similarity threshold.
[0067] As another embodiment, the target configuration IP address corresponding to the configuration IP address that matches the target IP address is queried from the static address set of the Eip gateway network element, including: the target configuration IP address corresponding to the configuration IP address that belongs to the same network segment as the target IP address is queried from the static address set of the Eip gateway network element.
[0068] Step 208: configure the target MAC address on the external network port of the external network switch through the SDN controller.
[0069] Exemplarily, step 208 includes: generating target MAC address configuration data according to the target MAC address through the SDN controller, and configuring the target MAC address configuration data on the external network port of the external network switch through the SDN controller.
[0070] As an embodiment, the target MAC address configuration data is generated according to the target MAC address by the SDN controller, including: obtaining a preset configuration protocol through the SDN controller, and generating the target MAC address configuration data according to the preset configuration protocol and the target MAC address, wherein the preset configuration protocol can be a Netconf (Network Configuration Protocol) protocol.
[0071] As an embodiment, the target MAC address configuration data is configured at the external network port of the external network switch through the SDN controller, including: storing the target MAC address configuration data at the external network port of the external network switch through the SDN controller, or sending the target MAC address configuration data to the external network switch through the SDN controller, so that when the external network switch receives the target MAC address configuration data sent by the SDN controller, the target MAC address configuration data is stored in the external network port.
[0072] The above cloud communication method is applied to a cloud communication system, which includes an Eip gateway network element, an external network switch and an SDN controller; if the Eip gateway network element detects a cloud host data packet bound to a cloud host, the IP address in the cloud host data packet is extracted by the Eip gateway network element to obtain the data packet IP address; according to the data packet IP address, a routing information query is performed in the routing IP address set of the Eip gateway network element to obtain the target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element; according to the target IP address, an address query is performed in the static address set of the Eip gateway network element to obtain the target MAC address, wherein the static address set is configured by the SDN controller for the external network switch; by The SDN controller configures the target MAC address on the external network port of the external network switch. In this solution, the static address set and the routing IP address set are configured by the SDN controller for the external network switch. Therefore, there will be no situation where the packet IP address matches the routing IP address set corresponding to the Eip gateway network element, while the target IP address matched in the routing IP address set does not match the static address set. The static address set is a static matching process, so it will not trigger the process of sending an ARP request to the external network switch. Therefore, when the packet IP address matches the routing IP address set corresponding to the Eip gateway network element, the query of the target MAC address can be realized, that is, it is guaranteed that the cloud host can access the external network without affecting the normal operation of the external network switch.
[0073] In an exemplary embodiment, Figure 3 As shown, a method for accurately configuring the switch IP address, Eip routing IP address and switch MAC address is provided. According to the target IP address, the static address of the Eip gateway network element is centrally queried. Before obtaining the target MAC address, the method further includes steps 302 to 304. Among them:
[0074] Step 302: configure the switch IP address and switch MAC address for the external network switch through the SDN controller, and configure the Eip routing IP address for the Eip gateway network element through the SDN controller.
[0075] Exemplarily, step 302 includes: obtaining an external network switching segment corresponding to an external network switch through an SDN controller, obtaining an Eip switching segment corresponding to an Eip gateway network element through an SDN controller, and obtaining multiple idle segments through an SDN controller; selecting a first segment that does not overlap with the external network switching segment from multiple idle segments through an SDN controller, and selecting a second segment that does not overlap with the Eip switching segment from multiple idle segments through an SDN controller; selecting a switch IP address from the first segment through an SDN controller, and selecting an Eip routing IP address from the second segment through an SDN controller.
[0076] The number of first network segments may be single or multiple, and the number of second network segments may be single or multiple, which is not limited here.
[0077] It can be understood that both the external network switching segment and the Eip switching segment belong to the public switching segment. Further, as an embodiment, a first segment that does not overlap with the external network switching segment is selected from multiple idle segments, and a second segment that does not overlap with the Eip switching segment is selected from multiple idle segments, including: selecting a first segment and a second segment belonging to a private switching segment from multiple idle segments.
[0078] In this way, since the external network switching segment and the Eip switching segment usually belong to the public switching segment, by selecting the idle segment belonging to the private switching segment as the first segment and the second segment, it can be achieved that the first segment does not overlap with the external network switching segment, and the second segment does not overlap with the Eip switching segment, thereby improving the selection efficiency of the first segment and the second segment.
[0079] In this way, the SDN controller configures IP addresses in the idle network segments of the private switching network segments for the Eip gateway network element and the external network switch, reducing the traffic occupation of the external network switching network segment and the Eip switching network segment belonging to the public switching network segment, ensuring that public communication can proceed smoothly.
[0080] Further, as an embodiment, selecting a switch IP address from the first network segment and selecting an Eip routing IP address from the second network segment includes: randomly selecting a switch IP address from the first network segment and randomly selecting an Eip routing IP address from the second network segment.
[0081] It is understandable that when the switch IP address is randomly selected from the first network segment and the Eip routing IP address is randomly selected from the second network segment, the first network segment may overlap with the second network segment or may not overlap.
[0082] Taking into account the possibility of overlap between the first network segment and the second network segment, in order to avoid repeated configuration of IP addresses, as an embodiment, a switch IP address is selected from the first network segment, and an Eip routing IP address is selected from the second network segment, including: randomly selecting a switch IP address from the first network segment, and selecting an Eip routing IP address that is different from the switch IP address from the second network segment.
[0083] As another embodiment, selecting a switch IP address from the first network segment and selecting an Eip routing IP address from the second network segment includes: randomly selecting an Eip routing IP address from the second network segment and selecting a switch IP address different from the Eip routing IP address from the first network segment.
[0084] Step 304: Send the switch IP address, switch MAC address and Eip routing IP address to the Eip gateway network element through the SDN controller, and send the switch IP address and switch MAC address to the external network switch through the SDN controller.
[0085] In this way, it is ensured that the Eip gateway network element can configure the Eip routing IP address configured by the SDN controller, and that the external network switch can configure the switch IP address and switch MAC address configured by the SDN controller, thereby ensuring that when the subsequent cloud host uses the communication data packet adapted to the Eip routing IP address and the switch IP address, the cloud host can access the external network switch, that is, the cloud host can access the external network.
[0086] Optionally, as an embodiment, after the switch IP address, switch MAC address and Eip routing IP address are sent to the Eip gateway network element through the SDN controller, the method also includes: configuring the static address table entry corresponding to the external network switch through the Eip gateway network element according to the received switch IP address and switch MAC address; updating the static address set corresponding to the Eip gateway network element through the Eip gateway network element according to the static address table entry, and updating the routing IP address set corresponding to the Eip gateway network element through the Eip gateway network element according to the received Eip routing IP address.
[0087] As an embodiment, the Eip gateway network element configures the static address table entry corresponding to the external network switch according to the received switch IP address and switch MAC address, including: the Eip gateway network element matches the received switch IP address and switch MAC address to obtain the static address table entry corresponding to the external network switch.
[0088] Optionally, as an embodiment, after the switch IP address and the switch MAC address of the external network switch are configured and sent to the external network switch through the SDN controller, the method also includes: obtaining a preset configuration protocol through the SDN controller; and configuring the switch IP address and the switch MAC address on the loopback port of the external network switch according to the preset configuration protocol through the SDN controller.
[0089] The preset configuration protocol may be the Netconf protocol.
[0090] Further, the switch IP address and the switch MAC address are configured at the loopback port of the external network switch according to a preset configuration protocol through the SDN controller, including: generating switch IP address configuration data through the SDN controller according to the preset configuration protocol and the switch IP address, and generating switch MAC address configuration data through the SDN controller according to the preset configuration protocol and the switch MAC address; configuring the switch IP address configuration data and the switch MAC address configuration data at the loopback port of the external network switch through the SDN controller.
[0091] As an embodiment, configuring the switch IP address configuration data and the switch MAC address configuration data on the loopback port of the external network switch through the SDN controller includes: storing the switch IP address configuration data and the switch MAC address configuration data on the loopback port of the external network switch through the SDN controller, or sending the switch IP address configuration data and the switch MAC address configuration data to the external network switch through the SDN controller, so that when the external network switch receives the switch IP address configuration data and the switch MAC address configuration data sent by the SDN controller, the switch IP address configuration data and the switch MAC address configuration data are stored in the loopback port.
[0092] In this embodiment, the SDN controller configures the switch IP address and the switch MAC address for the external network switch, and the SDN controller configures the Eip routing IP address for the Eip gateway network element; the SDN controller sends the switch IP address, the switch MAC address and the Eip routing IP address to the Eip gateway network element, and the SDN controller sends the switch IP address and the switch MAC address to the external network switch, thereby realizing accurate address allocation of the SDN controller to the external network switch and the Eip gateway network element, so that the cloud host can access the external network during subsequent communication.
[0093] As a detailed embodiment, if the Eip gateway network element detects a cloud host data packet bound to the cloud host, the IP address in the cloud host data packet is extracted through the Eip gateway network element to obtain the data packet IP address; the external network switching segment corresponding to the external network switch is obtained through the SDN controller, the Eip switching segment corresponding to the Eip gateway network element is obtained, and multiple idle network segments are obtained; the first network segment that does not overlap with the external network switching segment is selected from the multiple idle network segments through the SDN controller, and the second network segment that does not overlap with the Eip switching segment is selected from the multiple idle network segments; the switch IP address is randomly selected from the first network segment through the SDN controller, and the Eip routing IP address is randomly selected from the second network segment; the switch IP address, the switch MAC address and the Eip routing IP address are sent to the Eip gateway network element through the SDN controller, and the switch IP address and the switch MAC address are sent to the external network switch through the SDN controller.
[0094] Further, the Eip gateway network element configures the static address table item corresponding to the external network switch according to the received switch IP address and switch MAC address; the Eip gateway network element updates the static address set corresponding to the Eip gateway network element according to the static address table item, and the Eip gateway network element updates the routing IP address set corresponding to the Eip gateway network element according to the received Eip routing IP address; the SDN controller obtains the preset configuration protocol; the SDN controller configures the switch IP address and the switch MAC address on the loopback port of the external network switch according to the preset configuration protocol; when the IP address of the data packet does not match the routing IP address set of the Eip gateway network element In the case of a match, an address mismatch indication message is sent to the cloud host through the Eip gateway network element; in the case that the IP address of the data packet matches the routing IP address set of the Eip gateway network element, a routing information query is performed in the routing IP address set of the Eip gateway network element according to the IP address of the data packet to obtain the target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element; according to the target IP address, an address query is performed in the static address set of the Eip gateway network element to obtain the target MAC address, wherein the static address set is configured by the SDN controller for the external network switch; the target MAC address is configured on the external network port of the external network switch through the SDN controller.
[0095] In this way, in this solution, both the static address set and the routing IP address set are configured by the SDN controller for the external network switch. Therefore, there will be no situation where the data packet IP address matches the routing IP address set corresponding to the Eip gateway network element, while the target IP address matched in the routing IP address set does not match the static address set. The static address set is a static matching process, so it will not trigger the process of sending an ARP request to the external network switch. Therefore, when the data packet IP address matches the routing IP address set corresponding to the Eip gateway network element, the query of the target MAC address can be realized, that is, it is guaranteed that the cloud host can access the external network without affecting the normal operation of the external network switch.
[0096] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0097] Based on the same inventive concept, the embodiment of the present application also provides a cloud communication device for implementing the cloud communication method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more cloud communication device embodiments provided below can refer to the limitations on the cloud communication method above, and will not be repeated here.
[0098] In an exemplary embodiment, Figure 4 As shown, a cloud communication device 400 is provided, comprising: an extraction module 402, a first query module 404, a second query module 406 and a configuration module 408, wherein:
[0099] The extraction module 402 is used to extract the IP address in the cloud host data packet through the Eip gateway network element to obtain the data packet IP address if the Eip gateway network element detects the cloud host data packet bound to the cloud host;
[0100] The first query module 404 is used to query the routing information in the routing IP address set of the Eip gateway network element according to the IP address of the data packet to obtain the target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element;
[0101] The second query module 406 is used to perform an address query in the static address set of the Eip gateway network element according to the target IP address to obtain a target MAC address, wherein the static address set is obtained by the SDN controller configuring the external network switch;
[0102] The configuration module 408 is used to configure the target MAC address on the external network port of the external network switch through the SDN controller.
[0103] In one of the embodiments, according to the target IP address, an address query is performed centrally on the static address of the Eip gateway network element, and before the target MAC address is obtained, a configuration module is used to configure the switch IP address and the switch MAC address for the external network switch through the SDN controller, and to configure the Eip routing IP address for the Eip gateway network element through the SDN controller; the switch IP address, the switch MAC address and the Eip routing IP address are sent to the Eip gateway network element through the SDN controller, and the switch IP address and the switch MAC address are sent to the external network switch through the SDN controller.
[0104] In one of the embodiments, the configuration module is further used to obtain the external network switching segment corresponding to the external network switch, obtain the Eip switching segment corresponding to the Eip gateway network element, and obtain multiple idle network segments; select a first network segment that does not overlap with the external network switching segment from the multiple idle network segments, and select a second network segment that does not overlap with the Eip switching segment from the multiple idle network segments; randomly select a switch IP address from the first network segment, and randomly select an Eip routing IP address from the second network segment.
[0105] In one of the embodiments, after the switch IP address, switch MAC address and Eip routing IP address are sent to the Eip gateway network element through the SDN controller, the device also includes: an update module, which is used to configure the static address table entry corresponding to the external network switch through the Eip gateway network element according to the received switch IP address and switch MAC address; update the static address set corresponding to the Eip gateway network element through the Eip gateway network element according to the static address table entry, and update the routing IP address set corresponding to the Eip gateway network element through the Eip gateway network element according to the received Eip routing IP address.
[0106] In one of the embodiments, after the switch IP address and the switch MAC address of the external network switch are configured and sent to the external network switch through the SDN controller, the configuration module is also used to obtain a preset configuration protocol through the SDN controller; and configure the switch IP address and the switch MAC address on the loopback port of the external network switch according to the preset configuration protocol through the SDN controller.
[0107] In one of the embodiments, the device also includes: a sending module, which is used to send address mismatch indication information to the cloud host through the Eip gateway network element when the IP address of the data packet does not match the routing IP address set of the Eip gateway network element.
[0108] Each module in the above cloud communication device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0109] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a cloud communication method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0110] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0111] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0112] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0113] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0114] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0115] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0116] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A cloud communication method, characterized in that: Applied to a cloud communication system, the cloud communication system includes an Eip gateway network element, an external network switch and an SDN controller; the method includes: If the Eip gateway network element detects a cloud host data packet bound to the cloud host, the IP address in the cloud host data packet is extracted by the Eip gateway network element to obtain the data packet IP address; According to the IP address of the data packet, query the routing information in the routing IP address set of the Eip gateway network element to obtain the target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element; According to the target IP address, an address query is performed in the static address set of the Eip gateway network element to obtain a target MAC address, wherein the static address set is obtained by configuring the SDN controller for the external network switch; The target MAC address is configured on the external network port of the external network switch through the SDN controller.
2. The method according to claim 1, characterized in that Before performing an address query in the static address set of the Eip gateway network element according to the target IP address to obtain the target MAC address, the method further includes: The SDN controller configures a switch IP address and a switch MAC address for the external network switch, and the SDN controller configures an Eip routing IP address for the Eip gateway network element; The switch IP address, the switch MAC address and the Eip routing IP address are sent to the Eip gateway network element through the SDN controller, and the switch IP address and the switch MAC address are sent to the external network switch through the SDN controller.
3. The method according to claim 2, characterized in that Configuring a switch IP address for the external network switch and configuring an EIP routing IP address for the EIP gateway network element include: Obtain the external network switching segment corresponding to the external network switch, obtain the Eip switching segment corresponding to the Eip gateway network element, and obtain multiple idle segments; Selecting a first network segment that does not overlap with the external network switching network segment from the multiple idle network segments, and selecting a second network segment that does not overlap with the Eip switching network segment from the multiple idle network segments; A switch IP address is randomly selected from the first network segment, and an Eip routing IP address is randomly selected from the second network segment.
4. The method according to claim 2, characterized in that: After sending the switch IP address, the switch MAC address and the Eip routing IP address to the Eip gateway network element through the SDN controller, the method further includes: The Eip gateway network element configures the static address table entry corresponding to the external network switch according to the received switch IP address and switch MAC address; The Eip gateway network element updates the static address set corresponding to the Eip gateway network element according to the static address table entry, and the Eip gateway network element updates the routing IP address set corresponding to the Eip gateway network element according to the received Eip routing IP address.
5. The method according to claim 2, characterized in that: After the SDN controller configures the switch IP address and the switch MAC address of the external network switch and sends them to the external network switch, the method further includes: Obtaining a preset configuration protocol through the SDN controller; The switch IP address and the switch MAC address are configured on the loopback port of the external network switch through the SDN controller according to the preset configuration protocol.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: In the case where the IP address of the data packet does not match the routing IP address set of the Eip gateway network element, address mismatch indication information is sent to the cloud host through the Eip gateway network element.
7. A cloud communication device, characterized in that: Applied to a cloud communication system, the cloud communication system includes an Eip gateway network element, an external network switch and an SDN controller; the device includes: An extraction module is used to extract the IP address in the cloud host data packet through the Eip gateway network element to obtain the data packet IP address if the Eip gateway network element detects a cloud host data packet bound to the cloud host; A first query module is used to query routing information in a routing IP address set of the Eip gateway network element according to the IP address of the data packet to obtain a target IP address, wherein the routing IP address set is configured by the SDN controller for the Eip gateway network element; A second query module is used to perform an address query in the static address set of the Eip gateway network element according to the target IP address to obtain a target MAC address, wherein the static address set is obtained by the SDN controller configuring the external network switch; A configuration module is used to configure the target MAC address on the external network port of the external network switch through the SDN controller.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A 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 method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method, device and system for central address control
CN101188510A
Communication method, switch, controller and communication system
CN104202266A
Message forwarding method and device applied to SDN
CN105591925A
Method, system for accessing external network by virtual network, and SDN controller
CN108600415A