• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. User Guide
  4. VPC Peering Connection
  5. VPC Peering Connection Creation Procedure

VPC Peering Connection Creation Procedure

A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IP addresses. ECSs in either VPC can communicate with each other just as if they were in the same VPC. You can create a VPC peering connection between your own VPCs, or between your VPC and another tenant's VPC within the same region. You cannot create a VPC peering connection between VPCs in different regions.

  • Procedure for creating a VPC peering connection with another VPC in your account
    Figure 1 Procedure for creating a VPC peering connection with another VPC in your account

    If you create a VPC peering connection between two VPCs in your account, the system automatically accepts the connection by default. You need to create routes for the local and peer VPCs to enable communication between the two VPCs.

  • Procedure for creating a VPC peering connection with a VPC in another account
    Figure 2 Procedure for creating a VPC peering connection with a VPC in another account

    If you create a VPC peering connection between your VPC and a VPC that is in another account, the VPC peering connection will be in the Awaiting acceptance state. After the owner of the peer account accepts the connection, the connection status changes to Accepted. The owners of the local and peer accounts must configure the routes required by the VPC peering connection to enable communication between the two VPCs.

    If the local and peer VPCs have overlapping CIDR blocks, the routes added for the VPC peering connection may be invalid. Before creating a VPC peering connection between two VPCs that have overlapping CIDR blocks, ensure that no subnets in the two VPCs have overlapping CIDR blocks. In this case, the created VPC peering connection enables communication between two subnets in the two VPCs.

    You can run the ping command to check whether the two VPCs can communicate with each other.