Shopping cart

Subtotal:

$0.00

JN0-351 OSPF

OSPF

Detailed list of JN0-351 knowledge points

OSPF Detailed Explanation

OSPF (Open Shortest Path First) is a powerful and widely used routing protocol in modern networks. It is a link-state protocol, which means it has a detailed understanding of the network topology and calculates the shortest paths using Dijkstra's algorithm.

1. Basic Concepts

What is OSPF?

  • OSPF stands for Open Shortest Path First, a dynamic routing protocol used within an Autonomous System (AS).
  • It is designed to calculate the shortest path to a destination based on link costs (e.g., bandwidth or delay).
  • OSPF is:
    • Standards-based: Defined in IETF RFC 2328.
    • Classless: Supports VLSM (Variable Length Subnet Masking).
    • Fast Convergence: Quickly adapts to topology changes.

Key OSPF Features

  • Metric: OSPF uses "cost" as its metric, typically derived from the bandwidth of the link. Lower cost paths are preferred.
  • Link State Database (LSDB): Each router maintains a database of the network topology, shared via Link State Advertisements (LSAs).
  • Hierarchical Design: Divides the network into areas to optimize performance and scalability.

2. Detailed Knowledge

Area Design

OSPF networks are divided into logical segments called areas to:

  • Improve scalability.
  • Reduce routing table size and LSDB size.
  • Isolate instability (changes in one area do not flood the entire network).
  1. Area 0 (Backbone Area):

    • Central to all OSPF designs.
    • All non-backbone areas must connect to Area 0 directly or through virtual links.
  2. Non-backbone Areas:

    • Regular areas that exchange routing information through Area 0.
    • Special types include:
      • Stub Area: Does not allow external routes.
      • NSSA (Not-So-Stubby Area): Allows limited external routes.

Router Types

OSPF defines several router roles based on their location and function:

  1. Internal Router:

    • Belongs to a single OSPF area.
    • Maintains only one area’s LSDB.
  2. ABR (Area Border Router):

    • Connects one or more non-backbone areas to Area 0.
    • Maintains LSDBs for each area it connects.
  3. ASBR (Autonomous System Boundary Router):

    • Connects the OSPF network to external networks (e.g., BGP).
    • Redistributes external routes into OSPF.
  4. Backbone Router:

    • Located within Area 0.
    • Can also be an ABR or ASBR.

Link State Advertisements (LSAs)

LSAs are packets used by OSPF to share network topology information. They are stored in the LSDB and flooded throughout the network.

  1. Type 1: Router LSA:

    • Advertised by all routers within an area.
    • Describes the router’s links, their costs, and states.
  2. Type 2: Network LSA:

    • Advertised by a Designated Router (DR).
    • Describes all routers on a multi-access network (e.g., Ethernet).
  3. Type 3: Summary LSA:

    • Generated by ABRs.
    • Describes inter-area routes and helps propagate reachability information between areas.
  4. Other LSA Types:

    • Type 4: Used to inform areas about ASBRs.
    • Type 5: Describes external routes (e.g., BGP).

DR/BDR Election

In multi-access networks (like Ethernet), OSPF elects a Designated Router (DR) and a Backup Designated Router (BDR) to reduce overhead.

  1. Purpose:

    • Minimize the number of OSPF adjacencies.
    • Only the DR and BDR form adjacencies with all other routers.
  2. Election Process:

    • Determined by router priority (default is 1).
    • If priorities are equal, the router with the highest Router ID is chosen.
    • The DR takes the lead in sending and receiving LSAs; the BDR takes over if the DR fails.
  3. Benefits:

    • Enhances network convergence by reducing LSA flooding.
    • Simplifies topology in large multi-access networks.

3. Key Takeaways

  • OSPF is a link-state protocol: It builds a complete map of the network to calculate optimal routes.
  • Hierarchical areas: OSPF divides the network into areas for scalability and stability, with Area 0 serving as the backbone.
  • Router types: ABRs and ASBRs play vital roles in inter-area and external routing.
  • LSAs: These packets are the foundation of OSPF’s dynamic topology updates.
  • DR/BDR election: Simplifies OSPF operations on multi-access networks, reducing overhead.

OSPF (Additional Content)

1. OSPF Neighbor State Machine

OSPF builds adjacencies between routers using a seven-step state machine. Each state reflects the progression of control-plane interactions between OSPF-speaking neighbors.

OSPF Neighbor States (in order):

  1. Down
  • No Hello packets received yet. This is the initial state.
  1. Init
  • Hello packet received, but router has not seen its own Router ID in the neighbor’s Hello.
  1. 2-Way
  • Bidirectional communication established.

  • If the interface type is broadcast or NBMA, only DR/BDR routers form full adjacencies beyond this state.

  1. ExStart
  • Routers determine which one will begin the database exchange process (Master/Slave election).
  1. Exchange
  • Routers exchange DBD (Database Description) packets to describe their LSDB.
  1. Loading
  • LS Requests (LSR) are sent for missing LSAs.
  1. Full
  • LSDB is fully synchronized; adjacency is established.

