Disclosure of Invention
In view of the foregoing, it is desirable to provide a subnet access public network method, apparatus, computer device, and storage medium that can improve performance.
In a first aspect, the present application provides a method for accessing a public network by using a subnet, which is applied to a first routing node, and includes:
Acquiring subnet route information sent by a cloud computing management platform;
Reissuing the subnet route information to a second routing node based on the border gateway protocol, such that the second routing node forwards the subnet route information to the physical switch based on the open shortest path first protocol, and adds the subnet route information to the switch route table via the physical switch;
the second routing node and the first routing node are deployed in the same intermediate forwarding platform.
In one embodiment, reissuing subnet routing information to a second routing node based on a border gateway protocol includes:
converting the routing information corresponding to the border gateway protocol in the subnet routing information into the routing information of the open shortest path first protocol based on the border gateway protocol;
adding the routing information corresponding to the open shortest path first protocol to a first routing table of the first routing node, and
And the border gateway protocol corresponding routing information is used for updating a second routing table of the second routing node.
In one embodiment, the method further comprises:
Under the condition that the switch routing table of the physical switch is successfully added with the subnet routing information, acquiring flow data sent by the cloud computing management platform;
And forwarding the traffic data to the second routing node so that the second routing node forwards the traffic data to the public network via the physical switch.
In a second aspect, the present application provides a method for accessing a public network by using a subnet, which is applied to a second routing node, and the method includes:
acquiring subnet route information of a cloud computing management platform reissued by a first routing node based on a border gateway protocol, wherein the first routing node and a second routing node are in the same intermediate forwarding platform;
Based on the open shortest path first protocol, the subnet routing information is forwarded to the physical switch such that the physical switch adds the subnet routing information to the switch routing table.
In one embodiment, during the re-distribution process, the method further comprises:
acquiring route information corresponding to a border gateway protocol sent by a first route node;
and adding the routing information corresponding to the border gateway protocol to a second routing table of the second routing node.
In one embodiment, the method further comprises:
The method comprises the steps of obtaining flow data of a cloud computing management platform forwarded by a first routing node, wherein the flow data is forwarded by the first routing node under the condition that a switch routing table of a physical switch adds subnet routing information successfully;
And forwarding the traffic data to the physical switch so that the physical switch forwards the traffic data to the public network.
In a third aspect, the present application further provides a subnet access public network device, applied to a first routing node, including:
the information acquisition module is used for acquiring the subnet route information sent by the cloud computing management platform;
The information forwarding module is used for reissuing the subnet route information to the second routing node based on the border gateway protocol, so that the second routing node forwards the subnet route information to the physical switch based on the open shortest path first protocol, and adds the subnet route information to the switch routing table through the physical switch;
the second routing node and the first routing node are deployed in the same intermediate forwarding platform.
In a fourth aspect, the present application further provides a subnet access public network device, applied to a second routing node, including:
the information receiving module is used for acquiring the subnet route information of the cloud computing management platform reissued by the first routing node based on the border gateway protocol, wherein the first routing node and the second routing node are in the same intermediate forwarding platform;
and the information adding module is used for forwarding the subnet route information to the physical switch based on the open shortest path first protocol so that the physical switch adds the subnet route information to the switch route table.
In a fifth aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
Acquiring subnet route information sent by a cloud computing management platform;
Reissuing the subnet route information to a second routing node based on the border gateway protocol, such that the second routing node forwards the subnet route information to the physical switch based on the open shortest path first protocol, and adds the subnet route information to the switch route table via the physical switch;
the second routing node and the first routing node are deployed in the same intermediate forwarding platform.
In a sixth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Acquiring subnet route information sent by a cloud computing management platform;
Reissuing the subnet route information to a second routing node based on the border gateway protocol, such that the second routing node forwards the subnet route information to the physical switch based on the open shortest path first protocol, and adds the subnet route information to the switch route table via the physical switch;
the second routing node and the first routing node are deployed in the same intermediate forwarding platform.
In a seventh aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
Acquiring subnet route information sent by a cloud computing management platform;
Reissuing the subnet route information to a second routing node based on the border gateway protocol, such that the second routing node forwards the subnet route information to the physical switch based on the open shortest path first protocol, and adds the subnet route information to the switch route table via the physical switch;
the second routing node and the first routing node are deployed in the same intermediate forwarding platform.
The method, the device, the computer equipment and the storage medium for accessing the public network are used for acquiring the subnet route information sent by the cloud computing management platform, reissuing the subnet route information to a second routing node based on a border gateway protocol, so that the second routing node forwards the subnet route information to a physical switch based on an open shortest path first protocol, and adds the subnet route information to a switch route table through the physical switch, wherein the second routing node and the first routing node are deployed in the same intermediate forwarding platform. In the embodiment, the access of the subnetwork to the public network in the cloud computing management platform can be realized without large-scale modification of the existing cloud computing management platform, so that the overload condition of the neighbor table in the physical switch caused by the increase of the traffic is effectively prevented, and the overall performance is improved.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The method for accessing the public network by the subnet provided by the embodiment of the application can be applied to an application environment shown in figure 1. The cloud computing management platform 11 is used for acquiring subnet route information and flow data transmitted by a Virtual machine, the Virtual machine is used for managing and scheduling Virtual machine instances, distributing subnets (such as internet protocol version 6 and IPv 6) to the Virtual machine, realizing internal network communication, creating and managing a Virtual network, a Virtual Router (Virtual Router) is responsible for flow forwarding between the Virtual machine and an external network, the first routing node is used for establishing boundary gateway protocol (Border Gateway Protocol, BGP) connection with a Virtual Router in the cloud computing management platform and receiving the subnet route information from the cloud computing management platform, and the second routing node is used for establishing Open Shortest path first protocol (Open Shortest path first PATH FIRST, OSPF) connection with a physical switch and announcing IPv6 subnet route information to the physical switch. The first routing node 101 acquires the subnet route information sent by the cloud computing management platform 11, reissues the subnet route information to the second routing node based on the border gateway protocol, so that the second routing node 102 forwards the subnet route information to the physical switch 12 based on the open shortest path first protocol, and adds the subnet route information to the switch route table via the physical switch 103.
In an exemplary embodiment, as shown in fig. 2, a subnet access public network method is provided, and the method is applied to the first routing node 101 in fig. 1 for illustration, and includes the following steps 201 to 202. Wherein:
step 201, acquiring subnet route information sent by a cloud computing management platform.
The cloud computing management platform creates a subnet, distributes the subnet to virtual machine instances, ensures that each virtual machine has a unique subnet address, establishes connection with a first routing node in the intermediate forwarding platform based on a border gateway protocol, sends subnet route information to the first routing node, and obtains the subnet route information sent by the cloud computing management platform.
It should be noted that, the cloud computing management platform may introduce a dynamic routing (Neutron Dynamic Routing) component, and establish a connection with a first routing node in the intermediate forwarding platform through the border gateway protocol.
Step 202, reissuing the subnet route information to the second routing node based on the border gateway protocol, such that the second routing node forwards the subnet route information to the physical switch based on the open shortest path first protocol, and adds the subnet route information to the switch routing table via the physical switch.
The second routing node and the first routing node are deployed in the same intermediate forwarding platform. The intermediate forwarding platform reduces occupation of a neighbor table of the switch by centrally managing conversion between a border gateway protocol and an open shortest path priority protocol, and prevents network performance bottlenecks and faults caused by overlarge capacity of the neighbor table.
In one embodiment, an open shortest path first protocol is configured on a second routing node, an OSPF connection is established between the port on the second routing node and a physical switch, and the first routing node reissues sub-network routing information received by a border gateway protocol to the second routing node to realize conversion of the routing protocol, and then forwards the sub-network routing information to a public network through the physical switch to realize direct access of passive address conversion (SNAT).
In another embodiment, the reissuing of the subnet route information to the second routing node based on the border gateway protocol includes converting border gateway protocol corresponding route information in the subnet route information to open shortest path first protocol route information based on the border gateway protocol, adding the open shortest path first protocol corresponding route information to a first routing table of the first routing node, and transmitting the border gateway protocol corresponding route information and the subnet route information to the second routing node. The method has the advantages that the number of virtual machines directly connected with the physical switch is reduced, so that occupation of neighbor tables in the physical switch is reduced, and network faults caused by overload of the neighbor tables are avoided.
The border gateway protocol corresponds to the routing information and is used for updating a second routing table of the second routing node.
Specifically, the routing information corresponding to the border gateway protocol in the subnet routing information is converted into the routing information of the open shortest path first protocol through the border gateway protocol, the routing information corresponding to the open shortest path first protocol is added into a first routing table of a first routing node, and meanwhile, the routing information corresponding to the border gateway protocol and the subnet routing information are sent to a second routing node.
It should be noted that, in this embodiment, the traffic data sent by the cloud computing management platform may be obtained when the addition of the subnet route information in the switch route table of the physical switch is successful, and the traffic data is forwarded to the second routing node, so that the second routing node forwards the traffic data to the public network through the physical switch.
Specifically, under the condition that the addition of the subnet route information to the switch route table of the physical switch is successful, the data transmission between the virtual machine and the physical switch can be successfully completed, so that the cloud computing management platform acquires the flow data sent by the virtual machine and sends the flow data to the first routing node, the first routing node receives the flow data sent by the cloud computing management platform, forwards the flow data to the second routing node, and the second routing node forwards the flow data to the public network through the physical switch.
The subnet access public network method comprises the steps of obtaining subnet route information sent by a cloud computing management platform, reissuing the subnet route information to a second routing node based on a border gateway protocol, forwarding the subnet route information to a physical switch based on an open shortest path first protocol, and adding the subnet route information to a switch route table through the physical switch, wherein the second routing node and the first routing node are deployed in the same intermediate forwarding platform. In the embodiment, the access of the subnetwork to the public network in the cloud computing management platform can be realized without large-scale modification of the existing cloud computing management platform, so that the overload condition of the neighbor table in the physical switch caused by the increase of the traffic is effectively prevented, and the overall performance is improved.
In an exemplary embodiment, as shown in fig. 3, a subnet access public network method is provided, and the method is applied to the first routing node 101 in fig. 1 for illustration, and includes the following steps 301 to 302. Wherein:
step 301, acquiring subnet route information of a cloud computing management platform reissued by a first routing node based on a border gateway protocol.
In one embodiment, a first routing node reissues subnet route information of a cloud computing management platform to a second routing node based on a border gateway protocol, the second routing node receiving the subnet route information.
In another embodiment, the routing information corresponding to the border gateway protocol sent by the first routing node is obtained, and the routing information corresponding to the border gateway protocol is added to a second routing table of the second routing node.
The first routing node receives the routing information corresponding to the border gateway protocol and the subnet routing information, and adds the routing information corresponding to the border gateway protocol to a second routing table of the second routing node.
Step 302, forwarding the subnet routing information to the physical switch based on the open shortest path first protocol, such that the physical switch adds the subnet routing information to the switch routing table.
Specifically, the second routing node forwards the subnet route information to the physical switch through the open shortest path first protocol, and the physical switch adds the subnet route information to the switch route table.
The method includes the steps of obtaining flow data of a cloud computing management platform forwarded by a first routing node, and forwarding the flow data to a physical switch so that the physical switch forwards the flow data to a public network.
The method comprises the steps that flow data are forwarded by a first routing node under the condition that subnet routing information is successfully added in a switch routing table of a physical switch;
the method comprises the steps that a first routing node forwards traffic data of a cloud computing management platform to a second routing node, the second routing node receives the traffic data, the traffic data is forwarded to a physical switch, and the physical switch forwards the traffic data to a public network.
The subnet access public network method comprises the steps of obtaining subnet route information of a cloud computing management platform reissued by a first routing node based on a border gateway protocol, forwarding the subnet route information to a physical switch based on an open shortest path first protocol in the same intermediate forwarding platform of the first routing node and a second routing node, and enabling the physical switch to add the subnet route information to a switch route table. In the embodiment, the access of the subnetwork to the public network in the cloud computing management platform can be realized without large-scale modification of the existing cloud computing management platform, so that the overload condition of the neighbor table in the physical switch caused by the increase of the traffic is effectively prevented, and the overall performance is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a subnet access public network device for realizing the above related subnet access public network method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the subnet access public network device provided below may refer to the limitation of the subnet access public network method described above, and will not be repeated herein.
In an exemplary embodiment, as shown in fig. 4, there is provided a subnet access public network device, including an information acquiring module 10 and an information forwarding module 11, wherein:
The information acquisition module 10 is used for acquiring the subnet route information sent by the cloud computing management platform;
An information forwarding module 11, configured to reissue the subnet route information to the second routing node based on the border gateway protocol, so that the second routing node forwards the subnet route information to the physical switch based on the open shortest path first protocol, and adds the subnet route information to the switch routing table via the physical switch;
the second routing node and the first routing node are deployed in the same intermediate forwarding platform.
In one embodiment, the information forwarding module 11 is further configured to convert the routing information corresponding to the border gateway protocol in the subnet routing information into the routing information of the open shortest path first protocol based on the border gateway protocol, add the routing information corresponding to the open shortest path first protocol to the first routing table of the first routing node, send the routing information corresponding to the border gateway protocol and the subnet routing information to the second routing node, and update the second routing table of the second routing node with the routing information corresponding to the border gateway protocol.
In one embodiment, the subnet access public network device is further configured to obtain the traffic data sent by the cloud computing management platform when the addition of the subnet routing information in the switch routing table of the physical switch is successful, and forward the traffic data to the second routing node, so that the second routing node forwards the traffic data to the public network through the physical switch.
In an exemplary embodiment, as shown in fig. 5, there is provided a subnet access public network device, including an information receiving module 20 and an information adding module 21, wherein:
The information receiving module 20 is configured to obtain subnet route information of a cloud computing management platform reissued by a first routing node based on a border gateway protocol, where the first routing node and the second routing node are in the same intermediate forwarding platform;
the information adding module 21 is configured to forward the subnet route information to the physical switch based on the open shortest path first protocol, so that the physical switch adds the subnet route information to the switch routing table.
In one embodiment, the subnet access public network device is further configured to obtain the routing information corresponding to the border gateway protocol sent by the first routing node, and add the routing information corresponding to the border gateway protocol to the second routing table of the second routing node.
In one embodiment, the subnet access public network device is further configured to obtain traffic data of the cloud computing management platform forwarded by the first routing node, where the traffic data is forwarded by the first routing node when the addition of subnet routing information to the switch routing table of the physical switch is successful, and forward the traffic data to the physical switch, so that the physical switch forwards the traffic data to the public network.
The above-described various modules in the subnet access public network device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured 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, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing data. 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 for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a subnet access public network method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the data (including, but not limited to, data for analysis, data stored, data displayed, etc.) related to the present application are all information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.