Use scenario-based networking to create a Cloud Enterprise Network (CEN) for connecting virtual private clouds (VPCs) across regions.
Scenario-based networking is designed for the quick creation of network topologies. It supports full communication of VPCs across regions within the same account. The feature automates batch configurations for CEN, which includes creating CEN instances, transit routers, VPC connections, and cross-region connections, configuring associated forwarding, and enabling route learning.
If you need manual configurations, such as customizing associated forwarding or route learning, refer to Connect VPCs in the same region or Connect VPCs in different regions.
If you need to connect VPCs from different accounts, see Connect VPCs in different accounts.
Scenario
In this scenario, three VPCs have been created, with VPC1 and VPC2 in China (Hangzhou) and VPC3 in China (Shanghai), as detailed below. Scenario-based networking lets you connect these VPCs.
Parameter | VPC1 | VPC2 | VPC3 |
Region | China (Hangzhou) | China (Hangzhou) | China (Shanghai) |
CIDR block | 10.0.0.0/16 | 172.16.0.0/16 | 192.168.0.0/16 |
vSwitch1 | Zone J. CIDR block 10.0.0.0/24 | Zone J. CIDR block 172.16.0.0/24 | Zone M. CIDR block 192.168.0.0/24 |
vSwitch2 | Zone K. CIDR block 10.0.1.0/24 | Zone K. CIDR block 172.16.1.0/24 | Zone N. CIDR block 192.168.1.0/24 |
ECS IP | ECS1: 10.0.0.1 | ECS2: 172.16.0.1 | ECS3: 192.168.0.1 |
When planning network resources, take note of the following:
The CIDR blocks of VPCs must not overlap.
To realize disaster recovery at the zone level, create vSwitches in at least two different zones.
Configuration
Step 1: Create networking configurations
Log on to the CEN console. On the Instances page, click Create CEN Instance.
In the Create CEN Instance dialog box, select Create Scenario-specific CEN (Recommended). Choose the VPC Interconnection, and click Create.
On the
tab, configure the parameters as follows:Region: Select China (Hangzhou).
Zone: Select Zone J and Zone K.
VPC:
Choose the VPC1 in the drop-down list of VPC, and select two vSwitches.
Click Add VPC, choose VPC2 in the drop-down list, and then select two vSwitches.
Click + on the right side of the China (Hangzhou) tab to create a new tab and add networking configurations. Note that the new tab is empty by default and will only display the region after you select one.
Region: Select China (Shanghai).
Zone: Select Zone M and Zone N.
VPC: Select VPC3 and choose two vSwitches.
Click Next.
Step 2: Confirm networking settings and fees
On the Confirm Networking Settings and Fees page, you can view the resources that will be automatically created and incur costs. The system may take a few minutes to provide an overview. The final configuration appears as follows:
After confirming that everything is correct, click Start Deployment.
Step 3: Start deployment
The deployment will take about 10 minutes. Afterwards, you'll see the following page:
Click View CEN Instance to see the automatically created resources in the CEN instance. These VPCs are connected through the CEN.
Step 4: Test the connectivity
Before proceeding, ensure that the security group rules for the three ECS instances permit the ICMP protocol. For more information, see Query security group rules and Add security group rules.
Log on to the ECS1 instance and run the ping command to access ECS2:
ping 172.16.0.1
A successful ping confirms that VPC1 and VPC2 are connected. Run the ping command to verify connectivity between VPC1 and VPC3, and VPC2 and VPC3.
Reference
For details on CEN billing, refer to the Billing rules.