This topic describes how to add a custom route entry. After you create a Virtual Private Cloud (VPC) network, the system creates a default route table and adds system route entries to the route table for traffic management. You cannot create or delete system route entries. However, you can create custom route entries to route traffic from source CIDR blocks to specific destinations.

Background information

Each entry in the route table is a route entry. A route entry, which specifies the destination for network traffic, consists of the destination CIDR block, next hop type, and 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. In the top navigation bar, select the region to which the route tables belong.
  4. On the Route Tables page, find the 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, set the following parameters and click OK.
    Parameter Description
    Name The name of the route entry.

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

    Destination CIDR Block The destination CIDR block to which you want to route traffic.
    Next Hop Type The type of the next hop. Valid values:
    • ECS Instance: Traffic destined for the specified CIDR block is routed 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 the Internet-facing gateway to manage the traffic from other ECS instances to the Internet.

    • VPN Gateway: Traffic destined for the specified CIDR block is routed to the VPN gateway you select.
    • NAT Gateway: Traffic destined for the specified CIDR block is routed to the NAT gateway you select.
    • Secondary ENI: Traffic destined for the specified CIDR block is routed to the secondary elastic network interface (ENI) you select.
    Resource Group Select the resource group of the next hop.

    This option appears only when you set Next Hop Type to ECS Instance or Secondary ENI.

    ECS Instance/VPN Gateway/NAT Gateway/Secondary ENI Select the next-hop instance.