To apply multiple routing policies (chains) to a routing protocol, include the import and export statements:
-
import [ policy-names ];
-
export [ policy-names ];
You can include the statements at the following hierarchy levels:
In the import statement, list the names of multiple routing policies to be evaluated when routes are imported into the routing table from the routing protocol.
In the export statement, list the names of multiple routing policies to be evaluated when routes are being exported from the routing table into a dynamic routing protocol. Only active routes are exported from the routing table.
You can reference the same routing policy one or more times in the same or different import and export statements.
The policy framework software evaluates the routing policies sequentially, from left to right. If an action specified in one of the policies manipulates a route characteristic, the policy framework software carries the new route characteristic forward during the evaluation of the remaining policies. For example, if the action specified in the first policy of a chain sets a route’s metric to 500, this route matches the criterion of metric 500 defined in the next policy.
For more information about routing policy chain evaluation, see How a Routing Policy Chain Is Evaluated.