Both cross-region and cross-account communication of VPCs are advanced features of peering connections. This document describes how to implement cross-account communication by using an example.
192.168.1.0/24
of VPC1 in Guangzhou.10.0.1.0/24
of VPC2 in Beijing.Perform the three steps below to create a peering connection across different accounts and implement communication between IP ranges 1 and 2:
VPC1
) above the list and then click +New to create a peering connection.VPC2
).If VPC2 belongs to another user, you need to notify the user of accepting your peering connection request.
PeerConn
) you want to accept, and click Accept.
- You must configure routes on both sides to implement communication over a peering connection.
- To enable communication between multiple IP ranges of the two VPCs, you simply need to add route table entries, instead of creating multiple peering connections.
Log in to the Virtual Private Cloud Console.
In the left sidebar, click Subnet to go to the Subnet page.
Click a route table (route table A) associated with the local subnet (subnet A) of the peering connection to go to the Route tablepage. Click ID/Name of the route table A to access its details.
Click + New routing policies.
Enter the peer CIDR (10.0.1.0/24
) for Destination, select Peering Connections for Next hop type, and select the peering connection created earlier (PeerConn) for Next hop.
Click Create. After the route table is configured, IP ranges of the two VPCs can communicate with each other.
Repeat the configuration on the peer route table.
문제 해결에 도움이 되었나요?