• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. User Guide
  4. Custom Route
  5. Adding a Route

Adding a Route

Scenarios

When ECSs in a VPC need to access the Internet, add a custom route to enable the ECSs to access the Internet through the ECS that has an EIP bound.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. On the console homepage, under Network, click Virtual Private Cloud.
  4. In the navigation pane on the left, click Virtual Private Cloud.
  5. On the Virtual Private Cloud page, locate the VPC to which a route is to be added and click the VPC name.
  6. On the Route Tables tab, click Add Route.
  7. Set route information on the displayed page.
    • Destination indicates the destination CIDR block. The default value is 0.0.0.0/0. If the traffic originates from a VPC, the destination can be a subnet CIDR block in this VPC. If the traffic originates from outside the VPC, the destination CIDR block cannot conflict with the existing subnet CIDR blocks in this VPC. The destination of each route must be unique.
    • Next Hop: indicates the IP address of the next hop. Set it to a private IP address or a virtual IP address in a VPC.
    NOTE:

    If the next hop is a virtual IP address, an EIP must be bound to the virtual IP address. Otherwise, access to the Internet through this virtual IP address is not allowed. (A custom route is used to forward traffic from the virtual IP address to the Internet.)

  8. Click OK.