This topic describes how to create a virtual private cloud (VPC). A VPC functions as a private network deployed in the cloud You have full control over your VPC. For example, you can specify Classless Inter-domain Routing (CIDR) blocks, configure route tables, and set network gateways for your VPC. You can deploy Alibaba Cloud resources in your own VPC, such as Elastic Compute Service (ECS) instances, ApsaraDB for RDS instances, and Server Load Balancer (SLB) instances.

Prerequisites

Before you create a VPC, you must have network subnetting prepared. For information, see Plan and design a VPC.

Procedure

  1. Log on to the VPC console.
  2. In the top navigation bar, select the region where you want to deploy the VPC.
    Note The VPC must be in the same region as the cloud resources that you want to deploy.
  3. On the VPC page, click Create VPC.
  4. On the Create VPC page, set the following parameters and click OK.
    Parameter Description
    VPC
    Region The region where the VPC to be deployed.
    Name Enter a name for the VPC that you want to create.

    The name must be 2 to 128 characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter.

    IPv4 CIDR Block Select the primary IPv4 CIDR block for the VPC. The following setting methods are supported:
    • Default CIDR Block: You can use one of the following standard IPv4 CIDR blocks: 192.168.0.0/16, 172.16.0.0/12, and 10.0.0.0/8.
    • Custom CIDR Block: You can use 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8, and their subnets as the primary IPv4 CIDR blocks of your VPC. The CIDR block mask must be 8 to 24 bits in length. For example, enter 192.168.0.0/16. To use a public CIDR block as the primary CIDR block of the VPC,submit a ticket.
    Note After you create a VPC, you cannot change its primary IPv4 CIDR block. However, you can add a secondary IPv4 CIDR block to the VPC. For more information, see Add a secondary IPv4 CIDR block.
    Description The description of the VPC.

    The description must be 2 to 256 characters in length and cannot start with http:// or https://.

    VSwitch
    Name Enter a name for the VSwitch.

    The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.

    Zone Select a zone for the VSwitch. In a VPC, VSwitches in different zones can communicate with each other.
    Zone Resource Displays the cloud instances that can be created in the specified zone.

    The supported cloud resources vary based on the zone and the time when you create cloud resources. The buy page displays whether the cloud instances are available. Only ECS, RDS, and SLB instances can be queried on the buy page.

    IPv4 CIDR Block Specify an IPv4 CIDR block for the VSwitch.
    Note the following limits when you specify an IPv4 CIDR block:
    • The CIDR block of a VSwitch must be a subset of the CIDR block of the VPC to which the VSwitch belongs.

      For example, if the CIDR block of the VPC is 192.168.0.0/16, the CIDR block of the VSwitch in the VPC can be any CIDR block from 192.168.0.0/17 to 192.168.0.0/29.

    • The first and last three IP addresses in the VSwitch CIDR block are reserved.

      For example, if the VSwitch CIDR block is 192.168.1.0/24, the IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255 are reserved.

    • If a VSwitch needs to communicate with the VSwitches in other VPCs or on-premises data centers, make sure that the CIDR blocks involved do not overlap with each other.
    Note After you create a VSwitch, you cannot modify the CIDR block.
    Number of Available Private IPs Displays the number of available IP addresses.
    Description Enter a description for the VSwitch.

    The description must be 2 to 256 characters in length and cannot start with http:// or https://.