Route Table

In some regions, you can visit the route table module directly from the navigation pane on the left of the network console. You can associate subnets with a route table to facilitate flexible route management.

For details about the regions that you can visit the route table module directly from the navigation pane, see Route Table (Route Table Module Can Be Directly Accessed from the Navigation Pane), Default Route Table and Custom Route Table, and Route.

For details about the regions that you have to visit the route table module through the VPC details page, see Route Table (Route Table Module Can Be Accessed Through the VPC Details Page).

Route Table (Route Table Module Can Be Directly Accessed from the Navigation Pane)

A route table contains a set of rules, called routes, that are used to control where inbound and outbound subnet traffic is forwarded within a VPC. Each subnet in a VPC must be associated with a route table. A subnet can only be associated with one route table at a time, but you can associate multiple subnets with the same route table.

Figure 1 Route Table

Default Route Table and Custom Route Table

When you create a VPC, the system automatically generates a default route table for the VPC. If you create a subnet in the VPC, the subnet automatically associates with the default route table. You can add, delete, and modify routes in the default route table, but cannot delete the table. When you create a VPN, Direct Connect, or Cloud Connect connection, the default route table automatically delivers a route that cannot be deleted or modified. If you want to modify or delete the route, you can associate your subnet with a custom route table and replicate the route to the custom route table to modify or delete it.

You can also create a custom route table and associate subnets that have the same routing requirements with this table. Custom route tables can be deleted if they are no longer required.

To use a custom route table, you need to submit a service ticket. You need to click Increase quota on the Create Route Table page or choose More > Service Tickets > Create Service Ticket in the upper right corner of the page. For more information, see Submitting a Service Ticket.

Route

A route is configured with the destination, next hop type, and next hop to determine where the network traffic is directed. Routes are classified into system routes and custom routes.

  • System route: Routes that are automatically added by the system and cannot be modified or deleted.
    After a route table is created, the system automatically adds the following system routes to the route table, so that instances in a VPC can communicate with each other.
    • Routes whose destination is 100.64.0.0/10 or 198.19.128.0/20.
    • Routes whose destination is a subnet CIDR block.

      In addition to the preceding system routes, the system automatically adds a route whose destination is 127.0.0.0/8. This is the local loopback address.

  • Custom route: A route that can be modified and deleted. The destination of a custom route cannot overlap with that of a system route.

    You can add a custom route and configure the destination, next hop type, and next hop in the route to determine where the network traffic is directed. Table 1 lists the supported types of next hops.

    Table 1 Next hop type

    Next Hop Type

    Description

    ECS

    Traffic intended for the destination is forwarded to an ECS in the VPC.

    Extension NIC

    Traffic intended for the destination is forwarded to the extension NIC of an ECS in the VPC.

    VPN gateway

    Traffic intended for the destination is forwarded to a VPN gateway.

    Cloud connection

    Traffic intended for the destination is forwarded to a cloud connection.

    Direct Connect gateway

    Traffic intended for the destination is forwarded to a Direct Connect gateway.

    NAT gateway

    Traffic intended for the destination is forwarded to a NAT gateway.

    VPC peering connection

    Traffic intended for the destination is forwarded to a VPC peering connection.

    Virtual IP address

    Traffic intended for the destination is forwarded to a virtual IP address and then sent to active and standby ECSs to which the virtual IP address is bound.

    VPC endpoint

    Traffic intended for the destination is forwarded to a VPC endpoint.

    Cloud container

    Traffic intended for the destination is forwarded to a cloud container.

    • When you add a custom route to a default route table, the next hop type cannot be set to VPN gateway.
    • If you have to specify the destination when creating a service, a system route is delivered. If you do not need to specify a destination when creating a service, a custom route that can be modified or deleted is delivered automatically.

      For example, you do not need to specify a destination when creating a NAT gateway, the system automatically delivers a custom route that you can modify or delete. However, when you create a VPN gateway, you need to specify the remote subnet, that is, the destination of a route. In this case, the system delivers a system route. If the route destination can be modified on the Route Tables page, the destination will be inconsistent with that configured remote subnet. To modify the destination, you can go to the specific service page to modify the remote subnet, then the route destination will be changed accordingly.

Route Table (Route Table Module Can Be Accessed Through the VPC Details Page)

A route table contains a set of rules that determine where network traffic is directed. You can add routes to a route table to enable other ECSs in a VPC to access the Internet through the ECS that has a bound EIP.

You can use a route table configured in standalone or active/standby mode.

  • Figure 2 shows the route table configured in standalone mode.
    Figure 2 Route table configured in standalone mode

    In standalone mode, ECSs in a VPC that do not have EIPs bound access the Internet through an ECS that has an EIP bound and has SNAT function configured.

    You can create a route table for the VPC used by ECSs that do not have EIPs bound to enable these ECSs to access the Internet. The next hop in the route table is the private IP address of the ECS that has an EIP bound (the private IP address of the SNAT server).

  • Figure 3 shows the route table configured in active/standby mode.
    Figure 3 Route table configured in active/standby mode

    In active/standby mode, ECSs in a VPC that do not have EIPs bound access the Internet through two ECSs that have EIPs bound and have the SNAT function configured.

    In active/standby mode, you can add a route table for the VPC used by ECSs that do not have EIPs bound to enable these ECSs to access the Internet. The next hop in the route table is the virtual IP address of the two ECSs that have EIPs bound.