This topic describes how to expand a Virtual Private Cloud (VPC) network by adding a secondary IPv4 CIDR block to the VPC network.
The system automatically adds a VSwitch route to the VPC route table when you create a VSwitch with the primary or secondary CIDR block. The destination CIDR block of a VSwitch route is the CIDR block with which the VSwitch is created. The CIDR block range can not be the same as or larger than those of other routes in the route table of the VPC network.
For example, you have added 172.16.0.0/16 to the VPC network as a secondary IPv4 CIDR block. The VPC route table already contains CEN routes (overlapping routing is enabled), and the destination CIDR block is 172.16.0.0/24. In this case, you cannot create a VSwitch with a CIDR block that is the same or larger than the CIDR block 172.16.0.0/24. However, you can create a VSwitch with the CIDR block 172.16.0.0/25 or a smaller one.
- Log on to the VPC console.
- On the top of the page, select the region where your VPC network is deployed.
- On the VPC page, find the VPC network that you want to manage, and click Manage in the Actions column.
- On the VPC details page, click CIDRstab, and click Add IPv4 CIDR.
- In the Add Secondary CIDR dialog box, configure a secondary IPv4 CIDR block based on the following information, and click OK.
Parameter Description VPC The VPC network to which you want to add the secondary IPv4 CIDR block. Secondary CIDR Select a method to configure the secondary IPv4 CIDR block:
You must follow these rules when you add a secondary IPv4 CIDR block:
- Default CIDR Block: You can specify one of the following standard IPv4 CIDR blocks as the secondary IPv4 CIDR block: 192.168.0.0/16, 172.16.0.0/12, and 10.0.0.0/8.
- Custom CIDR Block: You can specify one of the following standard IPv4 CIDR blocks and their subnets as the secondary IPv4 CIDR block: 192.168.0.0/16, 172.16.0.0/12, and 10.0.0.0/8.
If you need to specify a public IP address range as the secondary IPv4 CIDR block of a VPC network, submit a ticket.
- The CIDR block cannot start with 0. The mask must be 8 to 24 bits in length.
- The secondary CIDR block cannot overlap with the primary CIDR block or other secondary CIDR blocks of the VPC network.
For example, the primary IPv4 CIDR block of a VPC network is 192.168.0.0/16, you cannot specify the following CIDR blocks as secondary IPv4 CIDR blocks:
- A larger CIDR block that overlaps with 192.168.0.0/16, such as 192.168.0.0/8.
- CIDR block 192.168.0.0/16.
- A smaller CIDR block that overlaps with 192.168.0.0/16, such as 192.168.0.0/24.