Create a VSwitch

A VSwitch is a basic network device of a VPC and 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. The VSwitches within a VPC interconnect. Therefore, you can deploy different applications in the different VSwitches of different zones to improve the service availability.

Ensure that you have previously created a VPC.

  1. Log on to the VPC console.
  2. On the left-side navigation pane, select VSwitches.
  3. Select the region of the VPC where you want to create a VSwitch.
  4. Select Create VSwitch. The Create VSwitchpage appears.
    Figure 1. Creating a VSwitch
  5. On the Create VSwitch page, set the following parameters, and then select OK.
    1. From the VPC menu, select a VPC to add the VSwitch.
    2. In Name, enter the name for the VPC.
    3. From the Zone menu, select the zone to add the VSwitch.
    4. In the IPv4 CIDR Blocktext box, enter the IPv4 CIDR block of the VSwitch.

     

    The IPv4 CIDR block of the VSwitch can be the same as the VPC to which the VSwitch belongs or be 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, or any CIDR block between 192.168.0.0/17 and 192.168.0.0/29.

    Note: If the CIDR block of the VSwitch is the same as that of the VPC, you can only create one VSwitch.

    The subnet mask of the VSwitch CIDR block can be 16 to 29 bits. It means that the VSwitch can provide 8 to 65,536 IP addresses.

    The first IP address and the last three IP addresses in the VSwitch CIDR block are reserved. For example, if the VSwitch CIDR block 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 of other VPCs or on-premises data centers, make sure that the CIDR blocks involved do not conflict with each other.

    Note: After creating the VSwitch, you cannot change the IPv4 CIDR block.