This topic describes how to add a custom route entry. After you create a virtual private cloud (VPC), the system creates a system route table and adds system route entries to the route table. The system route entries are used to route traffic within the VPC. 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

Each entry in the route table is a route entry. A route entry, which consists of the destination CIDR block, type of next hop, and next hop, specifies the destination for network traffic. Route entries include system route entries and custom route entries. You can add custom route entries to system route tables and custom route tables.

Add a custom route entry

  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 table belongs.
  4. On the Route Tables page, find the route table that you want to manage and click the ID of the route table.
  5. In the Route Table Details section, click the Route Entry List tab, and then click Add Route Entry.
  6. In the Add Route Entry panel, set the following parameters and click OK.
    Parameter Description
    Name Enter a name for the route entry.

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

    Destination CIDR Block The CIDR block to which you want to forward traffic.
    Next Hop Type Select the type of next hop. Valid values:
    • ECS Instance: Traffic destined for the specified CIDR block is routed to the specified Elastic Compute Service (ECS) instance.

      Select this type if you want to route traffic to an ECS instance for centralized traffic forwarding and management. For example, you can configure an ECS instance as the Internet-facing gateway to route the traffic from other ECS instances to the Internet.

    • HaVip Address: Traffic destined for the specified CIDR block is routed to the high-availability virtual IP address (HAVIP) that you select.
    • VPN Gateway: Traffic destined for the specified CIDR block is routed to the virtual private network (VPN) gateway that you select.
    • NAT Gateway: Traffic destined for the specified CIDR block is routed to the network address translation (NAT) gateway that you select.
    • Secondary ENI: Traffic destined for the specified CIDR block is routed to the secondary elastic network interface (ENI) that you select.
    Resource Group Select the resource group to which the next hop belongs.

    This parameter is required only when you set Next Hop Type to ECS Instance or Secondary ENI.

    ECS Instance/HaVip Address/VPN Gateway/NAT Gateway/Secondary Network Interface Select an instance as the next hop.

Export route entries

You can export route entries from a route table. The exported route entries can be stored as backups on your computer.

  1. Log on to the VPC console.
  2. In the left-side navigation pane, click Route Tables.
  3. On the Route Tables page, find the route table that you want to manage and click the ID of the route table.
  4. In the Route Table Details section, click the Route Entry List tab, and then click Export.
    The route entries are exported to a .csv file on your computer.

Delete a route entry

A route table consists of one or more route entries. Each route entry specifies the destination network to which traffic is routed. You can delete custom route entries. However, you cannot delete system route entries.

  1. Log on to the VPC console.
  2. In the left-side navigation pane, click Route Tables.
  3. On the Route Tables page, find the route table that you want to manage and click the ID of the route table.
  4. On the Route Entry List tab, find the custom route that you want to delete and click Delete in the Actions column.
  5. In the Delete Route Entry message, click OK.