Specify Policy with Generated Routes
You optionally can associate a routing policy when configuring a generated route's destination prefix in the
routespart of thegeneratestatement. 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 contributor with the numerically smallest prefix becomes the most preferred, or 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
policystatement at the[edit routing-options generate route]hierarchy level (for routing instances, include the statement at the[edit routing-instancesrouting-instance-namerouting-options generate (defaults | route)]hierarchy level):[edit routing-options generate route]policypolicy-name;