A VPC comes with a default subnet. If the default subnet cannot meet your requirements, you can create one.
A subnet is configured with DHCP by default. When an ECS in this subnet starts, the ECS automatically obtains an IP address using DHCP.
The Virtual Private Cloud page is displayed.
The Create Subnet page is displayed.
Parameter |
Description |
Example Value |
---|---|---|
VPC |
The VPC for which you want to create a subnet. |
- |
Name |
The subnet name. The name can contain a maximum of 64 characters, which may consist of letters, digits, underscores (_), hyphens (-), and periods (.). The name cannot contain spaces. |
Subnet |
IPv4 CIDR Block |
The CIDR block for the subnet. This value must be within the VPC CIDR block. If the VPC has a secondary CIDR block, you can select the primary or the secondary CIDR block that the subnet will belong to based on service requirements. |
192.168.0.0/24 |
IPv6 CIDR Block |
Specifies whether to set IPv6 CIDR Block to Enable. If you select this option, the system automatically assigns an IPv6 CIDR block to the created subnet. Currently, the IPv6 CIDR block cannot be customized. IPv6 cannot be disabled after the subnet is created. |
- |
Associated Route Table |
The default route table to which the subnet will be associated. You can change the route table to a custom route table on the Subnets page. |
Default |
Advanced Settings/Gateway |
The gateway address of the subnet. |
192.168.0.1 |
Advanced Settings/DNS Server Address |
By default, two DNS server addresses are configured. You can change them if necessary. A maximum of five DNS server addresses can be configured. Multiple IP addresses must be separated using commas (,). |
100.125.x.x |
Advanced Settings/NTP Server Address |
The IP address of the NTP server. This parameter is optional. You can configure the NTP server IP addresses to be added to the subnet as required. The IP addresses are added in addition to the default NTP server addresses. If you do not specify this parameter, no additional NTP server IP addresses will be added. A maximum of four IP addresses can be configured. Multiple IP addresses must be separated using commas (,). |
192.168.2.1 |
Advanced Settings/Tag |
The subnet tag, which consists of a key and value pair. You can add a maximum of 20 tags to each subnet. The tag key and value must meet the requirements listed in Table 2. |
|
Advanced Settings/Description |
Supplementary information about the subnet. This parameter is optional. The subnet description can contain a maximum of 255 characters and cannot contain angle brackets (< or >). |
- |
Parameter |
Requirements |
Example Value |
---|---|---|
Key |
|
subnet_key1 |
Value |
|
subnet-01 |
When a subnet is created, there are five reserved IP addresses, which cannot be used. For example, in a subnet with CIDR block 192.168.0.0/24, the following IP addresses are reserved:
If you configured the default settings under Advanced Settings during subnet creation, the reserved IP addresses may be different from the default ones, but there will still be five of them. The specific addresses depend on your subnet settings.