Portfolio Website of CCIE Jiwan

From OSPF Confusion to Interview Conviction (Recap OSPF in 30 min)

OSPF Decoded: Your Ultimate Interview Survival Guide

 

OSPF Overview

OSPF is a link-state routing protocol used to make routing decisions based on the state of the network links. It operates within hierarchical areas and uses LSAs (Link-State Advertisements) to communicate the network topology to routers within an OSPF domain. Dividing networks into areas helps reduce the complexity of routing information exchanged within OSPF, providing both scalability and efficient network management.

Here’s a detailed breakdown of the OSPF area types along with the corresponding LSA types allowed in each area. These notes will provide a complete picture of how LSAs are handled in different OSPF areas.

  1. Backbone Area (Area 0):
  • Description:
    • This is the core area of an OSPF network and is known as Area 0.
    • All other areas must connect to the backbone area either directly or through a virtual link.
    • It is responsible for the overall routing and ensures connectivity across multiple areas. Or
    • A typical design where internal routers have a full view of the network.
  • LSA Types:
    • Type-1 (Router LSA): Flooded within the area, generated by all routers in the backbone.
    • Type-2 (Network LSA): Generated by DR on broadcast and NBMA networks, flooded within the area.
    • Type-3 (Summary LSA): ABRs use Type-3 LSAs to propagate routes between areas.
    • Type-4 (ASBR Summary LSA): Informs routers about ASBRs in other areas.
    • Type-5 (External LSA): Used to propagate external routes redistributed into OSPF (e.g., from BGP).
  1. Standard Area:
  • Description:
    • A normal OSPF area that can have both internal and external routes.
    • All types of LSAs are allowed.
    • A typical design where internal routers have a full view of the network.
    • Commonly connected to the backbone area for inter-area routing.
  • LSA Types:
    • Type-1 (Router LSA): Describes the router’s links and is flooded within the area.
    • Type-2 (Network LSA): Describes multi-access networks, generated by DR.
    • Type-3 (Summary LSA): Propagates inter-area routes, generated by ABRs.
    • Type-4 (ASBR Summary LSA): Describes the ASBRs’ location to route external traffic.
    • Type-5 (External LSA): Advertises external routes from another ASs.
  1. Stub Area
  • LSA Types Blocked: Type-4, Type-5 LSAs (External Routes and ASBR Summaries).
  • Key Points:
    • Purpose: Filters external prefixes by blocking external LSAs (Type-4 and Type-5) and injecting a default route.
    • A typical design where internal routers have a full view of the network.
    • Stub Configuration Consistency: If one router is configured as a stub, all routers within the area must also be stub, as OSPF requires consistent stub configuration across the entire area.
    • Restrictions:
      • Backbone Area (Area 0) and areas with virtual links cannot be configured as Stub Areas.
      • No route redistribution is allowed into a stub area.
    • ABR Role: Injects a default route (Type-3 LSA) into the area to handle external routing.
  1. Totally Stubby Area
  • LSA Types Blocked: Type-3 (Inter-area Summaries), Type-4, and Type-5 LSAs.
  • Key Points:
    • Purpose: Blocks both external LSAs and summary LSAs (Type-3, Type-4, and Type-5), allowing only a default route (Type-3 LSA).
    • A typical design where internal routers have a full view of the network.
    • Default Route Injection: ABR injects a single Type-3 LSA as a default route.
    • Command to Configure: On ABR, use area <area-id> stub no-summary to configure Totally Stubby Area. This ensures no summary LSAs are advertised into the area.

