Virtual Private Cloud (VPC) is a private network dedicated to you Alibaba Cloud.  You have full control over your VPC, such as specifying its IP address range, and configuring route tables and network gateways. You can also use Alibaba Cloud resources such as ECS, RDS, and SLB in your own VPC.

VPC components

VRouter and VSwitch are two basic components of VPC:
  • VRouter connects VSwitches in a VPC and serves as the gateway connecting the VPC with other networks.  A VRouter is automatically created after a VPC is created. Each VRouter associates with a route table. For more information, see VRouter and route entries.

  • VSwitch is a basic network device in a VPC, used to connect different cloud product instances.  After creating a VPC, you can further segment your virtual private network to one or more subnets by creating VSwitches.  You can deploy an application in different VSwitches located in different zones to improve the service availability.  VSwitches in different zones of a VPC can communicate with each other through the Intranet by default. For more information, seeManage a VSwitch



IP address range (CIDR block)

When creating a VPC, you must specify the IP address range for the VPC in the form of a Classless Inter-Domain Routing (CIDR) block.  Use the following standard private CIDR blocks or their subsets as the IP address range. The selection of CIDR block is related to your network planning. For more information, see Plan and design VPC.

If you want to use a subnet of a standard CIDR block as the IP address range, you must use the CreateVpc API to create a VPC.

CIDR block Number of available private IPs
192.168.0.0/16 65,532
172.16.0.0/12 1,048,572
10.0.0.0/8 16,777,212

Create a VPC and a VSwitch

To deploy cloud resources in a VPC, you must create at least one VSwitch. Complete these steps to create a VPC and a VSwitch:
  1. Log on to the VPC console.
  2. Select the region of the VPC.

    The VPC and the cloud resources to deploy must locate in the same region.

  3. Click Create VPC, configure the VPC according to the following information and click OK.
    Configuration Description
    VPC configurations
    Name Enter the name of the VPC.

    The name can contain 2-128 characters. It must begin with English or Chinese characters and can contain numbers, hyphens (-) and underlines (_).

    CIDR Select the CIDR block of the VPC.  Limitations on VPC CIDR blocks are as follows:
    • You can use 192.168.0.0/16, 172.16.0.0/12, or 10.0.0.0/8, the three standard CIDR blocks and their subsets. If you want to use a subnet of a standard CIDR block as the IP address range, you must use API to create a VPC.

    • If you want to connect a VPC to another VPC or to a local network to build a hybrid cloud, we recommend that you use a subset of the standard CIDR blocks, and make sure that the network mask is no longer than /16.

    • If you only have one VPC and it does not need to communicate with your local network, you can use any of the standard CIDR blocks or their subnets.

    Note
    After the VPC is created, you cannot change its CIDR block.
    VSwitch configurations
    Name Enter the name of the VSwitch.

    The name can contain 2-128 characters. It must begin with English or Chinese characters and can contain numbers, hyphens (-) and underlines (_).

    Zones Select the zone of the VSwitch. In a VPC, VSwitches in different zones can communicate with each other through the intranet.
    CIDR Enter the CIDR block of the VSwitch. Note the following when specifying the VSwitch CIDR block:
    • The CIDR block of the VSwitch can be the same as that of the VPC to which it belongs, or a subset of the VPC CIDR block.

      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 192.168.0.0/16, 192.168.0.0/17, …, till 192.168.0.0/29.

      Note
      If the CIDR block of the VSwitch is the same as that of the VPC to which it belongs, you can only create one VSwitch in the VPC.
    • The size of a VSwitch CIDR block must be between a 16-bit netmask and a 29-bit netmask, providing 8 to 65,536 addresses.

    • The first and last three IP addresses of the VSwitch are reserved by the system.

      Take the IP address range 192.168.1.0/24 as an example, IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255 are reserved by the system.

    • Consider the number of cloud instances to be created in the VSwitch. Up to 15000 instances can be created in a VPC.

    Note
    After the VPC is created, you cannot change its CIDR block.

Delete a VPC

Make sure that you have deleted all switches under this proprietary network. Make sure you have deleted VSwitches in the VPC. After the VPC is deleted, the associated routers and routing tables are also deleted.

Complete these steps to delete a VPC:
  1. On the VPC console, select the region of the VPC.
  2. Find the target VPC and click Delete.
  3. In the pop-up dialog box, click OK.

Attach to a CEN instance

You can attach a VPC to a created CEN instance, so that the VPC can communicate with other VPCs in the CEN instance or local data centers. For more information, see What is Cloud Enterprise Network.

Complete these steps to quickly attach a VPC to a CEN instance under the same account:
  1. On the VPC console, select the region of the VPC.
  2. Click the ID of the target VPC.
  3. On the VPC Details page, click Attach to CEN.
  4. Select the created CEN instance and click OK.

Enable the ClassicLink function

You can enable the ClassicLink function to build ClassicLink connection. Therefore, an ECS instance in the classic network can communicate with cloud resources in VPC. For more information, see ClassicLink overview.

Complete these steps to enable the ClassicLink function:
  1. On the VPC console, select the region of the VPC.
  2. Click the ID of the target VPC.
  3. On the VPC Details page, click Enable the ClassicLink.
  4. Click OK.

Related APIs

CreateVpc

DeleteVpc

DescribeVpcs

ModifyVpcAttribute