Using a Cloud Connection to Connect VPCs in the Same Region and Account
Connect the VPCs in the same account and the same region using a cloud connection.
Solution Architecture
Two VPCs in the same region need to communicate with each other.
You need to create a cloud connection and load both VPCs to the cloud connection.

Network and Resource Planning
- Plan CIDR blocks for VPCs and subnets.
- Plan the quantity, names, and main parameters of cloud resources, including VPCs and ECSs.
Planning the Network
Figure 2 and Table 1 show the network planning and description for communication between VPCs in the same region.
Resource |
Description |
---|---|
VPCs |
|
ECSs |
In this example, two ECSs are deployed in the same VPC and region. An ECS can be only associated with a security group in the same region as the ECS. This means the two ECSs in this example can be associated with the same or different security groups in their region.
|
Planning Resources

The following resource details are only for your reference. You can modify them if needed.
- Table 2 describes the two VPCs in detail. Their CIDR blocks cannot overlap with each other.
- Table 3 describes the two ECSs in detail, with each ECS in a VPC.
- Security group rules: If the two ECSs are in different security groups (Sg-A and Sg-B), you need to add rules to the security groups to allow traffic between the ECSs.
Set Source to the security group of the two ECSs to allow mutual access.
Table 4 Security group rules (security group as the source) Security Group
Direction
Action
Type
Protocol & Port
Source
Description
Sg-A
Inbound
Allow
IPv4
All
Sg-B
Allows instances in Sg-B to access those in Sg-A over any IPv4 protocol and port.
Sg-B
Inbound
Allow
IPv4
All
Sg-A
Allows instances in Sg-A to access those in Sg-B over any IPv4 protocol and port.
Procedure
Step |
What to Do |
---|---|
Before using cloud services, sign up for a HUAWEI ID, enable Huawei Cloud services, complete real-name authentication, and top up your account. |
|
Create a cloud connection for connecting the VPCs. |
|
Create VPCs and ECSs in the same region using the same account. If you already have VPCs and ECSs, skip this step. |
|
Load the VPCs to the cloud connection based on your network plan. |
|
Log in to the ECSs and verify the network connectivity between VPCs. |
Preparations
Before creating a cloud connection, you need to sign up for a HUAWEI ID, enable Huawei Cloud services, complete real-name authentication, and top up your account. Ensure that your account has sufficient balance.
- Sign up for a HUAWEI ID, enable Huawei Cloud services, and complete real-name authentication.
- Top up your account.
Ensure that your account has sufficient balance. For details about how to top up an account, see Topping up an Account.
Step 1: Create a Cloud Connection
- Go to the Cloud Connections page.
- In the upper right corner of the page, click Create Cloud Connection.
- Configure the parameters based on Table 6.
Figure 3 Creating a cloud connection
Table 6 Parameters for creating a cloud connection Parameter
Example Value
Description
Name
cc-test
Specifies the cloud connection name.
The name can contain 1 to 64 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed.
Enterprise Project
default
Provides a cloud resource management mode, in which cloud resources and members are centrally managed by project.
Scenario
VPC
VPC: VPCs or virtual gateways can use this cloud connection.
Tag
-
Identifies the cloud connection. A tag consists of a key and a value. You can add 20 tags to a cloud connection.
NOTE:If a predefined tag has been created on Tag Management Service (TMS), you can directly select the corresponding tag key and value.
For details about predefined tags, see Predefined Tags.
Description
-
Provides supplementary information about the cloud connection.
The description can contain no more than 255 characters.
- Click OK.
Step 2: (Optional) Create VPCs and ECSs
Perform the following operations to create VPCs and ECSs. If you already have VPCs and ECSs, skip this step.
Constraints
- The CIDR blocks of the VPCs to be connected cannot overlap with each other.
Overlapping VPC CIDR blocks will cause route conflicts. If the VPCs have overlapping CIDR blocks, you need to modify the CIDR blocks.
- Two ECSs in this example are in the same security group. If the ECSs are in different security groups, add rules to the security groups to allow access to each other by referring to Table 4.
Procedure
- Create two VPCs with subnets.
For details, see Creating a VPC.
For the details about VPCs and subnets in this example, see Table 2.
- Create two ECSs.
For details, see Purchasing a Custom ECS.
For details about the ECSs in this example, see Table 3.
Step 3: Load Network Instances
Load the VPCs that need to communicate with each other to the cloud connection created in the previous step.
- Go to the Cloud Connections page.
- Click the cloud connection name (for example, cc-test) to go to the Basic Information tab.
- Click the Network Instances tab.
- Click Load Network Instance.
- Configure the parameters based on Table 7 and click OK.
Figure 4 Loading vpc-A01 in the account
Table 7 Parameters for loading network instances in the same account Parameter
Example Value
Description
Account
Current account
Specifies the account that provides the network instance.
Region
CN Southwest-Guiyang1
Specifies the region where the VPC you want to connect is located.
Instance Type
VPC
Specifies the type of the network instance that needs to be loaded to the cloud connection. There are two options:
- VPC
- Virtual gateway
VPC
vpc-A01
Specifies the VPC you want to load to the cloud connection.
This parameter is mandatory if you have set Instance Type to VPC.
VPC CIDR Block
subnet-A01
Specifies the subnets in the VPC and custom CIDR blocks.
If you have set Instance Type to VPC, you need to configure the following two parameters:
- Subnet: Select one or more subnets in the VPC.
- Other CIDR Block: Add one or more custom CIDR blocks as needed.
Remarks
-
Provides supplementary information about the network instance.
- In the displayed dialog box, click Continue Loading. Then, click
to load vpc-A02 in the same region and the account.
Figure 5 Loading vpc-A02 in the same account
Step 4: Verify Network Connectivity
Log in to each ECS and verify the network connectivity between VPCs.
- Log in to ECS-A01.
Multiple methods are available for logging in to an ECS. For details, see Logging In to an ECS.
In this example, use VNC provided on the management console to log in to the ECSs.
- Ping the other ECS to verify the network connectivity between VPCs.
ping <private-IP-address-of-ECS-A02>
Example command:
ping 172.16.1.122
If the following information is displayed, vpc-A01 and vpc-A02 are connected.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot