Creating Intra-Account Peering Connection

Last Updated At: 2025-10-21 09:10:00

Both cross-region and cross-account communication of VPCs are advanced features of peering connections. This document describes how to implement cross-region communication through an example.

Example

  • IP range 1: subnet A 192.168.1.0/24 of VPC1 in City 1.
  • IP range 2: subnet B 10.0.1.0/24 of VPC2 in City 2.
    To implement communication between IP ranges 1 and 2 over a peering connection under the same account, two steps are required. The specific directions are as follows.

Step 1: Create a peering connection

  1. Log in to Cloud Console, select Cloud Products > Cloud Computing & Networking > Virtual Private Cloud to enter the VPC console.
  2. Click Peering Connection in the left sidebar to enter the Management page.
  3. Select a region and a VPC above the list and then click Create to create a peering connection.


4. Enter a name, select the local region and network, and select the peer region, account type, VPC, and bandwidth cap.After selecting My Account as the peer account type, you need to select the corresponding instance from the pull-down menu.


5. Click Create. A peering connection between two VPCs under the same account takes effect immediately after its creation.

Step 2: Set up routing tables at both ends

Note:

  • You must configure routes on both sides to implement communication over a peering connection.
  • To communicate between multiple IP ranges of the two VPCs, you just need to add corresponding routing table entries, without the need for creating multiple peering connections.
  1. Log in to Cloud Console, select Cloud Products > Cloud Computing & Networking > Virtual Private Cloud to enter the VPC console.
  2. Click Subnet in the left sidebar to enter the Management page.
  3. Click the ID of the route table (route table A) associated with the local subnet (subnet A) of the peering connection to access the route table details page.


4. Click Add Routing Policy.


5. Enter the peer CIDR (10.0.1.0/24) for the destination, select Peering Connections for the Next Hop Type, and select the created peering connection for the Next Hop Type.


6. Click Create. After the routing table is configured, communication is enabled between the IP ranges of the two VPCs. The peer routing table is configured in the same way as that at the local end.