Virtual Private Cloud

更新时间:
复制 MD 格式

Manage vSwitches

If your workspace is in a virtual private cloud (VPC), you can manage vSwitches on the VPC details page. vSwitches in the same VPC can communicate with each other.

Create a vSwitch

You can create vSwitches to divide a VPC into one or more subnets.

Prerequisites

You have created a VPC.

Procedure

  1. Go to the Resource Management console. In the navigation pane on the left, click Compute & Network > Virtual Private Cloud to go to the VPC details page.

  2. On the vSwitches tab, click Add.

  3. In the Create vSwitch dialog box, configure the following parameters and click OK.

    • Name: Enter a name for the vSwitch.

    • Zone: Select a zone for the vSwitch. vSwitches in different zones within the same VPC can communicate with each other. Deploying vSwitches in different zones enables cross-zone disaster recovery.

    • Custom CIDR Block: This option is disabled by default. If you enable this option, enter a CIDR block. The CIDR block of the vSwitch can be the same as the CIDR block of its VPC, or a subnet of the VPC's CIDR block.

    • Subnet Mask: If Custom CIDR Block is disabled, select a subnet mask and a CIDR block. The default CIDR block mask is 16 bits, such as 172.31.0.0/16, which provides up to 65,536 private IP addresses. The mask can range from 16 to 29 bits, which provides from 4 to 65,532 addresses.

    • Description: Optional. Enter a description for the vSwitch.

Edit a vSwitch

After you create a vSwitch, you can edit its name and description.

Prerequisites

A vSwitch has been created.

Procedure

  1. Go to the Resource Management console. In the navigation pane on the left, click Compute & Network > Virtual Private Cloud to go to the VPC details page.

  2. On the vSwitches tab, find the vSwitch that you want to edit and click Edit in the Actions column. The Name and Description columns become editable. After you make the changes, click Save.

Delete a vSwitch

You can delete vSwitches that are no longer needed.

Prerequisites

  • A vSwitch has been created.

  • Before you delete a vSwitch, make sure that its Associated Resource Instances count is 0. Otherwise, the deletion will fail.

Procedure

  1. Go to the Resource Management console. In the navigation pane on the left, click Compute & Network > Virtual Private Cloud to go to the VPC details page.

  2. On the vSwitches tab, find the vSwitch that you want to delete and click Delete in the Actions column. In the confirmation dialog box that appears, click OK.

Manage custom route entries

After you create a VPC and a vSwitch, the system automatically creates system route entries to manage traffic for the VPC.

Add a custom route entry

You cannot create system route entries. However, you can create custom route entries to route traffic for a specific destination CIDR block to a specified next hop.

Prerequisites

  • You have created a VPC.

  • To route traffic to another VPC environment, you must first create a router interface.

Procedure

  1. Go to the Resource Management console. In the navigation pane on the left, click Compute & Network > Virtual Private Cloud to go to the VPC details page.

  2. Click the Route Entries tab and then click Add.

  3. In the dialog box that appears, configure the following parameters and click OK.

    • Destination CIDR Block: The destination CIDR block for the traffic that you want to forward. This must be a valid CIDR block or IP address, such as 192.168.0.0/24 or 192.168.0.1.

    • Next Hop Type: Select ECS Instance to route traffic to a selected ECS instance. Select Router Interface to route traffic to a selected VPC.

    • Based on your selection for Next Hop Type, configure one of the following parameters:

      • Next Hop ECS Instance: Select the destination ECS instance.

      • Next Hop Router Interface: Select the destination router interface.

Delete a custom route entry

You can delete custom route entries, but you cannot delete system route entries.

Prerequisites

A custom route entry has been added.

Procedure

  1. Go to the Resource Management console. In the navigation pane on the left, click Compute & Network > Virtual Private Cloud to go to the VPC details page.

  2. Click the Route Entries tab. Find the custom route entry that you want to delete and click Delete in the Actions column. In the confirmation dialog box that appears, click OK.