5. NSSA (Not-so-Stubby Area)

  • LSA Types Blocked:
    • Type-4 LSAs (ASBR Summaries)
    • Type-5 LSAs (External Routes)
  • Key Points:
    • Purpose: Allows the redistribution of external routes (e.g., BGP or static) while blocking Type-5 external LSAs. External routes are carried using Type-7 LSAs, which are converted to Type-5 LSAs by the ABR when leaving the NSSA.
    • Balances the need for external connectivity and internal simplicity.
    • Frequently used when external routes need to be redistributed into the OSPF domain but still maintain the simpler LSA structure of a stub area.
    • External Routes: Injects external routes using Type-7 LSAs (specific to NSSA) rather than Type-5 LSAs.
    • Redistribution: Redistribution of external routes (BGP, static) is allowed into NSSA, unlike regular Stub Areas.
    • ABR Role: The ABR converts Type-7 LSAs to Type-5 LSAs when these routes propagate outside the NSSA area to other OSPF areas.
  • Restrictions:
    • Backbone Area (Area 0) and areas with virtual links cannot be configured as NSSA.
    • Type-4 LSAs and Type-5 LSAs (used for external routes) are blocked.
  • Default Route Injection:
    • A default route (Type-7 LSA) can be injected manually. Alternatively, the ABR can inject a Type-7 default route to handle traffic leaving the area.
  1. Totally NSSA
  • LSA Types Blocked:
    • Type-3 LSAs (Inter-area Summaries)
    • Type-4 LSAs (ASBR Summaries)
    • Type-5 LSAs (External Routes)
  • Key Points:
    • Purpose: A Totally NSSA is a further extension of NSSA that blocks both external and summary routes while still allowing external routes via Type-7 LSAs.
    • External Routes: The only external routes allowed in the Totally NSSA are the ones redistributed via Type-7 LSAs (no Type-5 LSAs).
    • ABR Role: The ABR blocks Type-3, Type-4, and Type-5 LSAs and converts Type-7 LSAs into Type-5 LSAs when they leave the NSSA.
    • Routing Simplification: Totally NSSA simplifies routing by preventing inter-area and external routes from being injected while still allowing external connectivity through specific Type-7 LSAs.
  • Restrictions:
    • Type-3, Type-4, and Type-5 LSAs are completely blocked, which restricts external and inter-area route summaries except those injected via Type-7 LSAs.
  • Default Route Injection:
    • The ABR injects a default route into the area, and the Type-7 LSA is used for carrying external routes within the NSSA.

Summary of OSPF Areas and LSAs:

Area Type Type-1 Type-2 Type-3 Type-4 Type-5 Type-7 Default Route
Backbone Area (Area 0) Allowed Allowed Allowed Allowed Allowed N/A No Default Route
Standard Area Allowed Allowed Allowed Allowed Allowed N/A No Default Route
Stub Area Allowed Allowed Allowed Blocked Blocked N/A Injected by ABR
Totally Stubby Area Allowed Allowed Blocked Blocked Blocked N/A Injected by ABR
NSSA (Not-so-Stubby Area) Allowed Allowed Allowed Blocked Blocked Allowed Manually Injected/Type-7
Totally NSSA Allowed Allowed Blocked Blocked Blocked Allowed Injected by ABR

 

OSPF Area Types and LSA Types – Summary Cheat Sheet

This cheat sheet covers all OSPF area types and their corresponding LSA types, detailing their properties for learners ranging from beginners to experts.

OSPF Area Types Overview:

OSPF organizes routers into areas to optimize routing and reduce the size of the routing table. These areas control which types of LSAs are allowed.

  1. Backbone Area (Area 0) – Central hub for routing traffic across multiple areas.
  2. Standard Area – Full routing capabilities with all LSAs allowed.
  3. Stub Area – Reduces external traffic by blocking some LSA types.
  4. Totally Stubby Area – Reduces routing complexity by blocking even more LSAs.
  5. Not-so-Stubby Area (NSSA) – Allows some external routes but restricts others.
  6. Totally NSSA – Similar to NSSA but restricts summary LSAs as well.

LSA Types Overview:

Link State Advertisements (LSAs) are the building blocks of OSPF routing. Each LSA type conveys specific information across the network.

  1. Type-1 (Router LSA) – Describes router links within an area.
  2. Type-2 (Network LSA) – Describes multi-access network links (e.g., Ethernet), generated by DR.
  3. Type-3 (Summary LSA) – Advertises inter-area routes between ABRs.
  4. Type-4 (ASBR Summary LSA) – Provides information about ASBRs for external routing.
  5. Type-5 (External LSA) – Advertises routes learned from outside OSPF (e.g., from BGP).
  6. Type-7 (NSSA External LSA) – Used in NSSA areas to advertise external routes.

OSPF Area Types and Corresponding LSA Types:

Area Type LSA Types Properties
Backbone Area (Area 0) Type-1, Type-2, Type-3, Type-4, Type-5 – Central to OSPF topology.
– All LSA types are allowed.
Standard Area Type-1, Type-2, Type-3, Type-4, Type-5 – Full routing information.
– Can handle both internal and external routes.
Stub Area Type-1, Type-2, Type-3 – External LSAs (Type-5) blocked.
– Only intra-area and inter-area routes are allowed.
– ABR injects a default route (0.0.0.0).
Totally Stubby Area Type-1, Type-2 – Blocks both external (Type-5) and summary routes (Type-3, Type-4).
– Only intra-area routes.
– ABR injects a default route (0.0.0.0).
NSSA (Not-so-Stubby Area) Type-1, Type-2, Type-3, Type-7 – Similar to a stub area but allows external routes.
– External routes carried by Type-7 LSAs.
– Type-5 LSAs blocked.
– Default route manually injected.
Totally NSSA Type-1, Type-2, Type-7 – Like NSSA but blocks summary routes (Type-3, Type-4).
– External routes carried by Type-7 LSAs.
– ABR injects a default route.

 

