Using a Cloud Connection to Connect VPCs in the Same Account But Different Regions
Use a cloud connection to connect VPCs in the same account but different regions.
Solution Architecture
You have a VPC (vpc-A) in a region (CN Southwest-Guiyang1) and another VPC (vpc-B) in a different region (CN North-Beijing4). The two VPCs 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 different regions.
Resource |
Description |
---|---|
VPCs |
|
ECSs |
In this example, two ECSs are deployed in VPCs in different regions. An ECS can be only associated with a security group in the same region as the ECS. Therefore, the two ECSs must be associated with different security groups. To connect the two ECSs, you need to add inbound rules to their security groups by referring to Table 4. For more information about security groups, Security Group and Security Group Rule Overview. |
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: In this example, the two ECSs are in different security groups (Sg-A and Sg-B). You need to add the following rules to the security groups to allow traffic between the ECSs.
Set Source to the CIDR block of the other VPC or subnet.
Table 4 Security group rules (CIDR block as the source) Security Group
Direction
Action
Type
Protocol & Port
Source
Description
Sg-A
Inbound
Allow
IPv4
All
IP address: 172.16.0.0/16 (vpc-B's CIDR block)
Allows IPv4 traffic from 172.16.0.0/16 to the resources in Sg-A over any protocol and port.
Sg-B
Inbound
Allow
IPv4
All
IP address: 192.168.0.0/16 (vpc-A's CIDR block)
Allows IPv4 traffic from 192.168.0.0/16 to the resources in Sg-B over any 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. |
|
If a VPC you want to connect is outside the Chinese mainland, you need to apply for a cross-border permit. Skip this step if cross-border communication is not required. |
|
Create a cloud connection. |
|
Create VPCs and ECSs in different region using the same account. If you already have VPCs and ECSs, skip this step. |
|
Load the VPCs to the created cloud connection based on your network plan. |
|
To enable normal communication between regions in the same geographic region or different geographic regions, you need to purchase a bandwidth package and bind it to the cloud connection. |
|
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: (Optional) Apply for a Cross-Border Permit
If a VPC you want to connect is outside the Chinese mainland, you need to apply for a cross-border permit. Skip this step if cross-border communication is not required.
In this example, no VPCs (one in CN Southwest-Guiyang1 and the other in CN North-Beijing4) are outside the Chinese mainland, so no cross-border permit is required. You can skip this step.
- Go to the Bandwidth Packages page.
- On the displayed page, click apply now.
If the registered address of your business entity is in the Chinese mainland, click here to go to the Cross-Border Service Application System page.
If the registered address of your business entity is outside the Chinese mainland, click here to go to the Cross-Border Service Application System page.
Select the address for applying for the cross-border permit based on the registration address of your business entity.
- On the displayed page, select an applicant type, configure the parameters as prompted, and upload the required materials.
Prepare and upload the materials required on the application page.
Table 6 Online cross-border permit application Parameter
Description
Applicant Name
The applicant name, which must be the same as the company name in the Letter of Commitment to Information Security.
Huawei Cloud UID
The account ID to log in to the management console. You can take the following steps to obtain your account ID.- Log in to the management console.
- Click the username in the upper right corner and select My Credentials from the drop-down list.
- On the API Credentials page, obtain the Account ID.
Bandwidth (Mbit/s)
For reference only
Start Date
For reference only
Termination Date
For reference only
Customer Type
Select a type based on the actual situation.
Country of the Customer
Country where the applicant is located.
Contact Name
-
Contact Number
-
Type of ID
-
ID Number
-
Scope of Business
Briefly describe the main business.
Number of Employees
For reference only
Branch Location Country
Country where the applicant branch is located. Set this parameter based on the actual situation.
Table 7 Required materials Parameter
Description
Required Material
Signature
Seal
Business License
Upload a photo of the business license with the official seal.
For the position of the seal, see the template provided by Huawei Cloud.
A scanned copy of your company's business license
-
√
Service Agreement
Download the Huawei Cloud Cross-Border Circuit Service Agreement, fill in the blank, upload the copy of agreement with the signature and official seal.
- Sign the material on the signature block.
- Stamp the seal over the signature.
A scanned copy of the Huawei Cloud Cross-Border Circuit Service Agreement
√
√
Letter of Commitment to Information Security
Download the China Unicom Letter of Commitment to Information Security of the Cross-Border Circuit Service, fill in the blank, and upload the copy of the letter with the signature and seal.
- Sign the material on the signature block.
- Stamp the seal over the signature.
- Specify the bandwidth you estimated and your company name.
A scanned copy of the China Unicom Letter of Commitment to Information Security of the Cross-Border Circuit Service
√
√
- Click Submit.
After you submit the application, the status will change to Pending approval. The review takes about one working day. When the status changes to Approved, you can buy bandwidth packages.
Step 2: 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 8.
Figure 3 Creating a cloud connection
Table 8 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 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 3: (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.
- In this example, the two ECSs are in different security groups. You need to add rules to the security groups to allow access from each other. For details, see 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 4: 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 name of the cloud connection to go to the Basic Information tab.
- Click the Network Instances tab.
- Click Load Network Instance.
- Configure the parameters based on Table 9 and click OK.
Figure 4 Loading vpc-A in the same account
Table 9 Parameters for loading network instances in the same account Parameter
Example Value
Description
Account
Current account
Specifies the account that provides the network instance.
Select Current account.
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
Select VPC.
VPC
vpc-A
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-A
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
- 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-B in the same account but in a different region (CN North-Beijing4).
Figure 5 Loading vpc-B in the same account
Step 5: Buy a Bandwidth Package
By default, a cloud connection provides 10 kbit/s of bandwidth for testing cross-region network connectivity. To enable normal communication between regions in the same geographic region or different geographic regions, you need to purchase a bandwidth package and bind it to the cloud connection.

One cloud connection can only have one bandwidth package regardless of if the cloud connection is used for communication within a geographic region or between geographic regions.
- Go to the Buy Bandwidth Package page.
- Configure the parameters based on Table 10 and click Next.
Table 10 Parameters for buying a bandwidth package Parameter
Example Value
Description
Basic Information
Billing Mode
Yearly/Monthly
The only option is Yearly/Monthly.
You can purchase it by year or month as needed.
Name
bandwidthPackge-test
Specifies the bandwidth package name.
The name can contain 1 to 64 characters. Only digits, letters, 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.
Tag
-
Specifies the tag to identify the bandwidth package. A tag consists of a key and a value. You can add 20 tags to a bandwidth package.
NOTE:If a predefined tag has been created on TMS, you can directly select the corresponding tag key and value.
For details about predefined tags, see Predefined Tags.
Bandwidth Details
Billed By
Bandwidth
Specifies by what you want the bandwidth package to be billed.
Applicability
Single geographic region
Specifies whether you want to use the bandwidth package for communication within a geographic region or between geographic regions. There are two options:
- Single geographic region: Use the bandwidth package for communication between regions in the same geographic region.
- Across geographic regions: Use the bandwidth package for communication between regions in different geographic regions.
Geographic Region
Chinese mainland
Specifies the geographic regions.
Bandwidth (Mbit/s)
10
Specifies the bandwidth you require for communication between regions. The sum of all inter-region bandwidths you assign cannot exceed the total bandwidth of the bandwidth package. Assign the bandwidth based on your network plan.
Unit: Mbit/s
Required Duration
1 month
Specifies how long you require the bandwidth package for.
Auto renewal is supported.
Cloud Connection
Bind later
Specifies the cloud connection you want to bind the bandwidth package to. There are two options:
- Bind now
- Bind later
- Confirm the configuration and submit your order.
View the bandwidth package in the bandwidth package list. If the status changes to Normal, the purchase is successful.
Binding a Bandwidth Package to a Cloud Connection
Bind the purchased bandwidth package to the created cloud connection.
- Go to the Cloud Connections page.
- Click the cloud connection name (cc-test) to go to the Basic Information tab.
- Click the Bandwidth Packages tab.
- Click Bind Bandwidth Package. In the displayed dialog box, select the purchased bandwidth package (bandwidthPackge-test) that will be bound to the cloud connection (cc-test) and click OK.
Step 6: Assign an Inter-Region Bandwidth
By default, a cloud connection provides 10 kbit/s of bandwidth for testing cross-region network connectivity.
- Go to the Cloud Connections page.
- Click the cloud connection name (cc-test) to go to the Basic Information tab.
- Click the Inter-Region Bandwidths tab.
- Click Assign Inter-Region Bandwidth and configure the parameters based on Table 11.
Table 11 Parameters required for assigning inter-region bandwidth Parameter
Example Value
Description
Regions
CN Southwest-Guiyang1
CN North-Beijing4
Specifies the regions of the network instances that need to communicate with each other.
Select two regions.
Bandwidth Package
bandwidthPackge-test
Specifies the purchased bandwidth package that will be bound to the cloud connection.
Bandwidth
10
Specifies the bandwidth you require for communication between regions, in Mbit/s.
The sum of all inter-region bandwidths you assign cannot exceed the total bandwidth of the bandwidth package. Plan the bandwidth in advance.
- Click OK.
Now the network instances in the two regions can communicate with each other.
The default security group rules deny all the inbound traffic. Ensure that security group rules in both directions are correctly configured for resources in the regions to ensure normal communication.
Step 7: 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-B01>
Example command:
ping 172.16.1.104
If the following information is displayed, vpc-A and vpc-B 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