You can configure routing policies to filter and modify routes. This allows you to manage network communication in the cloud. This topic describes how to create, modify, and delete a routing policy.
Background information
Transit routers have two editions: Basic Edition and Enterprise Edition.
A Basic Edition transit router has only a system route table. Routing policies that you create are automatically associated with the system route table.
An Enterprise Edition transit router has a system route table and supports custom route tables. When you add a routing policy, you can associate the routing policy with the system route table or a custom route table. The routing policy affects only how the associated route table advertises routes.
For more information about how to check the edition of a transit router, see View the edition of a transit router.
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.
Navigate 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 left-side area of the route table details page, click the ID of the default route table.
On the details page of the default route table, click the Route Maps tab.
On the Route Maps tab, click Add Route Map.
On the Add Route Map page, set the following parameters and click OK.
Parameter
Description
Routing Policy Priority
Set a priority for the routing policy. Valid values: 1 to 100. A smaller value indicates a higher priority.
On an Enterprise Edition transit router, you cannot specify the same priority for routing policies that apply in the same region and direction. The system evaluates routes against the match conditions of routing policies in descending order of priority. A smaller value indicates a higher priority. Therefore, set appropriate values to sort the routing policies in the desired order.
Description
Enter a description for the routing policy.
The description cannot start with
http://
orhttps://
. It must start with a letter and can contain letters, digits, hyphens (-), periods (.), and underscores (_).Associated Route Table
Select a route table to associate with the routing policy.
You can associate a routing policy with the system route table or a custom route table.
Direction
Select the direction in which the routing policy applies.
Import to Regional Gateway: Routes are advertised to the transit router deployed in the current region. For example, routes are advertised from network instances deployed in the current region or other regions to the transit router deployed in the current region.
Export from Regional Gateway: Routes are advertised from the transit router deployed in the current region. For example, routes are advertised from transit routers deployed in the current region to network instances deployed in the current region or transit routers deployed in other regions.
Match Conditions
Select a match condition for the routing policy.
Click
Add Match Condition to add multiple match conditions. For more information, see Match conditions.
Routing Policy Action
Select an action for the routing policy.
Permit: After all conditions are matched, the matched routes are permitted.
If you select Permit, you can click Add Policy Entry and configure the following policy values:
Preference: Specify a priority for the routes that are permitted. Valid values: 1 to 100. Default value: 50. A smaller value indicates a higher priority.
Community: Specify a community value. Add and Replace are supported.
Appended AS Path: An autonomous system (AS) path is appended when the transit router receives or advertises a route.
The requirements of appended AS paths vary based on the direction in which the routing policy applies:
When AS paths are appended in the inbound direction, you must specify the list of source instance IDs and the source region in the match condition. In addition, the source region must be the same as the region in which the routing policy applies.
When AS paths are appended in the outbound direction, you must specify the list of destination instance IDs in the match condition.
Deny: Routes that meet all the match conditions are denied.
If you select Deny, you cannot configure policy values.
Priority of Associated Routing Policy
Specify a priority for the routing policy to be associated.
You can set the parameter only if you select Permit for Routing Action Policy. Only permitted routes continue to match the routing policy that has the specified priority.
The region and direction of the routing policy to be associated must be the same as those of the current routing policy.
The priority of the routing policy to be associated must be lower than the priority of the current routing policy.
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.
Navigate to the tab and click the ID of the transit router that you want to manage.
On the transit router details page, choose .
On the Route Maps tab, click Add Route Map.
On the Add Route Map page, set the following parameters and click OK.
Parameter
Description
Routing Policy Priority
Set a priority for the routing policy. Valid values: 1 to 100. A smaller value indicates a higher priority.
You cannot specify the same priority for routing policies that apply in the same region and direction. The system evaluates routes against the match conditions of routing policies in descending order of priority. A smaller value indicates a higher priority. Therefore, set appropriate values to sort the routing policies in the desired order.
Description
Enter a description for the routing policy.
The description cannot start with
http://
orhttps://
. It must start with a letter and can contain letters, digits, hyphens (-), periods (.), and underscores (_).Region
Select the region in which the routing policy applies.
Direction
Select the direction in which the routing policy applies.
Import to Regional Gateway: Routes are advertised to the transit router deployed in the current region. For example, routes are advertised from network instances deployed in the current region or other regions to the transit router deployed in the current region.
Export from Regional Gateway: Routes are advertised from the transit router deployed in the current region. For example, routes are advertised from transit routers deployed in the current region to network instances deployed in the current region or transit routers deployed in other regions.
Match Conditions
Select a match condition for the routing policy.
Click
Add Match Condition to add multiple match conditions. For more information, see Match conditions.
Routing Policy Action
Select an action for the routing policy.
Permit: After all conditions are matched, the matched routes are permitted.
If you select Permit, you can click Add Policy Entry and configure the following policy values:
Preference: Specify a priority for the routes that are permitted. Valid values: 1 to 100. Default value: 50. A smaller value indicates a higher priority.
Community: Specify a community value. Add and Replace are supported.
Appended AS Path: An autonomous system (AS) path is appended when the transit router receives or advertises a route.
The requirements of appended AS paths vary based on the direction in which the routing policy applies:
When AS paths are appended in the inbound direction, you must specify the list of source instance IDs and the source region in the match condition. In addition, the source region must be the same as the region in which the routing policy applies.
When AS paths are appended in the outbound direction, you must specify the list of destination instance IDs in the match condition.
Deny: Routes that meet all the match conditions are denied.
If you select Deny, you cannot configure policy values.
Priority of Associated Routing Policy
Specify a priority for the routing policy to be associated. This parameter is optional.
You can set the parameter only if you select Permit for Routing Action Policy. Only permitted routes continue to match the routing policy that has the specified priority.
The region and direction of the routing policy to be associated must be the same as those of the current routing policy.
The priority of the routing policy to be associated must be lower than the priority of the current routing policy.
Modify a routing policy
Before you modify a routing policy, take note of the following limits:
After you create a routing policy on an Enterprise Edition transit router, you cannot modify the route table that is associated with the routing policy or the direction in which the routing policy applies.
After you create a routing policy on a Basic Edition transit router, you cannot modify the region or direction in which the routing policy applies.
You cannot modify the default routing policy of a Basic Edition transit router or Enterprise Edition transit router. The priority value of the default routing policy is larger than 1000. If you do not want the default routing policy to take effect, you must add a custom routing policy that has a higher priority than the default routing policy.
Log on to the CEN console.
On the Instances page, click the ID of the CEN instance that you want to manage.
Navigate 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.
If you are using a Basic Edition transit router, click the Route Maps tab to find the routing policy.
If you are using an Enterprise Edition transit router, click the ID of the route table in the left-side area. On the details page of the route table, click the Route Maps tab and find the routing policy.
Find the routing policy and click Modify in the Actions column.
On the Edit Route Map page, modify the priority, description, match conditions, and action of the routing policy, and 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.
Navigate 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.
If you are using a Basic Edition transit router, click the Route Maps tab to find the routing policy.
If you are using an Enterprise Edition transit router, click the ID of the route table in the left-side area. On the details page of the route table, click the Route Maps tab and find the routing policy.
Find the routing policy and click Delete in the Actions column.
In the Delete Route Map message, click OK.
References
CreateCenRouteMap: creates a routing policy.
ModifyCenRouteMap: modifies a routing policy.
DeleteCenRouteMap: deletes a routing policy.
DescribeCenRouteMaps: queries information about routing policies.