📝 Open Shortest Path First (OSPF) areas and LSAs (27 MCQs)
OSPF Organizes Link-State Routing into Areas
Open Shortest Path First is a link-state interior gateway protocol that divides an autonomous system into areas to control routing information distribution and calculation. Area 0 is the backbone, and other areas connect to it through Area Border Routers. This hierarchy reduces the need for every router to maintain detailed topology information for the entire autonomous system in larger network deployments.
Link-State Advertisements and the OSPF Database
OSPF routers originate link-state advertisements describing routers, transit networks, summaries, or external routes. LSAs are flooded within their defined scope and stored in a link-state database. Routers in the same area maintain synchronized area databases, then run Dijkstra's shortest-path-first algorithm to calculate routes from their own router ID for that area.
Neighbor Discovery, LSA Flooding and Area Routing
Routers use Hello packets to discover and maintain neighbors, then exchange database descriptions and request missing information while forming adjacencies. Link State Update packets carry LSAs, and acknowledgments support reliable flooding. Area Border Routers summarize inter-area reachability, while an Autonomous System Boundary Router can introduce routes from external routing sources.
How an Area Border Router Shares a Route
Assume Router R1 belongs to Area 1 and learns a network through an intra-area LSA. Its Area Border Router calculates reachability and advertises an inter-area summary into Area 0 or another attached area, subject to OSPF rules. Routers in the receiving area use that summary to reach the destination without receiving Area 1's full topology.
Common OSPF LSA Types and Their Scope
In OSPFv2, Router-LSAs describe router links, Network-LSAs describe multi-access networks, and Summary-LSAs describe inter-area destinations or AS Boundary Routers. AS-External-LSAs advertise routes learned outside the OSPF domain. The exact LSA type and flooding scope determine which routers receive the information and how it enters their routing calculations and external reachability information.
Misconceptions About OSPF Areas and Advertisements
'Every LSA floods through the entire autonomous system' is incorrect because flooding scope depends on LSA type. 'Area 0 is optional in a conventional multi-area design' is incorrect because non-backbone areas connect to the backbone. 'An ABR forwards user packets between areas by itself' is incorrect because it also performs routing functions, while ordinary forwarding occurs for all routers.
Identifying OSPF Roles, LSAs and Packet Types
For examinations, distinguish internal routers, Area Border Routers, and Autonomous System Boundary Routers. Identify the purpose of Router-, Network-, Summary-, and External-LSAs, and trace how they populate the link-state database. Be able to explain Hello, Database Description, Link State Request, Update, and Acknowledgment packets in adjacency and flooding procedures precisely.
(OSPF) areas and LSAs: Key Terms
- OSPF - Link-state interior gateway routing protocol.
- Area 0 - Backbone area in OSPF.
- ABR - Router connecting OSPF areas.
- ASBR - Router introducing external routes into OSPF.
- LSA - Advertisement describing link-state information.
- LSDB - Database containing OSPF link-state advertisements.
📝 All Open Shortest Path First (OSPF) areas and LSAs MCQs
Q1. What is the default OSPF hello interval on a broadcast network?
📖 Explanation: The OSPF protocol defines a default hello interval of 10 seconds for broadcast and point‑to‑point networks. This interval determines how often routers send Hello packets to maintain neighbor relationships. Changing it requires manual configuration on all routers, otherwise the default value is used.
Q2. In OSPF, which LSA type is used to describe the router’s links?
📖 Explanation: Type 1 LSAs, also called Router LSAs, contain information about the originating router’s interfaces and the cost of each link. They form the core of the link‑state database, allowing every router in the area to reconstruct the full topology.
Q3. OSPF uses which algorithm to compute shortest paths?
📖 Explanation: OSPF implements the Dijkstra algorithm (also known as the Shortest‑Path‑First algorithm) to calculate the least‑cost tree from each router to every other router in its area. This algorithm operates on the complete link‑state database rather than on distance vectors.
Q4. If an OSPF router receives a Hello packet with a dead interval twice the configured dead interval, what is the likely outcome?
📖 Explanation: The dead interval defines how long a router can go without receiving a Hello before declaring the neighbor down. If the received dead interval is larger than the router’s own setting, the neighbor is considered lost after the local dead interval expires, causing the adjacency to drop.
Q5. Consider two OSPF routers R1 and R2 connected by a point‑to‑point link with cost 5. If the link cost is changed to 2, which statement is true about the shortest‑path tree of R1?
📖 Explanation: When a link cost changes, OSPF generates a new Router LSA reflecting the updated cost. Routers receiving this LSA recompute their SPF trees; only routes that traverse the changed link can obtain a reduced total cost, while unrelated routes stay the same.
Q6. In OSPF, if a router’s area 0 loses connectivity to an external AS, what effect does this have on routes to external networks?
📖 Explanation: Even if area 0 loses its direct connection, OSPF can maintain reachability through virtual links that tunnel through other areas. The virtual link re‑establishes a Hard connection to the backbone, allowing external routes to remain reachable as long as the virtual link stays up.
Q7. Suppose an OSPF network has three routers A, B, C forming a triangle with link costs: A‑B = 2, B‑C = 3, A‑C = 10. If router A originates an LSA and the SPF algorithm runs, which path will A select to reach C?
📖 Explanation: The Dijkstra algorithm evaluates all possible routes. The cost of the direct link A‑C is 10, while the indirect path A‑B‑C costs 2 + 3 = 5, which is lower. Therefore, router A’s shortest‑path tree will include the A‑B‑C route to reach C.
Q8. An OSPF area has a router that incorrectly advertises a link cost of 0 for a non‑zero cost link. According to OSPF’s consistency checks, what will other routers in the area do when they receive this LSA?
📖 Explanation: OSPF requires that link costs be positive. When a router receives an LSA with an illegal zero cost, it discards the LSA and generates a Database Description packet indicating a bad LSA, thereby preventing the erroneous information from propagating.
Q9. Compare OSPF’s link‑state advertisement (LSA) flooding mechanism with RIP’s distance‑vector updates. Which statement best captures the difference?
📖 Explanation: LSAs contain complete information about the router’s links and their costs, enabling every router to reconstruct the full network graph. In contrast, RIP’s distance‑vector updates only convey the cost to each destination, not the complete topology.
Q10. Evaluate the impact of increasing OSPF hello interval on network convergence speed.
📖 Explanation: A longer hello interval means routers wait longer before detecting a neighbor failure, which delays SPF recomputation and prolongs convergence. Hence, increasing the interval slows the overall reaction to topology changes.
Q11. Given two OSPF routers with equal cost paths to a destination, how does OSPF break ties?
📖 Explanation: When multiple equal‑cost routes exist, OSPF selects the path based on the originating router’s Router ID (the highest ID wins). This deterministic rule ensures consistent forwarding decisions across the area.
Q12. In OSPF, what is the effect of summarizing routes at an ABR on the size of LSDBs in the stub area?
📖 Explanation: Route summarization replaces many specific external LSAs with a single summary LSA, reducing the number of entries that stub‑area routers must store and process, thereby shrinking the LSDB.
Q13. Contrast the behavior of OSPF when a link cost is changed from 1 to 10 versus when a link fails entirely. Which statement is accurate?
📖 Explanation: Any change to link state—whether a cost modification or a failure—causes the originating router to flood a new LSA. Receiving routers then execute the SPF algorithm to update their trees, ensuring the topology reflects the new condition.
Q14. Analyze the following scenario: Router X in area 0 receives an LSA with a sequence number lower than the one stored. According to OSPF standards, what should X do?
📖 Explanation: OSPF uses the sequence number to guarantee LSA freshness. If a received LSA has an older sequence number, it is considered stale and is discarded; the router does not flood it further and may request the newer version from the originator.
Q15. Compare the scalability of OSPF with a single area versus OSPF with multiple areas using ABRs. Which advantage is most significant?
📖 Explanation: Dividing a large network into multiple areas limits the LSDB each router must store to its own area, dramatically reducing memory and processing requirements, which is the primary scalability benefit of hierarchical OSPF.
Q16. Apply OSPF’s cost calculation: If a link has bandwidth of 100 Mbps and the reference bandwidth is 100 Mbps, what is the OSPF cost?
📖 Explanation: OSPF cost is computed as . With both values equal to 100 Mbps, the division yields a cost of 1.
Q17. Explain why OSPF routers must share identical area IDs to form adjacencies.
📖 Explanation: Adjacency formation requires that both routers belong to the same OSPF area, guaranteeing they will generate and flood compatible LSAs. If area IDs differ, the LSDBs would describe different topologies, preventing a valid neighbor relationship.
Q18. Synthesize the steps a router takes from receiving a Hello packet to updating its SPF tree. Which sequence is correct?
📖 Explanation: When a router receives a Hello, it first validates the neighbor and establishes adjacency. Once the adjacency is up, it exchanges LSAs, updates its LSDB, and finally runs the Dijkstra (SPF) algorithm to compute the shortest‑path tree.
Q19. Apply the principle of OSPF’s “router‑LSA” to explain how a router advertises a multi‑access network.
📖 Explanation: A router‑LSA (Type 1) includes all router‑connected interfaces. For a multi‑access network, the router lists the network as a stub, enabling other routers to know the network’s existence and cost through that router.
Q20. Given OSPF’s SPF algorithm, what is the effect of a “stub area” on external route propagation?
📖 Explanation: Stub areas do not accept Type 5 external LSAs; instead, they rely on a default route or summary LSAs from the ABR. This effectively blocks detailed external routes from entering the stub area.
Q21. Synthesize how OSPF ensures loop‑free forwarding using the shortest‑path tree. Which statement best describes the mechanism?
📖 Explanation: Every router builds an SPF tree rooted at itself using the identical LSDB from its area. Because each router selects the next hop that lies on the shortest‑cost path toward the destination, forwarding loops cannot form.
Q22. Apply the concept of “designated router” (DR) election. In a multi‑access network, which condition most directly influences DR selection?
📖 Explanation: When multiple routers are eligible, OSPF elects the router with the highest Router ID as the Designated Router. If Router IDs are equal, the highest interface IP address is used as a tiebreaker.
Q23. Explain why OSPF’s LSDB must be synchronized across all routers in an area before SPF can be safely executed. Which reason is most accurate?
📖 Explanation: The SPF algorithm assumes a consistent view of the network; if LSDBs differ, each router could compute a different shortest‑path tree, leading to inconsistent forwarding decisions and possible loops. Synchronization guarantees uniform routing tables.
Q24. If an OSPF router receives two identical LSAs with the same sequence number but different checksums, what inference can be made?
📖 Explanation: A checksum mismatch indicates that the LSA payload was altered in transit. The router treats the LSA with the bad checksum as corrupted, discarding it and optionally requesting the correct copy from the originator.
Q25. In OSPF, a router’s SPF calculation yields a path cost of 12 to destination D. If a new link with cost 3 appears, what is the new shortest‑path cost to D assuming it provides a better route?
📖 Explanation: The new route offers a reduction of 3 units compared to the previous cost of 12, resulting in a total cost of . Therefore, the updated shortest‑path cost becomes 9.
Q26. Consider an OSPF network where a router incorrectly sets its Router ID to 0.0.0.0. According to OSPF rules, what will happen during adjacency formation?
📖 Explanation: A Router ID of 0.0.0.0 is illegal; OSPF treats the router as having an invalid identifier, causing neighboring routers to reject the adjacency and preventing the router from participating in the area until a valid ID is configured.
Q27. Evaluate the impact of OSPF’s “cost” metric being inversely proportional to bandwidth. If a link’s bandwidth doubles, how does its OSPF cost change?
📖 Explanation: OSPF cost is calculated as . Doubling the bandwidth halves the denominator’s effect, thus the resulting cost is halved.