This topic describes how to use Cloud Enterprise Network (CEN) and Basic Edition transit routers to connect virtual private clouds (VPCs) that are deployed in the same region.
Regions that support Basic Edition transit routers
Example
Beginning Mach 31, 2022, Basic Edition transit routers are supported only in Cloud Connect Network (CCN) regions. By default, other regions support only Enterprise Edition transit routers. If you have Basic Edition transit routers in regions that no longer support Basic Edition transit routers, we recommend that you upgrade the Basic Edition transit routers to Enterprise Edition, which supports more features and a greater networking capacity. For more information, see Upgrade Basic Edition transit routers.
In this example, a CEN instance is created and a Basic Edition transit router is deployed in the China (Guangzhou) region. If you do not have a Basic Edition transit router, you can use an Enterprise Edition transit router. For more information, see Use CEN and Enterprise Edition transit routers to enable intra-region communication between on-premises and cloud networks.
A company deployed two VPCs named VPC1 and VPC2 in the China (Guangzhou) region. Elastic Compute Service (ECS) instances are deployed in the VPCs. The VPCs cannot communicate with each other. To accommodate business growth, the company wants to establish network communication between the VPCs.
In this case, the company can use CEN to connect the VPCs to the Basic Edition transit router in the China (Guangzhou) region to allow the VPCs to communicate with each other.
Prerequisites
Two VPCs are deployed in the China (Guangzhou) region. ECS instances are deployed in the VPCs. For more information, see Create an IPv4 VPC.
The following table describes how CIDR blocks are allocated to the VPCs. Make sure that the CIDR blocks do not overlap.
Network instance
CIDR block
Region
ECS instance IP address
VPC1
VPC CIDR block: 192.168.0.0/16
vSwitch CIDR block: 192.168.0.0/24
China (Guangzhou)
192.168.0.239
VPC2
VPC CIDR block: 10.0.0.0/16
vSwitch CIDR block: 10.0.0.0/24
China (Guangzhou)
10.0.0.97
You are familiar with the security group rules that are applied to the ECS instances in the VPCs. Make sure that the security group rules allow the VPCs to communicate with each other. For more information, see View security group rules and Add a security group rule.
Step 1: Connect the VPCs to the transit router
Connect the VPCs to the transit router in the China (Guangzhou) region. Then, the VPCs automatically learn routes from each other to establish network communication.
Log on to the CEN console.
- On the Instances page, click the ID of the CEN instance that you want to manage.
Navigate to the tab, find the transit router that you want to manage, and then click Create Connection in the Actions column.
On the Connection with Peer Network Instance page, configure the following parameters and click OK:
Network Type: Select VPC.
Region: Select the region where the network instance is deployed. In this example, China (Guangzhou) is selected.
Transit Router: The transit router in the selected region is automatically displayed.
Resource Owner ID: Select the Alibaba Cloud account to which the VPC belongs. In this example, Current Account is selected.
Network Instance: Select the ID of the network instance. In this example, VPC1 is selected.
Repeat Step 3 to connect VPC 2 to the transit router in the China (Guangzhou) region.
After both VPCs are connected to the transit router, the VPCs can automatically learn routes from each other, as shown in the following figure. You can manage the routes of the VPCs in the VPC console. For more information, see Create and manage a route table.
Step 2: Test network connectivity
After VPC1 and VPC2 are connected to the transit router, the VPCs are connected to each other. In the following example, VPC1 is used to test the network connectivity between VPC1 and VPC2.
Log on to an ECS instance in VPC 1. For more information, see Connection method overview.
On the ECS instance, run the ping command to test whether VPC1 can communicate with VPC2.
NoteIn this example, VPC1 runs the Alibaba Cloud Linux operating system. For more information about how to use the ping command in other operating systems, see the manual of the operating system that you use.
ping <The IP address of the ECS instance in VPC2>
The following echo reply packet indicates that VPC1 and VPC2 can communicate with each other.