Classless Inter-Domain Routing (CIDR) is a method for allocating IP addresses and IP routing. Compared to the traditional Class A, B, or C addresses, CIDR block is more efficient in the IP address allocation. For example, the IP 220.127.116.11 - 18.104.22.168 in the CIDR form is:
125.203.0110 0000.0000 0000 to 125.203.0111 1111.1111 1111, or 203.96.0/19.
You have to specify the IP address range for the VPC and VSwitch in the form of a CIDR block when creating them.
You can use the standard private CIDR blocks (192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8) and their subsets as the IP address range of a VPC. When creating a VPC using the API, the allowed block size of the VPC CIDR block is between a /8 netmask and /24 netmask.
The allowed block size for a VSwitch is between a /16 netmask and /29 netmask, which can provide 8 to 65,536 IP addresses.
The CIDR block of the VSwitch can be the same as that of the VPC that it belongs to, or the subset of the VPC CIDR block.
Note: If the CIDR block of the VSwitch is the same as that of the VPC, you can only create one VSwitch.
The first and the last three IP addresses are reserved by the system. Take the CIDR block 192.168.1.0/24 as an example, the IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254 and 192.168.1.255 are reserved by the system.
The CIDR block of the VSwitch cannot be the same as that of the destination CIDR block of the route entry in the VPC, but can be the subset of it.