All Products
Search
Document Center

IPv6 Gateway:Create and manage IPv6 routes

Last Updated:Apr 16, 2024

A route table consists of routes. Each route specifies the destination to which network traffic is routed. You can use IPv6 routes to manage 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 system route tables and custom route tables that are bound to vSwitches.

  • System route table: After you create a VPC, the system automatically 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 remove 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 the View the automatically added IPv6 routes section of the Create and manage IPv6 routes topic.

  • 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 flexible manner. For more information, see the Create a custom route table section of the Create and manage a route table topic.

  • 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 the Add and delete custom IPv6 routes section of this topic.

Prerequisites

View the automatically added IPv6 routes

After you enable IPv6 for the VPC, 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 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 routes that are automatically added and custom routes.

    • System Route: The destination CIDR block of a system route is 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 a custom route is ::/0. The next hop of a custom route is the ID of the IPv6 gateway. Such routes enable 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 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 entry

      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.

      Resource Group

      Select the resource group to which the custom route belongs.

      Destination CIDR Block

      Select IPv4 CIDR Block, IPv6 CIDR Block, or VPC Prefix List and enter the destination CIDR block to which you want to route traffic. In this example, IPv6 CIDR Block is selected.

      Next Hop Type

      Select the next hop type. If you select IPv6 CIDR Block for the Destination CIDR Block parameter, the following five next hop types are available:

      • ECS Instance: Traffic destined for the specified CIDR block is routed to a 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 a specified IPv6 gateway.

      • ENI: Traffic destined for the specified CIDR block is routed to a specified elastic network interface (ENI).

      • Router Interface (To VBR): Traffic destined for the specified CIDR block is routed to the router interface that is associated with a virtual border router (VBR). Select this type if you want to connect the VPC to a data center by using Express Connect circuits. For more information, see Peering connections.

      • VPC Peering Connection: Traffic destined for the specified CIDR block is routed to a specified VPC peering connection. For more information, see Overview of VPC peering connections.

      Note
      • If you already have a custom route whose destination CIDR block is ::/0 and the next hop is an IPv6 gateway, the destination CIDR block of the new custom route cannot be set to ::/0.

      • Make sure that the specified next hop supports IPv6.

      ECS Instance, IPv6 Gateway, ENI, General Routing, Load-Balancing Routes, or VPC Peering Connection

      After you specify the next hop type, select an instance from the drop-down list or create a new instance.

    • Delete a custom route

      Warning

      After a custom route is deleted, you cannot route the traffic destined for the destination CIDR block of this custom route to a specified destination. Exercise caution when you delete a custom route.

      1. Click the Custom Route 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