VPC Peering Connection
What Is a VPC Peering Connection?
- If you want to connect VPCs in different regions, use Cloud Connect.
- You can use VPC peering connections to build different networks. For details, see VPC Peering Connection Usage Examples.
- There are two VPCs (VPC-A and VPC-B) in region A that are not connected.
- Service servers (ECS-A01 and ECS-A02) are in VPC-A, and database servers (RDS-B01 and RDS-B02) are in VPC-B. The service servers and database servers cannot communicate with each other.
- You need to create a VPC peering connection (peering-AB) between VPC-A and VPC-B so the service servers and database servers can communicate with each other.
![](https://support.huaweicloud.com/intl/en-us/usermanual-vpc/public_sys-resources/notice_3.0-en-us.png)
Currently, VPC peering connections are free.
VPC Peering Connection Creation Process
A VPC peering connection can only connect VPCs in the same region.
- If two VPCs are in the same account, the process of creating a VPC peering connection is shown in Figure 2.
For details about how to create a VPC peering connection, see Using a VPC Peering Connection to Connect Two VPCs in the Same Account.
- If two VPCs are in different accounts, the process of creating a VPC peering connection is shown in Figure 3.
For details about how to create a VPC peering connection, see Using a VPC Peering Connection Connect Two VPCs in Different Accounts.
Notes and Constraints
- A VPC peering connection can only connect VPCs in the same region.
- A VPC peering connection can enable a VPC created on the Huawei Cloud Chinese Mainland website to connect to one created on the Huawei Cloud International website, but the VPCs must be in the same region. For example, if the VPC created on the Chinese Mainland website is in the CN-Hong Kong region, then the VPC created on the International website must also be in the CN-Hong Kong region.
- If you want to connect VPCs in different regions, you can use Cloud Connect.
- If you only need few ECSs in different regions to communicate with each other, you can assign and bind EIPs to the ECSs.
- If the local and peer VPCs have overlapping CIDR blocks, the VPC peering connection may not be usable.
In this case, you can configure the network by referring to VPC Peering Connection Usage Examples.
- By default, if VPC A is peered with VPC B that has EIPs, VPC A cannot use EIPs in VPC B to access the Internet. To enable this, you can use the NAT Gateway service or configure an SNAT server. For details, see Enabling Internet Connectivity for an ECS Without an EIP.
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