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 are interconnected. Therefore, you can deploy different applications in the different VSwitches of different zones to improve the service availability.
Ensure that you have already created a VPC.
- Log on to the VPC console.
- In the left-side navigation pane, click VSwitches.
- Select the region of the VPC in which you want to create a VSwitch.
- Click Create VSwitch.
The Create VSwitch page appears.
- On the Create VSwitch page, set the following parameters, and then click OK.
- From the VPC drop-down menu, select a VPC to which the VSwitch belongs.
- In the Name text box, enter the name for the VPC.
- From the Zone drop-down menu, select the zone to which the VSwitch belongs.
- In the IPv4 CIDR Block text box, enter the IPv4 CIDR block of the VSwitch.
Note: After the VSwitch is created, you cannot change its IPv4 CIDR block.
- The IPv4 CIDR block of the VSwitch can be the same as that of 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, you need to make sure that the CIDR blocks involved do not conflict with each other.