All Products
Search
Document Center

Cloud Enterprise Network:Use routing policies to configure primary and secondary static routes for VBRs in the same region

Last Updated:Oct 19, 2023

This topic describes how to use routing policies to configure primary and secondary static routes for virtual border routers (VBRs) in the same region.

Prerequisites

Note This feature is supported only by Basic Edition transit routers.

Background information

A routing policy rejects or accepts routes based on match conditions. You can also set a routing policy to modify the attributes of accepted routes.同地域VBR互通

As shown in the preceding figure, an enterprise has a data center located in the China (Hangzhou) region. The enterprise connects the data center to Alibaba Cloud by using two Express Connect circuits from two Internet service providers (ISPs). The port of Express Connect Circuit 1 is 10 Gbit/s, whereas the port of Express Connect Circuit 2 is 1 Gbit/s. VBR 1, VBR 2, and the virtual private cloud (VPC) are attached to the CEN instance. The enterprise uses the Express Connect circuits to connect the data center to Alibaba Cloud through load balancing. However, the enterprise needs to use Express Connect Circuit 2 as a secondary connection because the port of Express Connect Circuit 2 is slower than that of Express Connect Circuit 1. If Express Connect Circuit 1 is down, network traffic is automatically switched to Express Connect Circuit 2.

You can add a routing policy with a higher priority for VBR 1 that is connected to Express Connect Circuit 1, and then add a routing policy with a lower priority for VBR 2 that is connected to Express Connect Circuit 2. This way, Express Connect Circuit 1 functions as the primary connection and Express Connect Circuit 2 functions as the secondary connection.

Step 1: Set Express Connect Circuit 1 that is connected to VBR 1 as the primary connection

Perform the following steps to set Express Connect Circuit 1 as the primary connection:

  1. Log on to the CEN console.

  2. On the Instances page, click the ID of the CEN instance that you want to manage.

  3. ON the instance details page, find the region where you want to add a routing policy and click the ID of the transit router deployed in the region.

  4. On the details page of the transit router, click the Route Table tab and click Routing Policies.

  5. On the Routing Policies page, click Add Routing Policy. Set the following parameters and click OK:

    • Routing Policy Priority: Enter a priority value for the routing policy. A smaller value indicates a higher priority. In this example, 20 is entered.

    • Region: Select the region to which you want to apply the routing policy. In this example, China (Hangzhou) is entered.

    • Policy Direction: Select the direction in which you want to apply the routing policy. In this example, Egress Regional Gateway is selected.

    • Match Conditions: Configure match conditions for the routing policy. In this example, Source Instance ID List is set to the ID of VBR 1.

    • Action Policy: Select the action that you want to perform on routes that meet the match conditions. In this example, Allow is selected.

    • Add Action Object: Specify a priority value for the routes that are accepted. In this example, the priority value is set to 10.

      Note

      By default, the priority values of the accepted routes are 50. You can set a value from 1 to 100. A lower value indicates a higher priority.

Step 2: Set Express Connect Circuit 2 that is connected to VBR 2 as the secondary connection

Perform the following steps to set Express Connect circuit 2 as the secondary connection:

  1. In the left-side navigation pane, click Instances.

  2. On the Instances page, click the ID of the CEN instance that you want to manage.

  3. On the instance details page, find the region where you want to add a routing policy and click the ID of the transit router deployed in the region.

  4. On the details page of the transit router, click the Route Table tab and click Routing Policies.

  5. On the Routing Policies tab, click Add Routing Policy. Set the following parameters and click OK:

    • Routing Policy Priority: Enter a priority value for the routing policy. A smaller value indicates a higher priority. In this example, 30 is entered.

    • Region: Select the region to which you want to apply the routing policy. In this example, China (Hangzhou) is entered.

    • Policy Direction: Select the direction in which you want to apply the routing policy. In this example, Egress Regional Gateway is selected.

    • Match Conditions: Configure match conditions for the routing policy. In this example, Source Instance ID List is set to the ID of VBR 2.

    • Action Policy: Select the action that you want to perform on routes that meet the match conditions. In this example, Allow is selected.

    • Add Action Object: Specify a priority value for the routes that are accepted. In this example, the priority value is set to 20.

      Note

      By default, the priority values of the accepted routes are 50. You can set a value from 1 to 100. A lower value indicates a higher priority.