In a network with a large number of OSPF routes, it can be useful to control the order in which routes are updated in response to a network topology change. Beginning with JUNOS Release 9.3, you can specify a priority of high, medium, or low for prefixes included in an OSPF import policy. In the event of an OSPF topology change, high priority prefixes are updated in the routing table first, followed by medium and then low priority prefixes.
OSPF import policy can only be used to set priority or to filter OSPF external routes. If an OSPF import policy is applied that results in a reject terminating action for a nonexternal route, then the reject action is ignored and the route is accepted anyway. By default, such a route is now installed in the routing table with a priority of low. This behavior prevents traffic black holes, that is, silently discarded traffic, by ensuring consistent routing within the OSPF domain.
In general, OSPF routes that are not explicitly assigned a priority are treated as priority medium, except for the following:
To specify a priority for prefixes included in an import policy, include the priority (high | medium | low) statement at the [edit policy-options policy statement policy-statement-name term term-name then] or [edit policy-options policy-statement policy-statement-name then] hierarchy level.
Any available match criteria applicable to OSPF routes can be used to determine the priority. Two of the most commonly used match criteria for OSPF are the route-filter and tag statements. For more information about configuring routing policy and match conditions, see the JUNOS Policy Framework Configuration Guide.