What are the rules for selecting routes belonging to different OSPF processes

9

OSPF supports multi-processes. Multiple OSPF processes can run on the same router independently.

Assume that a router is configured with two OSPF processes: process 1 and process 2. They are independent of each other. Therefore, both of the routes belonging to process 1 and process 2 are advertised to the routing management (RM) module. Route selection between the two processes complies with the following rules:
1. The RM module checks the protocol preference of process 1 and process 2. The route belonging to the process with higher protocol preference is selected as the optimal route.
NOTE:
To set the preference of an OSPF route in the specified process, run the preference [ ase ] { preference | route-policy route-policy-name } * command. The default preference of an OSPF route is 10. When an ASE is specified, the default value is 150.

2. When the protocol preferences of the two processes are the same, the RM module compare the cost of the two routes. The route with smaller cost value is selected as the optimal route.
NOTE:
When selecting the optimal route, the RM module first compares the protocol preference. The RM module compares the cost of routes only when the protocol preferences are the same.

Other related questions:
What are route selection rules if OSPF imports external routes with the same prefix
OSPF can import Type 1 and Type 2 external routes. By default, OSPF imports Type 2 external routes. If a Type 1 external route is imported, the cost contained in the corresponding LSA and the cost of the Type 1 external route are used for route calculation. If a Type 2 external route is imported, the cost of the Type 2 external route is much larger than the cost of an OSPF internal route. Therefore, only the cost of the corresponding LSA is used for route calculation. Route selection rules are described below if OSPF imports Type 1 external routes with the same prefix: Costs (cost of a route to the ASBR+cost contained in the corresponding LSA) of the imported routes are compared. The route with a smaller cost is preferred. If the route costs are the same, the corresponding LSA types are compared. The route that is imported using a Type 5 LSA is preferred. Route selection rules are described below if OSPF imports Type 2 external routes with the same prefix: The costs contained in the LSAs that are used to import the routes are compared. The route that is imported using the LSA with a smaller cost is preferred. If the costs in LSAs are the same, the costs of the routes to the ASBR are compared. The route with a smaller cost is preferred. If the costs of the routes to the ASBR are the same, the corresponding LSA types are compared. The route that is imported using a Type 5 LSA is preferred.

What are rules for route selection
  • Rule 1: The route with higher priority is preferred. A small value indicates a high priority. If a route cannot be selected using this rule, go to rule 2.
  • Rule 2: If two routes have the same priority, the route with the higher internal protocol preference is preferred. A small value indicates a high priority. If a route cannot be selected using this rule, go to rule 3.
  • Rule 3: If two routes have the same priority and belong to the same protocol, the route with the lower-cost value is preferred. If the cost values of two routes are the same, load balancing can be formed. If the number of routes for forming load balancing exceeds the maximum value (such as m) set by the system, the total number of only the first m routes act as the active routes.

  • BGP route selection on the firewall
    When there are multiple routes to the same destination, BGP selects routes according to the following rules: 1. Prefers the route with the highest PreVal. 2. Prefers the route with the highest Local_Pref. 3. A summarized route is preferred. A summarized route takes precedence over a nonsummarized route. 4. A locally and manually summarized route takes precedence over a locally and automatically summarized route. 5. A route imported using the network command is preferred over a route imported using the import-route command. 6. Prefers the route with the shortest AS_Path. 7. Prefers the route with the highest Origin type. IGP is higher than EGP, and EGP is higher than Incomplete. 8. Prefers the route with the lowest MED. 9. Prefers routes learned from EBGP (EBGP routes have higher priorities than IBGP routes). 10. Prefers routes in an AS with the lowest IGP metric to BGP. If load balancing is configured, and multiple external routes with the same As_Path exist, select multiple routes based on the configured number of routes for load balancing. 11. Prefers the route with the shortest Cluster_List. 12. Prefers the route with the smallest Originator_ID. 13. Prefers the route advertised by the device with the smallest router ID. 14. Prefers the route learned from the peer with the smallest address if the IP addresses of peers are compared in the route selection process.

    If you have more questions, you can seek help from following ways:
    To iKnow To Live Chat
    Scroll to top