Exam Tip:
You may be asked:

“Which state indicates bidirectional communication but not a full adjacency?”
Correct answer: 2-Way

2. OSPF Router ID Selection Process

The Router ID (RID) is a unique 32-bit identifier used to identify the router in the OSPF domain. It plays a critical role in:

  • DR/BDR elections

  • LSAs

  • OSPF session identification

OSPF Router ID Selection Order:

  1. Manually configured router-id

  2. Highest loopback interface IP address

  3. Highest active physical interface IP address

Example CLI in Junos:

set protocols ospf router-id 1.1.1.1

Exam Tip:
A question may describe a router without a configured router ID and ask what it will use. You must remember that OSPF prefers loopback IPs before physical interfaces.

3. OSPF Interface Types and Their Impact on Adjacency

Interface types determine how OSPF neighbors interact and whether DR/BDR elections occur.

Interface Type DR/BDR Required Example Media Notes
Broadcast Yes Ethernet OSPF automatically elects DR/BDR
Point-to-Point No PPP, P2P links Direct neighbors; no DR/BDR
NBMA Yes (manual config) Frame Relay, ATM No multicast; neighbors must be manually configured
Point-to-Multipoint No Hub-and-spoke IP tunnels Treats each connection as individual P2P

Exam Tip:
Expect questions that ask:

“Which OSPF interface type does not require a DR/BDR?”
Correct answer: Point-to-Point

4. LSA Types 6–11: Supplemental Knowledge

OSPF LSA Types 1–5 are most relevant to JN0-351. However, understanding the presence of additional LSA types is useful for eliminating incorrect choices.

LSA Type Description Exam Relevance
6 Multicast OSPF (MOSPF) LSA – not widely used Low
7 NSSA External LSA – used in Not-So-Stubby Areas Medium
8 External attributes for BGP – for MPLS VPNs Rare
9-11 OSPFv3-specific LSAs (link, intra-area prefix LSAs) Low

Exam Tip:
You might see a question like:

“Which of the following is not a commonly used LSA type?”
Focus on identifying Type 6 or 8 as outliers.

Summary – Exam-Oriented Insights for OSPF

Area Key Details
Neighbor States 2-Way ≠ Full; Full = LSDB complete
Router ID Selection Config > Loopback IP > Physical IP
Interface Types Point-to-Point skips DR/BDR; NBMA needs manual neighbor config
Extended LSA Types Type 6, 8, 9–11 rarely used; Type 7 used in NSSA

Frequently Asked Questions

What conditions must be met for two routers to become OSPF neighbors?

Answer:

They must have matching key parameters such as area ID, authentication, timers, and subnet.

Explanation:

OSPF neighbors only form when several parameters match:

  • Area ID

  • Hello and dead timers

  • Authentication settings

  • Network mask

  • Stub area flag

If any of these values differ, routers remain stuck in the INIT or EXSTART state. Troubleshooting OSPF adjacency issues typically involves verifying interface configuration and checking OSPF hello packets.

Demand Score: 94

Exam Relevance Score: 95

What is the role of the Designated Router (DR) in OSPF?

Answer:

The DR reduces the number of adjacencies on multi-access networks.

Explanation:

In networks like Ethernet where many routers share the same segment, OSPF would require each router to form adjacencies with all others.

Instead, OSPF elects a Designated Router (DR) and Backup Designated Router (BDR). Other routers form adjacencies with the DR and BDR only. This reduces protocol overhead and improves scalability.

Demand Score: 90

Exam Relevance Score: 92

What is the purpose of OSPF areas?

Answer:

To reduce routing overhead and improve scalability.

Explanation:

OSPF divides large networks into multiple areas. Each area maintains its own link-state database.

Area 0 acts as the backbone, connecting all other areas. This structure reduces the size of routing updates and limits the scope of topology changes. Proper area design is important for large enterprise networks.

Demand Score: 88

Exam Relevance Score: 90

Why might OSPF neighbors be stuck in the EXSTART state?

Answer:

Usually due to MTU mismatches between interfaces.

Explanation:

During the EXSTART state, routers negotiate the master/slave relationship and exchange database description packets.

If the interface MTU differs between routers, they may reject packets and remain stuck in EXSTART. Other causes include duplicate router IDs or mismatched interface types.

Demand Score: 91

Exam Relevance Score: 93

What is a stub area in OSPF?

Answer:

A stub area blocks external routes to reduce routing table size.

Explanation:

In stub areas, external routes (Type 5 LSAs) are not allowed. Instead, routers receive a default route from the Area Border Router.

This reduces memory usage and routing updates in smaller branch networks. Variations include totally stubby areas and not-so-stubby areas (NSSA).

Demand Score: 85

Exam Relevance Score: 91

JN0-351 Training Course