Use routing policies

Updated at:

Routing policies filter routes and modify route attributes to help you customize cloud network connectivity. Add, modify, and delete routing policies on Basic Edition and Enterprise Edition transit routers. Adjusting route priorities also lets you switch traffic between primary and standby Express Connect circuits.

Background information

Transit routers are available in Basic Edition and Enterprise Edition. The edition of a transit router determines how a routing policy is associated with a route table:

  • Basic Edition — A Basic Edition transit router has only one system route table. After you create a routing policy, it is automatically associated with the system route table.

  • Enterprise Edition — In addition to one system route table, an Enterprise Edition transit router supports custom route tables. When you add a routing policy, you can associate it with a system route table or a custom route table. The routing policy affects route propagation only for its associated route table.

Confirm the edition of your transit router before you add a routing policy. For details, see View the edition of a transit router.

Considerations

Before you add or modify a routing policy, note the following:

  • Associated route table and direction (Enterprise Edition) — After you create a routing policy on an Enterprise Edition transit router, you cannot modify the associated route table or direction.

  • Region and direction (Basic Edition) — After you create a routing policy on a Basic Edition transit router, you cannot modify its region or direction.

  • System default routing policies — On both Basic Edition and Enterprise Edition transit routers, you cannot modify routing policies that the system adds by default. Default routing policies use policy priority values greater than 1000, which fall outside the 1 to 100 range available for custom routing policies. To prevent a system-added default routing policy from taking effect, add a custom routing policy with a smaller priority value. A smaller value indicates a higher priority.

Add a routing policy

You add a routing policy from the Routing Policies tab of the target route table. The navigation path differs between Basic Edition and Enterprise Edition transit routers.

To add a routing policy to an Enterprise Edition transit router

  1. Log on to the CEN console.

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

  3. Go to the Basic Information > Transit Router tab and click the ID of the transit router that you want to manage.

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

  5. In the left-side pane of the transit router route table details page, click the route table ID.

  6. On the route table details page, click the Route Maps tab.

  7. On the Route Maps tab, click Add Route Map.

  8. On the Add Route Map page, configure the routing policy as described in the following table, and then click OK.

To add a routing policy to a Basic Edition transit router

  1. Log on to the CEN console.

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

  3. Go to the Basic Information > Transit Router tab and click the ID of the transit router that you want to manage.

  4. On the transit router details page, choose Route Table > Route Maps.

  5. On the Route Maps tab, click Add Route Map.

  6. On the Add Route Map page, configure the routing policy as described in the following table, and then click OK.

ConfigurationDescription
Policy Priority

The priority of the routing policy. Valid values: 1 to 100. A smaller value indicates a higher priority.

Routing policy priorities must be unique for the same region and direction. When routing policies are executed, the system starts matching conditional statements with the routing policy that has the smallest priority value. When you specify a policy priority, make sure that the matching order meets your expectations.

Description

Enter a description for the routing policy.

Associated Route Table

(Enterprise Edition only) Select the route table to associate with the routing policy.

A routing policy can be associated with a system route table or a custom route table.

Region

(Basic Edition only) Select the region where the routing policy is applied.

Policy Direction

Select the direction in which the routing policy takes effect.

  • Ingress gateway direction: The direction in which routes are propagated to the transit router in the local region. For example, routes are propagated from network instances in the local region to the transit router in the local region, or from other regions to the transit router in the local region.

  • Egress gateway direction: The direction in which routes are propagated from the transit router in the local region. For example, routes are propagated from the transit router in the local region to other network instances in the local region, or to transit routers in other regions.

Match Condition

The match conditions of the routing policy.

Click Add icon Add Match Condition to add multiple match conditions. For more information about match conditions, see Match conditions.

Policy Action

