Hello! Welcome back to our course on advanced routing.
In the previous lesson, we established a critical foundation: how to troubleshoot OSPF adjacencies to ensure routers can become fully adjacent neighbors. A stable FULL adjacency is the prerequisite for exchanging routing information. However, even with perfect adjacencies, you can still face routing problems. Routes might not appear as expected, or traffic might take an inefficient, suboptimal path.
This lesson builds directly on that foundation to address the learning outcome: Troubleshoot suboptimal OSPF routing paths and LSA propagation issues. We will explore the "why" behind OSPF's path selection logic and develop a systematic approach to diagnosing issues where routing tables don't match your expectations.
1. The Logic of OSPF Path Selection
Unlike adjacency failures, which are often caused by simple configuration mismatches, suboptimal routing issues require a deeper understanding of the OSPF decision-making process. OSPF is deterministic; it follows a strict set of rules to select the best path. If a path seems "wrong," it's because it is optimal according to these rules, even if it's not what you intended.
The path selection process is a hierarchy. OSPF routers prefer routes in the following order, from most to least preferred:
- Intra-Area (O): Routes to destinations within the same area.
- Inter-Area (O IA): Routes to destinations in other OSPF areas.
- External Type 1 (E1 / N1): Routes redistributed from another routing protocol, where the cost accumulates as it travels through the OSPF domain.
- External Type 2 (E2 / N2): The default type for redistributed routes, where the cost is fixed and does not change within the OSPF domain.
Only if routes are of the same type does OSPF compare the cost to break the tie.
To see this hierarchy explained clearly, let's watch a short segment from PM Networking.
Advance OSPF Route Manipulation | OSPF Summarization
This video, 'Advance OSPF Route Manipulation', begins by explaining the fundamental hierarchy OSPF uses to determine the reliability and preference of different route types. Understanding this is the first step in diagnosing any path selection issue.
Watch from 14:30 to 16:37. The presenter outlines the order of preference from 'O' to 'N2'. This is a critical concept for your CCNP studies.
This strict preference (Route Type > Cost) is a common source of "suboptimal" routing. A low-cost Inter-Area route will always be preferred over any External route, regardless of the external route's cost.
2. Symptom: A Route is Missing from the Routing Table
One of the most common trouble tickets is "I can't reach network X, even though OSPF is running." Your first step is to determine if the route is simply missing or if it's present but pointing the wrong way.
Let's assume you run show ip route <network> and it's not there. The troubleshooting process now has two distinct phases:
- Is the corresponding Link-State Advertisement (LSA) present in the OSPF database? (
show ip ospf database) - If the LSA is in the database, why didn't the SPF algorithm install it into the routing table (RIB)?
Case 1: LSA is Missing from the Database
If an LSA never makes it to a router's database, the router can't possibly calculate a path. LSAs are the "puzzle pieces" of the OSPF topology map. If a piece is missing, that part of the map is blank.
OSPF LSA Types Simplified... Seriously!
To understand why an LSA might be missing, let's quickly refresh our knowledge of the different LSA types and where they are allowed to travel. This video from Kevin Wallace Training offers a concise and clear explanation.
Please watch from the beginning to 12:40. Focus on which router type creates each LSA and, crucially, how different area types (like stub and NSSA) explicitly block certain LSAs from propagating. This is a primary reason for missing routes.
Based on the video, common reasons for a missing LSA include:
- Area Type Restrictions: A router in a stub area will never see Type 5 or Type 4 LSAs. It receives a default route from the ABR instead. A router in a totally stubby area won't even see Type 3 LSAs from other areas. Always check the area type if external or inter-area routes are missing.
- No Path to the Originating Router: If an ABR or ASBR is down or unreachable, its LSAs cannot be propagated.
- Filtering: While less common for intra-domain routing, it is possible to filter LSAs at an ABR using
area <id> filter-list.
Case 2: LSA is in the Database, but Not in the RIB
This is a classic CCNP-level troubleshooting scenario. You run show ip ospf database external <network> and see the LSA, but show ip route <network> yields nothing. This means the SPF algorithm ran, saw the LSA, but decided not to install the route.
The official Cisco guide, "Troubleshoot Open Shortest Path First Route Database Issues," is the definitive resource for these problems.
Troubleshoot Open Shortest Path First Route Database Issues
This Cisco document details the most common reasons why a route present in the OSPF database fails to be installed in the routing table. We will focus on the most relevant scenarios for modern networks.
Please read the introduction, 'Reason 6: Forwarding Address Known via an External Route', and 'Reason 7: Routes Blocked by Distribute List'. Pay special attention to the concept of the forwarding address and how route filtering works in OSPF.
Let's summarize the key reasons and add a few more:
- Filtering with
distribute-list in: As the document and the video below show, this command doesn't stop the LSA from entering the database, but it does prevent the route from being installed in the RIB. It's a "policy filter" applied after the SPF calculation. - Unreachable Forwarding Address (for Type 5 LSAs): This is a critical and frequently tested concept. For a router to install a Type 5 LSA, it must have an intra-area or inter-area route to the LSA's forwarding address. If the only route to the forwarding address is external (or a default route), OSPF considers it a potential loop and will not install the route.
- Unreachable Advertising Router: For any LSA, if the router that originated it (the ADV Router) is considered unreachable by the local SPF algorithm, any routes within that LSA will not be installed. This is often indicated by an
"Adv Router is not-reachable"message in theshow ip ospf databaseoutput. - Better Administrative Distance (AD): If the router is learning the exact same prefix from another source with a lower (better) AD, that route will be installed instead. For example, EIGRP (AD 90) or a static route (AD 1) will be preferred over OSPF (AD 110). Check with
show ip route <prefix>.
The following video shows a practical example of filtering routes using a route-map with a distribute-list, a powerful technique for controlling which routes get installed.
Advance OSPF Route Manipulation | OSPF Summarization
Let's return to the PM Networking video. This segment demonstrates how to use tags during redistribution and then apply a distribute-list with a route-map to filter specific external routes from being installed in the routing table.
Watch from 46:21 to 56:24. Notice how the routes are initially present with tags and then disappear from the routing table (but not the database) after the distribute-list is applied.
3. Symptom: Traffic is Taking a Suboptimal Path
Now, let's address the second major issue: the route is in the routing table, but it's not the path you want. This means you need to influence the OSPF path selection process.

