This topic describes how to migrate a virtual private cloud (VPC) from a peering connection to a Cloud Enterprise Network (CEN) instance. You can use CEN to establish private connections between virtual private clouds (VPCs), and between VPCs and data centers. CEN supports automatic route distribution and learning, which speeds up network convergence, improves the quality and security of cross-network communications, and connects all network resources.
Prerequisites
A CEN instance is created, and a Basic Edition transit router is deployed in the region of the VPC.
Procedure
Log on to the CEN console.
On the Instances page, click the ID of the CEN instance that you want to manage.
On the
tab, find the transit router in the region of the VPC and click Create Connection in the Actions column.On the Connection with Peer Network Instance page, configure the parameters to connect the VPCs to the transit router. For more information, see Use an Enterprise Edition transit router to connect VPCs.
If the VPCs are in different regions, purchase a bandwidth plan and create an inter-region connection between the VPCs. For more information, see Work with a bandwidth plan and Manage inter-region connections.
If the route table of the VPC contain a route that points to an Elastic Compute Service (ECS) instance, a VPN gateway, or a high-availability virtual IP address (HAVIP), advertise the route to the CEN instance based on your business requirements in the CEN console. For more information, see Advertise routes to a transit router.
On the tab, click the ID of the transit router that you want to manage and click the Network Routes tab to view the routes of the VPC. Make sure that no route conflicts exist after the VPC is connected to the transit router.
The static routes of a peering connection have higher priorities than the dynamic routes of the CEN instance. If the route table of the VPC contains a static route of the peering connection, CEN routes that are the same as the static route are not learned by the VPC. To ensure smooth migration, we recommend that you split the static route. After the CEN instance learns the routes, delete the routes.
In this example, a VPC is deployed in the US (Silicon Valley) region and uses the 192.168.10.0/24 CIDR block, and another VPC is deployed in the Germany (Frankfurt) region and uses the 172.16.10.0/24 CIDR block. This example shows how to resolve route conflicts and migrate the peering connection between the VPCs to a CEN instance. The VPCs communicate with each other over the peering connection. After the VPCs are attached to the CEN instance, the CEN route whose destination CIDR block is 172.16.10.0/24 is the same as the destination CIDR block of a static route in the route table of a VPC. A route conflict occurs.
To perform transit connections during the migration, delete the peering connection route whose destination CIDR block is 172.16.10.0/24. The CEN route automatically takes effect and the route is migrated.
The time duration of the transit connection increases if the number of CEN routes increases. For business-critical peering connections, we recommend that you use the smooth migration mode.
To perform a smooth migration, split the static route whose destination CIDR block is 172.16.10.0/24 into more specific routes. For example, you can split the static route into one route whose destination CIDR block is 172.16.10.0/25 and another one whose destination CIDR block is 172.16.10.128/25.
Log on to the VPC console and find the route table to which the route you want to split belongs.
On the Custom Route tab, click Add Route Entry and add two routes whose destination CIDR blocks are 172.16.10.0/25 and 172.16.10.128/25. Set the next hop to the route of the VPC peering connection.
After you add the routes, find the static route whose destination CIDR block is 172.16.10.0/24 in the VPC route table and click Delete to delete the static route.
On the Dynamic Route tab, check whether the CEN route take effect.
After the CEN route takes effect, delete the routes whose destination CIDR blocks are 172.16.10.0/25 and 172.16.10.128/25. The route is smoothly migrated to the CEN instance.
ImportantRepeat the preceding steps to resolve other route conflicts of the peering connection between the VPCs.
After you resolve all route conflicts, make sure that data can be transferred as expected before you delete the configurations of the VPC peering connection.