This topic describes how to expand a Virtual Private Cloud (VPC) network by adding a secondary IPv4 CIDR block to the VPC network.

Prerequisites

A VPC network is created. For more information, see Create a VPC.

Background information

When you create a VPC network, you must specify the primary IPv4 CIDR block of the VPC network. After the VPC network is created, the primary IPv4 CIDR block of the VPC network cannot be modified. However, you can add a secondary IPv4 CIDR block to expand the VPC network. After you add the secondary IPv4 CIDR block, you can create a VSwitch with the primary CIDR block or secondary CIDR block. However, each VSwitch belongs to only one VPC CIDR block.

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.

Secondary IPv4 CIDR block
Note By default, you can add only one secondary IPv4 CIDR block to each VPC network. You can submit a ticket to increase the quota. After your application is approved, up to three secondary IPv4 CIDR blocks can be added to a VPC network.

Procedure

  1. Log on to the VPC console.
  2. On the top of the page, select the region where your VPC network is deployed.
  3. On the VPC page, find the VPC network that you want to manage, and click Manage in the Actions column.
  4. On the VPC details page, click CIDRstab, and click Add IPv4 CIDR.
  5. 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:
    • 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.

    You must follow these rules when you add a secondary IPv4 CIDR block:
    • 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.

What to do next

Create a VSwitch