Updated on 2024-09-24 GMT+08:00

Overview

Solution

Four VPCs are created in region A on Huawei Cloud and they need to communicate with each other.

You can create an enterprise router in region A and attach the four VPCs to the enterprise router. The enterprise router can route traffic among the VPCs so that they can communicate with each other.

Figure 1 Communications among VPCs in the same region

This document describes how to use an enterprise router to quickly allow multiple VPCs in the same region to communicate with each other.

You can share an enterprise router with different accounts to attach VPCs of these accounts to the same enterprise router for communication.

Enterprise routers can be used with Direct Connect, Cloud Connect, and NAT Gateway to construct different networks. For details, see Enterprise Router Best Practices.

Procedure

Figure 2 shows the procedure for using an enterprise router to allow multiple VPCs in the same region to communicate with each other.

Figure 2 Flowchart for connecting VPCs in the same region
Table 1 Steps for connecting VPCs in the same region

Step

Description

Preparations

Before using cloud services, sign up for a HUAWEI ID, enable Huawei Cloud services, complete real-name authentication, and top up your account.

Step 1: Plan Networks and Resources

Plan CIDR blocks and the number of resources.

Step 2: Create an Enterprise Router

Create one enterprise router for connecting VPCs in the same region.

Step 3: (Optional) Create VPCs and ECSs

Create four VPCs and four ECSs. You can change the resource quantity and specifications as needed.

If you already have these resources, skip this step.

Step 4: Create VPC Attachments for the Enterprise Router

Attach the four VPCs to the enterprise router.

Step 5: (Optional) Add Routes to VPC Route Tables

Add routes to the route tables of the VPCs for communication with the enterprise router.

  • If you enable Auto Add Routes when creating a VPC attachment, you do not need to manually add static routes to the VPC route table. Instead, the system automatically adds routes (with this enterprise router as the next hop and 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 as the destinations) to all route tables of the VPC.
  • If an existing route in the VPC route tables has a destination to 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16, the routes will fail to be added. In this case, do not enable Auto Add Routes. After the attachment is created, manually add routes.

Step 6: Verify Connectivity Among VPCs

Log in to the ECS and run the ping command to verify the connectivity among VPCs.