Detailed Breakdown of LSAs:

LSA Type Name Function
Type-1 (Router LSA) Router LSA – Generated by every router.
– Describes the router’s links and their cost.
– Flooded within a single area.
Type-2 (Network LSA) Network LSA – Generated by the Designated Router (DR) on broadcast and NBMA networks.
– Describes all routers on the network segment.
Type-3 (Summary LSA) Summary LSA – Generated by ABRs.
– Propagates inter-area routes to other areas.
– Flooded across areas.
Type-4 (ASBR Summary LSA) ASBR Summary LSA – Generated by ABRs.
– Provides information about ASBRs to routers in other areas.
– Used to route traffic to external networks.
Type-5 (External LSA) External LSA – Generated by ASBRs.
– Advertises routes learned from external sources like BGP.
– Flooded to all areas except stub and NSSA.
Type-7 (NSSA External LSA) NSSA External LSA – Generated by ASBRs within NSSA.
– Advertises external routes within NSSA.
– Translated into Type-5 by the ABR when propagated outside the NSSA.

Key Points for Beginners:

  • Backbone (Area 0): Must be connected to all other areas. It carries full routing information across the network.
  • Standard Areas: Full routing is allowed, including both internal and external routes.
  • Stub Areas: Block external routes, but still allow inter-area routes. A default route is injected for external traffic.
  • Totally Stubby Areas: Only intra-area routing is allowed. A default route handles external and inter-area traffic.
  • NSSA: Allows some external routes (via Type-7) while blocking others. External routes are translated to Type-5 when leaving NSSA.
  • Totally NSSA: Similar to NSSA but blocks summary routes to reduce routing complexity.

Key Insights for Expert Level:

  • Type-1 & Type-2 LSAs only operate within the area. They never leave the area boundary.
  • Type-3 LSAs facilitate inter-area communication, providing routing information between areas.
  • Type-4 LSAs ensure routers can reach ASBRs when routing to external destinations.
  • Type-5 LSAs are essential for handling external routes, but they are blocked in stub and NSSA areas to reduce routing complexity.
  • Type-7 LSAs are unique to NSSA and Totally NSSA areas. They allow external routing but must be translated by the ABR for the broader OSPF network.

OSPF Most Asked and Confusing Interview Questions

Here’s a list of commonly asked and often confusing OSPF interview questions, based on the detailed OSPF content you requested earlier. These questions span different skill levels, covering basic concepts, advanced technical details, and scenarios that can confuse candidates in interviews.

Beginner-Level OSPF Interview Questions

  1. What is the backbone area (Area 0) in OSPF and why is it important?
    • The backbone area is essential for connecting all other OSPF areas and ensuring inter-area communication. No OSPF areas can be disconnected from Area 0.
  2. What are the different OSPF area types and how do they differ?
    • Describe the key OSPF area types: Standard Area, Stub Area, Totally Stubby Area, NSSA, and Totally NSSA.
  3. What is the purpose of Link State Advertisements (LSAs) in OSPF?
    • LSAs are used to share routing information. Each type of LSA serves a specific function in maintaining OSPF routing.
  4. How does OSPF handle multi-access networks like Ethernet?
    • OSPF elects a Designated Router (DR) and Backup Designated Router (BDR) on multi-access networks to minimize LSA flooding.
  5. What are the differences between OSPF Type-1 (Router LSA) and Type-2 (Network LSA)?
    • Type-1 LSAs describe a router’s local links, while Type-2 LSAs are generated by the DR on broadcast networks to describe the routers attached to the segment.

Intermediate-Level OSPF Interview Questions

  1. What is a Stub Area in OSPF and why is it used?
    • A Stub Area blocks external (Type-5) LSAs to reduce the routing table size, injecting a default route instead.
  2. What is the difference between a Stub Area and a Totally Stubby Area?
    • A Stub Area allows summary LSAs (Type-3) but blocks external LSAs (Type-5), while a Totally Stubby Area blocks both summary and external LSAs, relying on a default route for all traffic outside the area.
  3. Explain the purpose and function of Type-3 and Type-4 LSAs in OSPF.
    • Type-3 LSAs advertise inter-area routes, while Type-4 LSAs provide information about ASBRs to other areas for routing external traffic.
  4. What is an NSSA (Not-so-Stubby Area) and how does it differ from a Stub Area?
    • An NSSA allows some external routing (Type-7 LSAs) while blocking Type-5 LSAs. This provides more flexibility than a traditional Stub Area.
  5. How does OSPF handle external routes in NSSA, and what role does Type-7 LSA play?
    • In NSSA, external routes are advertised using Type-7 LSAs, which are translated into Type-5 LSAs by the ABR when leaving the NSSA.
  6. What is an ASBR (Autonomous System Boundary Router) and what role does it play in OSPF?
    • ASBRs inject external routing information into the OSPF domain, often using Type-5 or Type-7 LSAs depending on the area type.
  7. What happens when a virtual link is configured in OSPF?
    • A virtual link extends the backbone (Area 0) across a non-backbone area, enabling proper routing when an area is disconnected from Area 0.
  8. How does OSPF inject a default route in a Totally Stubby Area?
    • The ABR injects a default route (0.0.0.0/0) to allow traffic to exit the area, handling all external and inter-area traffic with minimal routing information.

