To create a VPC peering connection, first create a request to peer with another VPC. You can request a VPC peering connection with another VPC in your account, but the two VPCs must be in the same region. The system automatically accepts the request.
Two VPCs in the same region have been created.
in the upper left corner and select the desired region and project.
Parameter |
Description |
Example Value |
|---|---|---|
Name |
The name of the VPC peering connection. The name contains a maximum of 64 characters, which consist of letters, digits, hyphens (-), and underscores (_). |
peering-001 |
Local VPC |
The local VPC. You can select one from the drop-down list. |
vpc_002 |
Local VPC CIDR Block |
The CIDR block for the local VPC. |
192.168.10.0/24 |
Account |
The account to which the peer VPC belongs.
|
My account |
Peer Project |
The peer project name. The project name of the current project is used by default. |
aaa |
Peer VPC |
The peer VPC. You can select one from the drop-down list if the VPC peering connection is created between two VPCs in your own account. |
vpc_fab1 |
Peer VPC CIDR Block |
The CIDR block for the peer VPC. The local and peer VPCs cannot have matching or overlapping CIDR blocks. Otherwise, the routes added for the VPC peering connection may not take effect. |
192.168.2.0/24 |
If you request a VPC peering connection with another VPC in your own account, the system automatically accepts the request. To enable communication between the two VPCs, you need to add local and peer routes on the Route Tables page for the VPC peering connection.
The page showing the VPC peering connection details is displayed.
The Summary tab of the default route table for the local VPC is displayed.
Table 2 describes the route parameters.
The Summary tab of the route table associated with the subnet is displayed.
Table 2 describes the route parameters.
Parameter |
Description |
Example Value |
|---|---|---|
Destination |
The peer VPC CIDR block, subnet CIDR block, or ECS IP address. For details, see VPC Peering Connection Configuration Plans. |
192.168.0.0/16 |
Next Hop Type |
The next hop type. Select VPC peering connection. |
VPC peering connection |
Next Hop |
The next hop address. Select the name of the current VPC peering connection. |
peering-001 |
Description |
Supplementary information about the route. This parameter is optional. The route description can contain a maximum of 255 characters and cannot contain angle brackets (< or >). |
- |
The Summary tab of the default route table for the peer VPC is displayed.
Table 3 describes the route parameters.
The Summary tab of the route table associated with the subnet is displayed.
Table 3 describes the route parameters.
Parameter |
Description |
Example Value |
|---|---|---|
Destination |
The local VPC CIDR block, subnet CIDR block, or ECS IP address. For details, see VPC Peering Connection Configuration Plans. |
192.168.2.0/16 |
Next Hop Type |
The next hop type. Select VPC peering connection. |
VPC peering connection |
Next Hop |
The next hop address. Select the name of the current VPC peering connection. |
peering-001 |
Description |
Supplementary information about the route. This parameter is optional. The route description can contain a maximum of 255 characters and cannot contain angle brackets (< or >). |
- |
After a VPC peering connection is created, the two VPCs can communicate with each other through private IP addresses. You can run the ping command to check whether the two VPCs can communicate with each other.
If two VPCs cannot communicate with each other, check the configuration by following the instructions provided in Why Did Communication Fail Between VPCs That Were Connected by a VPC Peering Connection?