You optionally can associate a routing policy when configuring a generated route’s destination prefix in the routes part of the generate statement. Doing so provides the equivalent of an import routing policy filter for the destination prefix. That is, each potential contributor to a generated route, along with any generate options, is passed through the policy filter. The policy can accept or reject the route as a contributor to the generated route and, if the contributor is accepted, the policy can modify the default preferences.
The following algorithm is used to compare two generated contributing routes in order to determine which one is the primary or preferred contributor:
At this point, the two routes are the same. The primary contributor does not change. An additional next hop is available for the existing primary contributor.
A rejected contributor still can contribute to less specific generated route. If you do not specify a policy filter, all candidate routes contribute to a generated route.
To associate a routing policy with an generated route, include the policy statement:
-
policy policy-name;
For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.