This topic describes how to enable IPv6 when you create a vSwitch. After IPv6 is enabled for a vSwitch, the system allocates an IPv6 CIDR block to the vSwitch.

Prerequisites

A virtual private cloud (VPC) is created and IPv6 is enabled for the VPC. For more information, see Create an IPv4 and IPv6 dual-stack VPC.

Procedure

  1. Log on to the VPC console.
  2. In the left-side navigation pane, click vSwitch.
  3. In the top navigation bar, select the region where you want to deploy the vSwitch.
    Note Regions that support IPv6 CIDR blocks: China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), China (Hong Kong), Singapore (Singapore), US (Virginia), and Germany (Frankfurt)..
  4. On the vSwitch page, click Create vSwitch.
  5. On the Create vSwitch page, set the following parameters for the vSwitch and click OK.
    Parameter Description
    Resource Group The resource group to which the vSwitch belongs.
    VPC The VPC to which the vSwitch belongs.
    IPv4 CIDR Block The IPv4 CIDR block of the VPC.
    IPv6 CIDR Block The IPv6 CIDR block of the VPC.
    Note If the specified VPC does not have an IPv6 CIDR block, click Enable IPv6 CIDR Block. After IPv6 is enabled for the VPC, the system automatically creates an IPv6 gateway which is free of charge.
    Name Enter a name for the vSwitch.

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

    Zone Select a zone for the vSwitch. In the same VPC, vSwitches in different zones can communicate with each other.
    IPv4 CIDR Block Specify an IPv4 CIDR block for the vSwitch. Take note of the following limits when you specify the CIDR block:
    • The CIDR block of the vSwitch must be a subset of the CIDR block of the VPC.

      For example, if the CIDR block of the VPC is 192.168.0.0/16, you can specify a CIDR block from 192.168.0.0/17 to 192.168.0.0/29 for the vSwitch.

    • The subnet mask of the vSwitch CIDR block must be 16 to 29 bits in length. This allows the vSwitch to provide 8 to 65,536 IP addresses.
    • The first IP address and last three IP addresses of a vSwitch are reserved.

      For example, if the CIDR block of a vSwitch 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 the vSwitch needs to communicate with vSwitches in other VPCs or with data centers, make sure that the CIDR blocks involved do not conflict with each other.
    • The CIDR block of a vSwitch cannot be the same as or larger than the destination CIDR block of a route in the route tables of the VPC to which the vSwitch belongs.

      For example, if a Cloud Enterprise Network (CEN) route (overlapping routing enabled) with a destination of 172.16.0.0/24 is added to a route table of the VPC, you cannot specify 172.16.0.0/24 or a larger CIDR block as the CIDR block of the vSwitch. However, you can specify 172.16.0.0/25 or a smaller CIDR block as the CIDR block of the vSwitch.

    Notice After you create a vSwitch, you cannot change its CIDR block.
    Available IP Addresses Displays the number of available IPv4 addresses of the vSwitch.
    IPv6 CIDR Block

    Specify an IPv6 CIDR block for the vSwitch.

    By default, the mask length of the IPv6 CIDR block for a vSwitch is /64. To specify the last 8 bits of the IPv6 CIDR block, enter a number from 0 to 255.

    For example, if the IPv6 CIDR block of the VPC that contains the vSwitch is 2xx1:db8::/64, you can enter 255 (FF in hexadecimal notation) in this field to set the IPv6 CIDR block of the vSwitch to 2xx1:db8:ff::/64.

    Description The description of the vSwitch.

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