Advanced-Level OSPF Interview Questions

  1. What are the key differences between Type-5 and Type-7 LSAs, and when are they used?
    • Type-5 LSAs are used in standard areas to propagate external routes, while Type-7 LSAs are used in NSSA areas and translated into Type-5 by ABRs when leaving the NSSA.
  2. Why can’t Area 0 or an area with a virtual link be an NSSA?
    • The backbone area (Area 0) and areas with virtual links require full routing information, which is incompatible with the limitations of an NSSA.
  3. How does OSPF achieve route summarization, and what is the role of Type-3 LSA in it?
    • OSPF uses ABRs to summarize routes between areas using Type-3 LSAs, reducing routing complexity by advertising a single summary route instead of multiple specific routes.
  4. Can an area be both a Stub and an NSSA? Why or why not?
    • No, an area cannot be both a Stub and an NSSA because they have conflicting LSA filtering mechanisms (Stub blocks all external routes, NSSA allows external Type-7 routes).
  5. What is the difference between inter-area and intra-area OSPF routing, and how do Type-1, 2, 3 LSAs contribute to each?
    • Intra-area routing is within the same OSPF area (Type-1 and 2 LSAs), while inter-area routing occurs between different OSPF areas using Type-3 LSAs.
  6. In which scenarios would you prefer configuring a Totally Stubby Area versus an NSSA?
    • Use a Totally Stubby Area to simplify routing and block both external and summary routes. NSSA is preferred when you need to allow external routes while limiting the complexity of full routing information.
  7. How do DR and BDR elections work in OSPF, and why are they important?
    • DRs and BDRs are elected on multi-access networks to minimize the flooding of LSAs. DR forwards LSAs for all routers, reducing network overhead.
  8. How does OSPF handle routing loops, and what mechanisms are in place to prevent them?
    • OSPF uses the Shortest Path First (SPF) algorithm, along with strict area boundaries and LSA propagation rules, to prevent routing loops.
  9. What is the purpose of OSPF’s hello and dead intervals, and how do they affect OSPF neighbor relationships?
    • Hello and dead intervals control how often OSPF routers send keep-alive messages to neighbors and how long a router waits before considering a neighbor down. Mismatched intervals can break OSPF adjacencies.
  10. What are some key design considerations when creating a multi-area OSPF topology?
    • Consider backbone connectivity (Area 0), LSA flooding and filtering mechanisms, the role of ABRs and ASBRs, and when to use stub or NSSA areas to optimize routing efficiency.

Scenario-Based Questions:

  1. You have an OSPF topology with one backbone area and multiple stub areas. If an ASBR is introduced in one of the stub areas, what changes must be made to the OSPF configuration?
    • You cannot inject external routes into a stub area. The area must either be converted to an NSSA or become a regular area to allow external routes.
  2. In a multi-area OSPF network, you notice an excessive number of LSAs being propagated between areas. What steps can you take to reduce LSA overhead?
    • Route summarization at ABRs can reduce the number of LSAs. You can also consider configuring some areas as Totally Stubby or NSSA to block unnecessary external or summary LSAs.
  3. Why might OSPF fail to converge in a large, complex network with many areas, and what are potential troubleshooting steps?
    • Convergence issues could arise from misconfigured areas, mismatched hello and dead intervals, incorrect LSA filtering, or SPF algorithm delays. Troubleshoot by checking neighbor relationships, reviewing area configurations, and ensuring proper LSA propagation.
  4. You need to connect an isolated area to Area 0 using a virtual link. How would you configure this and what limitations should you be aware of?
    • A virtual link is configured between two ABRs to extend Area 0 across a non-backbone area. The area containing the virtual link cannot be a stub or NSSA.

These questions should cover a wide range of OSPF-related concepts and scenarios that might be asked in interviews, ranging from simple to highly technical and confusing topics. By practicing these, candidates will be better prepared to handle various interview challenges.

Leave a Comment

Your email address will not be published. Required fields are marked *