When multiple paths exist to the same network, the SPF algorithm will usually choose the best route based on cost to reach the destination, but there are certain factors that may impact the decision of the best route even if both paths have.
RFC 2238 defines the following rules to choose a route while ignoring cost:
- Intra-area routes
- Inter-area routes
- E1/N1 routes
- E2/N2 routes
routes are chosen based on these preferences, for example if there are two routes for the same subnet one is an intra-area route and the other is an inter-area route, OSPF ignores the cost regardless and chooses the Intra-area route.