A VSwitch is a basic network device in a Virtual Private Cloud (VPC) network and is used to connect cloud resources.

Background information

After you create a VPC network, you can create VSwitches to divide the VPC network into one or more subnets. VSwitches within the same VPC network can communicate with each other. Cloud resources must be deployed within the CIDR blocks of VSwitches. You can deploy applications in zones that are managed by different VSwitches to improve service availability.
Note VSwitches do not support multicast or broadcast.

Procedure

  1. Log on to the VPC console.
  2. In the left-side navigation pane, click VSwitches.
  3. In the top navigation bar, select the region where you want to deploy the VSwitch.
  4. On the VSwitches page, click Create VSwitch.
  5. In the Create VSwitch pane, set the following parameters and click OK.
    Note IPv6 CIDR blocks are supported in the following regions: China (Shenzhen), China (Beijing), China (Hohhot), China (Shanghai), and China (Hong Kong). After you enable the IPv6 CIDR block feature, the system automatically creates an IPv6 gateway.
    Parameter Description
    VPC Select the VPC network to which the VSwitch belongs.
    CIDR Displays the IPv4 CIDR block of the VPC network.

    If the VPC network has a secondary IPv4 CIDR block, you can select the primary or secondary CIDR block for the VSwitch based on your business requirements.

    IPv6 CIDR Block Displays the IPv6 CIDR block of the VPC network.
    Note If the IPv6 CIDR block feature is not enabled for the VPC network, click Enable IPv6 CIDR Block. After the IPv6 CIDR block feature is enabled, the system automatically creates an IPv6 gateway that is free of charge.
    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 or a Chinese character.

    Zone Select a zone for the VSwitch. In a VPC network, VSwitches in different zones can communicate with each other.
    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 the VSwitch must be a subset of the CIDR block of the VPC network.

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

    • The first and last three IP addresses of each 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 is required to communicate with VSwitches in other VPC networks or with on-premises data centers, make sure that the CIDR block of the VSwitch does not overlap with the destination CIDR blocks.
    • The CIDR block of a VSwitch cannot be the same as or larger than the destination CIDR block of a route in the route table of the VPC network to which the VSwitch belongs.

      For example, if a Cloud Enterprise Network (CEN) route (overlapping routing enabled) with a destination CIDR block of 172.16.0.0/24 is already added to the route table of the VPC network, the CIDR block of the VSwitch must fall within 172.16.0.0/24. You can use 172.16.0.0/25 or a smaller CIDR block as the CIDR block of the VSwitch.

    • CIDR blocks of VSwitches in the same VPC network cannot overlap with each other. If a CIDR block overlaps with another one, you must modify the CIDR block.
    Notice After you create a VSwitch, you cannot modify its CIDR block.
    Number of Available Private IPs 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 for the IPv6 CIDR block of a VSwitch is /64. You can enter a number from 0 to 255 to define the last 8 bits of the IPv6 CIDR block.

    For example, if the IPv6 CIDR block of the VPC network is 2xx1:db8::/64, you can enter ff (the hexadecimal string of 255) for the IPv6 CIDR block of the VSwitch. The IPv6 CIDR block of the VSwitch is 2xx1:db8:ff::/64.

    Description Enter a description for the VSwitch.

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