Select a policy action.

  • Allow: Allows matching routes to pass after all match conditions are met.

    If the policy action is set to Allow, you can configure the following policy values:

    • Route Priority: The priority of the routes that are allowed to pass. Valid values: 1 to 100. Default value: 50. A smaller value indicates a higher priority.

    • Community: The Community attribute value. The supported methods for setting the Community attribute are Add and Replace (pre-release).

    • PrependAsPath (pre-release): The transit router appends an AS Path when it receives or propagates routes.

      The requirements for configuring Append AS Path vary by routing policy direction:

      • Ingress gateway direction: The match conditions must include a source instance ID list and source region. The source region must be the same as the region where the routing policy is applied.

      • Egress gateway direction: The match conditions must include a destination instance ID list.

  • Deny: Rejects matching routes after all match conditions are met.

    If the policy action is set to Reject, you cannot configure policy values.

Priority of Next Policy

The priority of the next associated routing policy. This parameter is optional.

  • You can set an associated policy priority only when the policy action is Allow. Only routes that are allowed to pass continue to match the routing policy with the associated policy priority.

  • The next associated routing policy must have the same region and direction as the current routing policy.

  • The next associated routing policy must have a lower priority than the current routing policy. Its priority value must be larger.

The routing policy appears in the routing policy list on the Routing Policies tab.

Modify a routing policy

You can modify the configuration of an existing routing policy from the Routing Policies tab of the target route table.

  1. Log on to the CEN console.

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

  3. Go to the Basic Information > Transit Router tab and click the ID of the transit router that you want to manage.

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

  5. On the Route Table tab, find the target routing policy:

    • Enterprise Edition: Click the target route table ID in the left-side pane. On the target route table details page, click the Route Maps tab and find the target routing policy.

    • Basic Edition: Click the Route Maps tab and find the target routing policy.

  6. In the Actions column of the target routing policy, click Modify.

  7. On the Edit Route Map page, modify the policy priority, description, match conditions, policy action, or other configuration, and then click OK. Edit Route Map is the console page name for editing a routing policy.

The updated routing policy appears in the routing policy list on the Routing Policies tab.

Delete a routing policy

You can delete a routing policy from the Routing Policies tab of the target route table when the routing policy is no longer required.

  1. Log on to the CEN console.

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

  3. Go to the Basic Information > Transit Router tab and click the ID of the transit router that you want to manage.

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

  5. On the Route Table tab, find the target routing policy:

    • Enterprise Edition: Click the target route table ID in the left-side pane. On the target route table details page, click the Route Maps tab and find the target routing policy.

    • Basic Edition: Click the Route Maps tab and find the target routing policy.

  6. In the Actions column of the target routing policy, click Delete.

  7. In the Delete Routing Policy dialog box, click OK.

The routing policy no longer appears in the routing policy list on the Routing Policies tab.

FAQ

Q: How do I use routing policies to implement primary/standby switchover or maintenance for dual Express Connect circuits?

A: Adjust the Route Priority policy value of the routing policies that are associated with each Express Connect circuit. A smaller value indicates a higher priority. Perform the following steps:

  1. Keep traffic on the primary circuit — Set the Route Priority of the routing policy associated with the primary Express Connect circuit VBR to a smaller value, such as 20, which indicates a higher priority. Keep the standby circuit at the default value of 50. Traffic is transmitted over the primary Express Connect circuit.

  2. Switch traffic to the standby circuit for primary circuit maintenance — Change the Route Priority of the routing policy associated with the primary Express Connect circuit VBR to a larger value than 50, such as 100, which indicates a lower priority. Traffic automatically switches to the standby Express Connect circuit without affecting service continuity.

  3. Restore the primary circuit — After maintenance of the primary circuit is complete, change its Route Priority back to the original value, such as 20. Traffic automatically resumes transmission over the primary Express Connect circuit.

For instructions about modifying a routing policy, see the Modify a routing policy section in this topic.

Make sure that the routing policies for the primary and standby Express Connect circuits use different route priority values when you plan a primary/standby switchover.

References