Each virtual private cloud (VPC) comes with a default route table pre-configured with system route entries that direct traffic flowing in and out of the VPC. You cannot create or delete system route entries. However, you can create custom route entries to route traffic destined for specific Classless Inter-domain Routing (CIDR) blocks to the destinations that you define.

Background information

Each route entry in the route table defines a route that is used to direct traffic, and consists of multiple fields, including the destination CIDR block, the next hop for the traffic, and the type of the next hop. Route entries are classified into system route entries and custom route entries.

You can add custom route entries to both system and custom route tables.

Procedure

  1. Log on to the VPC console.
  2. In the left-side navigation pane, click Route Tables.
  3. Select the region of the target route table.
  4. On the Route Tables page, find the target route table and click Manage in the Actions column.
  5. In the Route Table Details section, click the Route Entry List tab, and then click Add Route Entry.
  6. On the Add Route Entry page, configure the route entry, and then click OK.
    Parameter Description
    Name Enter a name for the route entry.

    The name must be 2 to 128 characters and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). The name must start with a letter or a Chinese character.

    Destination CIDR Block Specify the destination CIDR block.
    Next Hop Type Select the type of the next hop. Valid values:
    • ECS Instance: Traffic destined for the specified CIDR block is directed to the Elastic Compute Service (ECS) instance you select.

      Select this type if you want to route traffic to an ECS instance for centralized traffic forwarding and management. For example, when an ECS instance is configured as a public network gateway to control the traffic from other ECS instances to the public network.

    • VPN Gateway: Traffic destined for the specified CIDR block is directed to the VPN gateway you select.
    • NAT Gateway: Traffic destined for the specified CIDR block is directed to the NAT gateway you select.
    • Secondary ENI: Traffic destined for the specified CIDR block is directed to a secondary elastic network interface (ENI) you select.
    Resource Group Select the resource group of the next hop.
    ECS Instance/VPN Gateway/NAT Gateway/Secondary Network Interface Select the next-hop instance.