This topic describes how to create a custom route entry. After you create a custom route entry, you can route traffic from a CIDR block to a destination CIDR block.
You can add custom route entries to a system route table or a custom route table.
- Log on to the VPC console.
- In the left-side navigation pane, click Route Tables.
- Select the region to which the target route table belongs.
- On the Route Tables page, find the target route table, and then click Manage in the Actions column.
- In the Route Table Details area, click Route Entry List tab, and then click Add Route Entry.
- On the Add Route Entry page, set the parameters, and then click OK. The following table describes the parameters.
Configuration Description Name Enter the name of the route entry.
The name must be 2 to 128 characters in length and can contain letters, numbers, hyphens (-), and underscores (_). It must start with a letter.
Destination CIDR Block Specify the destination CIDR block.
- IPv4 CIDR Block: Traffic is forwarded to an IPv4 address.
- IPv6 CIDR Block: Traffic is forwarded to an IPv6 address.
Next Hop Type Select the type of the next hop. Options:
- ECS Instance: Traffic pointing to the destination CIDR block is routed to the selected ECS instance.
Select this type if you want to route specified traffic to an ECS instance for uniform forwarding and management. For example, configure an ECS instance as an Internet gateway to manage the access of other ECS instances to the Internet.
- VPN Gateway: Traffic pointing to the destination CIDR block is routed to the selected VPN Gateway.
- NAT Gateway: Traffic pointing to the destination CIDR block is routed to the selected NAT Gateway.
- Secondary Network Interface: Traffic pointing to the destination CIDR block is routed to the selected secondary Elastic Network Interface (ENI).
- Router Interface (To VPC): Traffic pointing to the destination CIDR block is routed to the selected VPC.
Select this type if you want to use Express Connect to connect two VPCs.
- Router Interface (To VBR): Traffic pointing to the destination CIDR block is routed to the router interface
associated with the VBR.
Select this type if you want to use Express Connect to connect a VPC to an on-premises data center.
In this mode, you must select one of the following route types:
- General Routing: Select an associated router interface.
- Active/Standby Routing: You can use only two instances as the next hops. One is active, the other is standby. The active route is weighted 100 and the standby route is weighted 0. If the active route is detected unhealthy, the standby route replaces the active route.
- Load Balancing Routing: You need to use two to four router interfaces as the next hops, and the peer routers of the next hops must be VBRs. Valid values of the router interface weight are from 1 to 255, and the default router interface weight is 100. The weights of the selected router interfaces must be the same so that traffic can be evenly distributed to the next-hop router interfaces.
- IPv6 Gateway: Traffic pointing to the destination CIDR block is routed to the selected IPv6 Gateway.
Note This option is available only when the destination CIDR block is an IPv6 CIDR block.
Resource Group Select the resource group to which the next hop belongs. ECS Instance/HAVip Address/VPN Gateway/NAT Gateway/Secondary Network Interface/VPC Select the next-hop instance.