Routing policies allow you to filter routes and modify route properties to customize network traffic in the cloud. This topic describes how to add, modify, and delete routing policies.
Background
Transit routers are available in Basic Edition and Enterprise Edition:
A Basic Edition transit router has a single system route table. When you create a routing policy, it is automatically associated with the system route table.
An Enterprise Edition transit router has one system route table and supports custom route tables. When adding a routing policy, you can associate it with the system or a custom route table. The routing policy affects route propagation only for the associated route table.
For more information, see transit router edition differences.
Add a routing policy to an Enterprise Edition transit router
Log on to the CEN console.
On the Instances page, click the ID of the CEN instance that you want to manage.
Go to the tab and click the ID of the transit router that you want to manage.
On the details page of the transit router, click the Route Table tab.
In the navigation pane on the left, click the ID of the route table that you want to manage.
On the route table details page, click the Routing Policies tab.
On the Routing Policies tab, click Add Routing Policy.
On the Add Routing Policy page, set the parameters for the routing policy and click OK.
Parameter
Description
Policy Priority
The priority of the routing policy. Valid values: 1 to 100. A smaller value indicates a higher priority.
Within an Enterprise Edition transit router, routing policies that are applied in the same region and direction must have unique priorities. When the system executes routing policies, it matches conditional statements starting from the policy with the highest priority with the smallest value. Therefore, make sure that the priorities you specify result in the expected matching order.
Description
Enter a description for the routing policy.
Associated Route Table
Select the route table to associate with the routing policy.
You can associate the routing policy with a system route table or a custom route table.
Direction
Select the direction in which the routing policy takes effect.
Ingress: The direction in which routes are advertised to the transit router in the current region. For example, routes are advertised from a network instance in the current region to the transit router in the current region, or routes from other regions are advertised to the transit router in the current region.
Egress: The direction in which routes are advertised from the transit router in the current region. For example, routes are advertised from the transit router in the current region to other network instances in the same region, or to transit routers in other regions.
Match Conditions
The match conditions for the routing policy.
Click
Add Match Condition to add match conditions. For more information, see Match conditions.Policy Action
Select an action for the policy.
Allow: If all conditions are met, the routes are permitted.
If you set the action to Allow, you can configure the following parameters:
Route Priority: The priority of the permitted routes. Valid values: 1 to 100. The default value is 50. A smaller value indicates a higher priority.
Community: The Community attribute. You can select Add or Replace.
Append AS Path: The AS Path attribute that is prepended to the AS_PATH attribute of the route when the transit router receives or advertises the route.
The requirements for prepending an AS Path vary based on the direction of the routing policy:
If you configure AS Path prepending for the Ingress direction, you must specify a source instance ID list and a source region in the match conditions. The source region must be the same as the region where the routing policy is applied.
If you configure AS Path prepending for the Egress direction, you must specify a destination instance ID list in the match conditions.
Reject: If all match conditions are met, the routes are denied.
If you set the action to Deny, you cannot configure other parameters.
Associated Policy Priority
The priority of the next routing policy to be associated.
You can set this parameter only when the action is set to Allow. The allowed routes continue to be matched against the next routing policy.
The next routing policy must be in the same region and apply to the same direction as the current routing policy.
The priority of the next routing policy must be lower than the priority of the current routing policy. This means the priority value must be larger.
Add a routing policy to a Basic Edition transit router
Log on to the CEN console.
On the Instances page, click the ID of the CEN instance that you want to manage.
Go to the tab and click the ID of the transit router that you want to manage.
On the transit router details page, click the tab.
On the Routing Policies tab, click Add Routing Policy.
On the Add Routing Policy page, set the parameters for the routing policy and click OK.
Configuration
Description
Policy Priority
The priority of the routing policy. Valid values: 1 to 100. A smaller value indicates a higher priority.
Routing policies that are applied in the same region and direction must have unique priorities. When the system executes routing policies, it matches conditional statements starting from the policy with the highest priority (smallest value). Therefore, make sure that the priorities you specify result in the expected matching order.
Description
Enter a description for the routing policy.
Region
Select the region where the routing policy is applied.
Direction
Select the direction in which the routing policy takes effect.
Ingress: The direction in which routes are advertised to the transit router in the current region. For example, routes are advertised from a network instance in the current region to the transit router in the current region, or routes from other regions are advertised to the transit router in the current region.
Egress: The direction in which routes are advertised from the transit router in the current region. For example, routes are advertised from the transit router in the current region to other network instances in the same region, or to transit routers in other regions.
Match Conditions
The match conditions for the routing policy.
Click
Add Match Condition to add match conditions. For more information, see Match conditions.Policy Action
Select an action for the policy.
Allow: If all conditions are met, the routes are permitted.
If you set the action to Allow, you can configure the following parameters:
Route Priority: The priority of the permitted routes. Valid values: 1 to 100. The default value is 50. A smaller value indicates a higher priority.
Community: The Community attribute. You can select Add or Replace.
Append AS Path: The AS Path attribute that is prepended to the AS_PATH attribute of the route when the transit router receives or advertises the route.
The requirements for prepending an AS Path vary based on the direction of the routing policy:
If you configure AS Path prepending for the Ingress direction, you must specify a source instance ID list and a source region in the match conditions. The source region must be the same as the region where the routing policy is applied.
If you configure AS Path prepending for the Egress direction, you must specify a destination instance ID list in the match conditions.
Reject: If all match conditions are met, the routes are denied.
If you set the action to Deny, you cannot configure other parameters.
Associated Policy Priority
The priority of the next routing policy to be associated. This parameter is optional.
You can set this parameter only when the action is set to Allow. The allowed routes continue to be matched against the next routing policy.
The next routing policy must be in the same region and apply to the same direction as the current routing policy.
The priority of the next routing policy must be lower than the priority of the current routing policy. This means the priority value must be larger.
Modify a routing policy
Before you modify a routing policy, take note of the following:
After creating a routing policy for an Enterprise Edition transit router, you cannot modify the associated route table or the direction.
After creating a routing policy for a Basic Edition transit router, you cannot modify the region or the direction.
You cannot modify the default routing policies that are added by the system for Basic Edition or Enterprise Edition transit routers. These policies have a policy priority greater than 1,000. To override a default routing policy, you can create a custom routing policy with a higher priority.
Log on to the CEN console.
On the Instances page, click the ID of the CEN instance that you want to manage.
Go to the tab and click the ID of the transit router that you want to manage.
On the details page of the transit router, click the Route Table tab.
On the Route Table tab, find the routing policy that you want to modify.
For a Basic Edition transit router, click the Routing Policies tab and find the routing policy.
For an Enterprise Edition transit router, in the navigation pane on the left, click the ID of a route table. On the route table details page, click the Routing Policies tab and find the routing policy.
In the Actions column of the routing policy, click Modify.
On the Edit Route Map page, modify the policy priority, description, match conditions, and action. Then, click OK.
Delete a routing policy
Log on to the CEN console.
On the Instances page, click the ID of the CEN instance that you want to manage.
Go to the tab and click the ID of the transit router that you want to manage.
On the details page of the transit router, click the Route Table tab.
On the Route Table tab, find the routing policy that you want to modify.
For a Basic Edition transit router, click the Routing Policies tab and find the routing policy.
For an Enterprise Edition transit router, in the navigation pane on the left, click the ID of a route table. On the route table details page, click the Routing Policies tab and find the routing policy.
In the Actions column of the routing policy, click Delete.
In the Delete Routing Policy dialog box, click OK.
References
CreateCenRouteMap: Creates a routing policy.
ModifyCenRouteMap: Modifies a routing policy.
DeleteCenRouteMap: Deletes a routing policy.
DescribeCenRouteMaps: Queries routing policies.