This topic describes how to create and manage IPv6 routes. You can use IPv6 routes to control the IPv6 traffic of a virtual private cloud (VPC).

Background information

IPv6 routes are classified into system routes and custom routes. You can add custom IPv6 routes only to a system route table.
  • System route table: After you create a VPC, the system creates a system route table for the VPC and adds system routes to the route table. The system routes are used to route traffic within the VPC. You cannot add system routes to or delete system routes from the system route table. However, you can view the IPv6 routes that are automatically added to the system route table. For more information, see View the automatically added IPv6 routes.
  • Custom route table: You can create a custom route table in a VPC and associate the custom route table with a vSwitch. This allows you to manage networks in a more flexible manner. For more information, see Create a custom route table.
  • Custom IPv6 route: You can add a custom route to route traffic destined for a specified CIDR block to a specified destination. If you no longer need a custom route, you can delete the custom route. For more information, see Add and delete custom IPv6 routes.

Prerequisites

View the automatically added IPv6 routes

After you enable IPv6 for a vSwitch, the system automatically adds a system route and a custom route to the system route table. You can view the automatically added routes in the VPC console.

  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 that you want to manage belongs.
  4. On the Route Tables page, find and click the ID of the route table that you want to manage.
  5. On the details page of the route table, click the Route Entry List tab. Then, click the System Route tab and the Custom Route tab to view the system route and the custom route that are automatically added.
    • System route: The destination CIDR block of the system route is the same as the IPv6 CIDR block of the vSwitch. The route is used for communication among cloud resources within the vSwitch.
    • Custom route: The destination CIDR block of the custom route is ::/0. The next hop of the custom route is the IPv6 gateway. The route enables cloud resources in the VPC to use IPv6 addresses to communicate with the Internet.

Add and delete custom IPv6 routes

  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 that you want to manage belongs.
  4. On the Route Tables page, find and click the ID of the route table that you want to manage.
  5. On the details page of the route table, click the Route Entry List tab. On the Route Entry List tab, you can perform the following operations:
    • Add a custom route
      Click the Custom Route tab and then click Add Route Entry. In the Add Route Entry panel, set the following parameters and click OK.
      Parameter Description
      Name Enter a name for the custom route.

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

      Destination CIDR Block Select IPv4 CIDR Block or IPv6 CIDR Block and enter the destination CIDR block to which you want to forward requests. In this example, IPv6 CIDR Block is selected.
      Next Hop Type Select the next hop type. If you select IPv6 CIDR Block for Destination CIDR Block, the following three types of next hop types are available:
      • ECS Instance: Traffic destined for the specified CIDR block is routed to the specified ECS instance.

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

      • IPv6 Gateway: Traffic destined for the specified CIDR block is routed to the specified IPv6 gateway.
      • Secondary ENI: Traffic destined for the specified CIDR block is routed to the specified secondary elastic network interface (ENI).
      Resource Group Select the resource group to which the next hop belongs.

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

      ECS Instance, IPv6 Gateway, or Secondary ENI After you specify the next hop type, select an instance from the drop-down list or create a new instance.
    • Delete a custom route
      1. Click the Custom Route Entry tab, find the custom route that you want to delete, and then click Delete in the Actions column.
      2. In the Delete Route Entry message, click OK.

References