Scenarios

A VPC provides an isolated virtual network for ECSs. You can configure and manage the network as required.

Create a VPC by following the procedure provided in this section. Then, create subnets, security groups, and assign EIPs by following the procedure provided in subsequent sections based on your actual network requirements.

Procedure

  1. Log in to the management console.
  2. On the console homepage, under Network, click Virtual Private Cloud.
  3. On the Dashboard page, click Create VPC.
  4. On the Create VPC page, set parameters as prompted.

    During VPC creation, a default subnet will be created, but you can also click Add Subnet to create more subnets for the VPC.

    You can set Advanced Settings to Custom to configure advanced subnet parameters.
    Table 1 VPC parameter description

    Parameter

    Description

    Example Value

    Region

    Specifies the desired region. Regions are geographic areas that are physically isolated from each other. The networks inside different regions are not connected to each other, so resources cannot be shared across different regions. For lower network latency and faster access to your resources, select the region nearest you.

    AP-Hong Kong

    Name

    Specifies the VPC name.

    The VPC flow log name can contain a maximum of 64 characters, which may consist of letters, digits, underscores (_), hyphens (-), and periods (.). The name cannot contain spaces.

    VPC-001

    CIDR Block

    Specifies the CIDR block for the VPC. The CIDR block of a subnet can be the same as the CIDR block for the VPC (for a single subnet in the VPC) or a subset (for multiple subnets in the VPC).

    The following CIDR blocks are supported:

    10.0.0.0 – 10.255.255.255

    172.16.0.0 – 172.31.255.255

    192.168.0.0 – 192.168.255.255

    192.168.0.0/16

    Table 2 Subnet parameter description

    Parameter

    Description

    Example Value

    Name

    Specifies the subnet name.

    The VPC flow log name can contain a maximum of 64 characters, which may consist of letters, digits, underscores (_), hyphens (-), and periods (.). The name cannot contain spaces.

    Subnet

    CIDR Block

    Specifies the CIDR block for the subnet. This value must be within the VPC CIDR block.

    192.168.0.0/24

    Advanced Settings

    Click the drop-down arrow to set advanced settings for the subnet, including Gateway and DNS Server Address.

    Default

    Gateway

    Specifies the gateway address of the subnet.

    This IP address is used to communicate with other subnets.

    192.168.0.1

    DNS Server Address

    By default, there are two DNS server addresses configured (including two private DNS server addresses or one private DNS server address and one public DNS server address. A private DNS server address takes precedence over a public DNS server address). In this way, services in the VPC can access cloud services through the private DNS server address, reducing the latency. If you want to use other public DNS servers for resolution, you can change the default DNS server addresses.

    100.125.x.x

  5. Confirm the current configuration and click Create Now.