Updated on 2025-08-27 GMT+08:00

VPC Peering Connection Configuration Suggestions

A VPC peering connection is a networking connection between two VPCs in the same region and enables them to communicate. Table 1 lists the configuration suggestions and examples of using VPC peering connections.
Table 1 VPC peering connection usage examples

Location

CIDR Block

Description

Example

VPCs in the same region

  • VPC CIDR blocks do not overlap.
  • Subnet CIDR blocks of VPCs do not overlap.

You can create VPC peering connections to connect entire CIDR blocks of VPCs. Then, all resources in the VPCs can communicate with each other.

Using a VPC Peering Connection to Connect Two VPCs

VPCs in the same region

  • VPC CIDR blocks overlap.
  • Some subnet CIDR blocks overlap.
You can create VPC peering connections to connect specific subnets or ECSs from different VPCs.
  • To connect specific subnets from two VPCs, the subnet CIDR blocks cannot overlap.
  • To connect specific ECSs from two VPCs, each ECS must have a unique private IP address.

Using a VPC Peering Connection to Connect Subnets in Two VPCs

Using a VPC Peering Connection to Connect ECSs in Two VPCs

VPCs in the same region

  • VPC CIDR blocks overlap.
  • All subnet CIDR blocks overlap.

VPC peering connections are not usable. You need to replan the VPC CIDR blocks.

Unsupported VPC Peering Configurations

A VPC peering connection can only connect VPCs in the same region. If your VPCs are in different regions, use Cloud Connect.

Alternatively, you can use enterprise routers to connect VPCs in the same region. Enterprise Router is more suitable for complex networking that needs to connect multiple VPCs. With enterprise routers, you do not have to create a large number of VPC peering connections or add too many routes. This makes your network topology simpler and more scalable.

All route tables in a VPC can have a maximum of 1,000 routes. If you want to create VPC peering connections to connect multiple VPCs, consider this restriction when planning the networking.

If there are CCE clusters, you need to avoid CIDR block overlapping between the subnets and container subnets in addition to the VPC CIDR blocks at both ends. Otherwise, communications will fail. For details, see Cross-VPC Cluster Interconnection.