Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for realizing cross-cluster intercommunication of a VPC network based on a VX L AN tunnel, aiming at realizing the intercommunication of a VPC network on the basis of OpenStack open source without additional component support.
The invention is realized by the following steps:
the invention provides a method for realizing VPC network cross-cluster intercommunication based on VX L AN tunnel, which comprises the following steps:
a VX L AN tunnel is established between routers associated with a first VPC network and a second VPC network, and a VXlan network model is established by AN OpenStack platform through a network module, wherein the first VPC network and the second VPC network are any two virtual networks;
a Vxlan network type port is created and bound to a target router;
associating the first VPC network with a first router, wherein the first router is any one or more of the target routers;
associating the second VPC network with a second router, wherein the second router is any one or more of the target routers;
and updating routing tables of the first router and the second router, wherein the routing tables comprise destination addresses and next hop addresses, so that the communication between the first VPC network and the second VPC network is realized according to the routing tables.
In addition, the invention also discloses a system for realizing VPC network cross-cluster intercommunication based on VX L AN tunnel, which comprises:
VX L AN tunnel;
the target router comprises a first router and a second router;
a first VPC network;
a second VPC network;
the VX L AN tunnel is established between a first VPC network and a second VPC network, and the OpenStack platform establishes a Vxlan network model through a network module, wherein the first VPC network and the second VPC network are any two virtual networks;
the target router is a router which is bound after a Vxlan network type port is created;
associating the first VPC network with a first router, wherein the first router is any one or more of the target routers;
associating the second VPC network with a second router, wherein the second router is any one or more of the target routers;
and updating routing tables of the first router and the second router, wherein the routing tables comprise destination addresses and next hop addresses, so that the communication between the first VPC network and the second VPC network is realized according to the routing tables.
The method for realizing VPC network cross-cluster intercommunication based on VX L AN tunnel has the following beneficial effects:
(1) the method realizes the intercommunication of the vpc network on the basis of the open source of the OpenStack without the support of an additional component;
(2) the intercommunication of the vpc network is realized through the VX L AN tunnel, the requirement of hardware support on the network intercommunication is reduced, and the cost input of hardware is reduced;
(3) a VX L AN tunnel is quickly established, and the deployment mode is simple and convenient;
(4) with the advantage that VX L AN can penetrate through a three-layer network to expand a two-layer network, cross-data center level vpc network communication is realized.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, AN embodiment of the present invention provides a method for implementing a VPC network cross-cluster interworking based on a VX L AN tunnel, where the method includes:
s101, a VX L AN tunnel is established between a first VPC network and a second VPC network, and a VXlan network model is established by AN OpenStack platform through a network module, wherein the first VPC network and the second VPC network are any two virtual networks.
It should be noted that VX L AN is a network virtualization technology, and is AN extension of V L AN, and can extend through a three-layer network to a two-layer network.
As shown in fig. 2, the first VPC network is VPC1, and the second VPC network is VPC2, which may be virtual private networks, and the user may define the network by himself, such as an intranet.
And S102, creating a port of the Vxlan network type and binding the port to the target router.
It should be noted that a VX L AN tunnel is established between the network nodes of the two clusters through the OVS and provided for the target router to use for vruter connection, and the OpenStack platform creates a Vxlan network model through a network module to connect the two vruters for interworking.
And creating a port of the Vxlan network type and binding to the vRouter, and creating a vpc network and associating the vRouter.
S103, associating the first VPC network with a first router, wherein the first router is any one or more of the target routers.
And S104, associating the second VPC network with a second router, wherein the second router is any one or more routers in the target routers.
As shown in fig. 3, the vroters implement interworking based on the VX L AN tunnel, which shows that 2, 3, and 4 vroters implement interworking, the dotted line represents the VX L AN tunnel, each vroter is opened through VX L AN, the arrow indicates the data transmission direction, and the interworking of the vpc network is implemented based on the intercommunication of the vroters, including the specific configuration of the vpc network.
Where two vruters are involved, such asvruter 1 andvruter 2, the two interactions are directly implemented.
When three vruters are included, for example,vruter 1,vruter 2, and vruter 3, as shown in the figure, vruter 3 may communicate withvruter 1,vruter 2 may communicate withvruter 1, vruter 3 may communicate withvruter 2, or other communication manners, and embodiments of the present invention are not limited in particular.
When four vruters are included, such asvruter 1,vruter 2, vruter 3, and vruter 4, as shown, vruter 3 may communicate withvruter 1 andvruter 2,vruter 2 communicates withvruter 1, vruter 4 communicates withvruter 1,vruter 2, and vruter 3, respectively, or other communication manners, and embodiments of the present invention are not limited in particular.
And S105, updating routing tables of the first router and the second router, wherein the routing tables comprise a target address and a next hop address, so as to realize the communication between the first VPC network and the second VPC network according to the routing tables.
And calling the neutron api to update the target address and the next hop address of the vRouter routing table, so as to realize communication according to the target address and the next hop address.
In addition, the invention also discloses a system for realizing VPC network cross-cluster intercommunication based on VX L AN tunnel, which comprises:
VX L AN tunnel;
the target router comprises a first router and a second router;
a first VPC network;
a second VPC network;
a VX L AN tunnel is established between routers associated with a first VPC network and a second VPC network, and AN OpenStack platform establishes a Vxlan network model through a network module, wherein the first VPC network and the second VPC network are any two virtual networks;
the target router is a router which is bound after the Vxlan network type port is established;
associating the first VPC network with a first router, wherein the first router is any one or more routers in the target router;
associating the second VPC network with a second router, wherein the second router is any one or more routers in the target router;
and updating routing tables of the first router and the second router, wherein the routing tables comprise target addresses and next hop addresses so as to realize the communication between the first VPC network and the second VPC network according to the routing tables.
The foregoing embodiments are merely illustrative of the principles of the invention and its efficacy, and are not to be construed as limiting the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.