To fix a suboptimal path, you must make your desired path "better" in the eyes of OSPF. You can do this by:
- Manipulating Cost: The most common method. You can lower the cost of the desired path or increase the cost of the undesired path. This is the primary tool for influencing intra-area and inter-area routes.
- Manipulating Route Type: Influencing whether a route is seen as E1 or E2 can change the path selection when multiple ASBRs exist.
- Using Summarization: A more advanced technique where you can make one path less specific, causing routers to prefer another, more specific path.
This video demonstrates all three techniques brilliantly.
Advance OSPF Route Manipulation | OSPF Summarization
This final video segment provides a masterclass in OSPF path manipulation. It demonstrates how to influence traffic flow by adjusting interface costs, changing external metric types, and strategically applying route summarization.
Please watch from 16:37 to 27:10 and from 36:10 to 46:21. In the first part, focus on how changing the cost and the metric-type (E1 vs E2) alters the chosen path to an external network. In the second part, observe how summarizing routes on one ABR causes a downstream router to prefer the more specific, individual routes coming from another ABR.
Key Path Manipulation Techniques:
- Changing Cost: Use the
ip ospf cost <value>command on an interface. Remember to also consider theauto-cost reference-bandwidthcommand on all routers to ensure costs are calculated appropriately for modern high-speed links. - Changing Metric Type: During redistribution, you can specify
metric-type 1to make the cost cumulative (E1), or leave the defaultmetric-type 2for a fixed cost (E2). E1 is often preferred in networks with multiple ASBRs to make a cost-aware decision. - Longest Match Routing: As shown in the summarization example, routers always prefer a more specific route. Advertising a
/24from one path and a summary/21from another will cause traffic for that/24to always choose the first path.
Test your understanding!
A router receives information about the network 192.168.100.0/24 from three different OSPF neighbors:
- Path A is an Inter-Area (O IA) route with a total cost of 50.
- Path B is an External Type 2 (E2) route with a cost of 10.
- Path C is an Intra-Area (O) route with a total cost of 100.
Which path will the router install in its routing table and why?
Show answer
The router will install Path C.
The OSPF path selection algorithm prioritizes the route type before it considers the cost. The order of preference is Intra-Area (O) > Inter-Area (O IA) > External (E1/E2). Even though Path C has the highest cost (100), it is an Intra-Area route, making it the most preferred type. The lower costs of the other paths are irrelevant.
Conclusion
Troubleshooting OSPF routing involves moving beyond simple connectivity and applying your knowledge of the protocol's internal logic. When a route is missing or suboptimal, you must think like the SPF algorithm.
Key Takeaways:
- Path Selection is Hierarchical: OSPF's decision is always Route Type > Cost. Understanding this hierarchy is essential.
- Missing Routes? Check LSDB First: If an LSA isn't in the database, it's a propagation problem (often due to area type restrictions). If it's in the database but not the RIB, it's an installation problem (often due to filtering, AD, or an unreachable forwarding address).
- Suboptimal Paths? Manipulate the Metrics: To change a path, you must make the desired path more attractive to the SPF algorithm by lowering its cost, changing its route type, or making it more specific.
- External Routes are Special: Pay close attention to the
forwarding addressand themetric-type(E1 vs. E2) when troubleshooting routes that have been redistributed into OSPF.
Preview of the Next Lesson:
We have now completed our deep dive into OSPF, a foundational Interior Gateway Protocol (IGP). In the next module, we will shift our focus to the protocol that runs the global internet: Border Gateway Protocol (BGP). We'll start by exploring the fundamental differences between IGPs and EGPs, and you will learn to differentiate between eBGP and iBGP relationships and their use cases.