Study guide
8.1 OSPF Architecture & Neighbor Adjacency Formation
JNCIS-ENT Enterprise Routing and Switching Study Guide 2026 Exam
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Exam Overview & Junos Enterprise Fundamentals
1.1 JNCIS-ENT Exam Logistics & Blueprint Breakdown 1.2 Junos CLI, Enterprise Platforms & Interface Families 1.3 Layer 2 Bridging Mechanics & Packet Forwarding
2 Chapter 2: VLANs & Inter-VLAN Routing
2.1 VLAN Segmentation and 802.1Q Tags 2.2 Access, Trunk, Native and Voice VLANs 2.3 IRB Architecture and Interface Families 2.4 IRB Configuration and Packet Walk 2.5 VLAN Configuration, Verification & Troubleshooting
3 Chapter 3: Spanning Tree Protocols
3.1 Layer 2 Loops and Root Bridge Election 3.2 STP Costs, Port Roles, States and BPDUs 3.3 RSTP Rapid Convergence & Link Types 3.4 MSTP Architecture & Spanning Tree Operations
4 Chapter 4: Layer 2 Security & Feature Protection
4.1 Edge BPDU and Root Protection 4.2 Loop Protection and Diagnostic States 4.3 Port Security, MAC Limiting & Persistent MAC Learning 4.4 DHCP Snooping, Dynamic ARP Inspection (DAI) & IP Source Guard 4.5 Layer 2 Firewall Filters: Types, Order and Actions
5 Chapter 5: Advanced Layer 2 Features & Storm Control
5.1 Storm Control & Broadcast/Multicast Suppression 5.2 MACsec Link Security and Key Agreement 5.3 LLDP and LLDP-MED Operations & Verification
6 Chapter 6: Protocol-Independent Routing & Load Balancing
6.1 Static, Aggregate, and Generated Routes 6.2 Routing Instances and RIB Groups 6.3 Junos Load Balancing & Filter-Based Forwarding (FBF) 6.4 Martian Routes and Route Acceptance
7 Chapter 7: Junos Routing Policy & Firewall Filters
7.1 Routing Policy Framework & Term Evaluation 7.2 Prefix Lists & Route Filters 7.3 Firewall Filters & Policers
8 Chapter 8: Open Shortest Path First (OSPF) Operation
8.1 OSPF Architecture & Neighbor Adjacency Formation 8.2 OSPF Areas & LSA Types 8.3 OSPFv2 & OSPFv3 Configuration and Verification
9 Chapter 9: Advanced OSPF Features & Routing Policies
9.1 OSPF Special Area Types 9.2 Route Summarization & OSPF Authentication 9.3 OSPF Diagnostics & Common Failure Scenarios
10 Chapter 10: Intermediate System to Intermediate System (IS-IS)
10.1 IS-IS Encapsulation and NET Identity 10.2 IS-IS Levels, Areas and Default Routing 10.3 IS-IS PDU Families and Neighbor Exchange 10.4 IS-IS Database Synchronization and DIS 10.5 IS-IS Configuration, Metrics & Troubleshooting
11 Chapter 11: Border Gateway Protocol (BGP)
11.1 BGP Roles, AS Numbers and TCP Transport 11.2 EBGP/IBGP Sessions, State Machine and Messages 11.3 BGP Attributes & Junos Path Selection Algorithm 11.4 BGP Configuration & Policy Implementation 11.5 BGP Scaling with Route Reflection & Diagnostics
12 Chapter 12: IP Tunneling & High Availability
12.1 GRE & IP-IP Tunneling Architecture 12.2 Link Aggregation (LAG/LACP) & Redundant Trunk Groups (RTG) 12.3 Virtual Chassis Roles and Elections 12.4 Virtual Chassis Links, Splits and Provisioning 12.5 Routing Engine Redundancy: GRES, NSR, NSB and GR 12.6 BFD Detection and VRRP Gateway Redundancy 12.7 Unified ISSU: Requirements and Verification
8.1 OSPF Architecture & Neighbor Adjacency Formation
Key Takeaways Explain This Topic AI
OSPF is an open-standard link-state interior gateway protocol running Dijkstra's Shortest Path First (SPF) algorithm over an identical Link-State Database (LSDB) maintained across all routers in an area.
Junos selects the OSPF Router ID (RID) based on explicit configuration under [edit routing-options router-id], falling back to the lowest appropriate IPv4 loopback address, and finally the lowest suitable IPv4 interface address.
OSPF encapsulates directly into IP protocol 89, defining five functional packet types: Hello, Database Description (DBD), Link-State Request (LSR), Link-State Update (LSU), and Link-State Acknowledgment (LSAck).
Neighbor adjacency progression traverses a deterministic seven-state machine: Down, Init, 2-Way, ExStart, Exchange, Loading, and Full.
On broadcast multi-access networks, routers elect a Designated Router (DR) and Backup Designated Router (BDR) using priority (default 128 in Junos) and RID; election is non-preemptive, and non-DR routers remain in 2-Way state with each other.
Last updated: October 2026
OSPF Architecture & Neighbor Adjacency Formation
Open Shortest Path First (OSPF) is an open-standard link-state Interior Gateway Protocol (IGP) designed by the Internet Engineering Task Force (IETF) to overcome the scalability, convergence, and metric limitations of distance-vector protocols such as RIP. Standardized in RFC 2328 for IPv4 (OSPFv2) and RFC 5340 for IPv6 (OSPFv3), OSPF provides fast convergence, loop-free path determination, hierarchical area partitioning, and equal-cost multipath (ECMP) forwarding across complex enterprise campus and core topologies.
1. Link-State Routing Concepts & The Dijkstra SPF Algorithm
Unlike distance-vector protocols that operate on "routing by rumor"—where each router merely advertises its compiled routing table with hop counts to immediate neighbors—link-state protocols provide full topological transparency. In OSPF, every participating router describes its local interfaces, attached networks, and neighbor adjacencies by generating Link-State Advertisements (LSAs) . These LSAs are flooded throughout the area so that every router builds an identical Link-State Database (LSDB) . +---------------------------------------------------------------------------------------------------+
- | LINK-STATE CONVERGENCE WORKFLOW |
- | |
- | 1. Neighbor Discovery Routers exchange periodic Hello packets to discover neighbors. |
- | 2. Adjacency Formation Routers synchronize databases through DBD, LSR, LSU, and LSAck packets.|
- | 3. LSDB Synchronization Every router in the area maintains an identical map of all links. |
- | 4. Dijkstra SPF Execution Each router places itself at the root of a Shortest Path Tree (SPT). |
- | 5. Routing Table Install Best loop-free next hops are calculated and committed to inet.0 (RIB). |
- +---------------------------------------------------------------------------------------------------+
Once the LSDB achieves synchronization, each router independently executes Dijkstra's Shortest Path First (SPF) algorithm using the LSDB as a directed graph. The algorithm places the executing router at the root of a shortest-path tree (SPT) and calculates the lowest cumulative metric cost to reach every destination subnet. Because all routers within an area share an identical LSDB and run the deterministic Dijkstra algorithm, OSPF guarantees a loop-free intra-area topology.
2. Router ID (RID) Selection Hierarchy in Junos
The Router ID (RID) is a 32-bit unsigned integer, formatted in standard dotted-decimal notation (such as 10.255.0.1 ), that uniquely identifies an OSPF router within the entire Autonomous System (AS). The RID is mandatory for OSPF operation because it serves as the key for identifying originating routers in LSAs and resolving DR/BDR election ties.
In Junos OS, the active OSPF Router ID is determined according to a strict hierarchical sequence: +---------------------------------------------------------------------------------------------------+
- | JUNOS ROUTER ID SELECTION HIERARCHY |
- +------------------------------------+--------------------------------------------------------------+
- | 1. Explicit Configuration | set routing-options router-id <ipv4-address> |
- | | (Highest precedence; strictly recommended best practice) |
- +------------------------------------+--------------------------------------------------------------+
- | 2. Loopback IPv4 | Loopback address, honoring an explicit primary address |
- | | (Commonly lo0.0; stable virtual interface) |
- +------------------------------------+--------------------------------------------------------------+
- | 3. Lowest Suitable Interface IPv4 | Lowest eligible IPv4 address; non-P2P preferred to P2P |
- | | or logical interface (excluding lo0) |
- +------------------------------------+--------------------------------------------------------------+
- | 4. Failure State | If no operational IPv4 address exists on any interface, |
- | | the OSPF protocol process cannot start |
- +------------------------------------+--------------------------------------------------------------+
- Operational Gotcha: Router ID Stability
Explicitly configure a stable, unique routing-options router-id and verify it with show ospf overview . Automatic selection can change when interface addressing changes. A router-ID change can reset protocol relationships and leave old LSAs until they expire; schedule it as a disruptive change rather than casually restarting all routing.
3. OSPF Protocol Packet Types
OSPF operates directly over the Internet Protocol using IP protocol number 89 , bypassing Layer 4 transport protocols like TCP and UDP. OSPF implements its own reliable transport, flow control, and sequencing mechanisms through five standardized protocol packet types:
Packet Type Packet Name Primary Function Transport & Reliability
Type 1 Hello Discovers neighbors, negotiates operational parameters, establishes bidirectionality, and maintains liveness On broadcast/P2P links, sent to 224.0.0.5 ; NBMA uses unicast; unacknowledged
Type 2 Database Description (DBD / DD) Exchanges summary headers of all known LSAs during initial database synchronization Unicast; sequence-number acknowledged by slave
Type 3 Link-State Request (LSR) Solicits complete, updated LSAs from a neighbor when local copies are missing or older Unicast; acknowledged by LSU response
Type 4 Link-State Update (LSU) Transports one or more full Link-State Advertisements (LSAs) across adjacent routers Multicast or unicast; explicitly acknowledged by LSAck
Type 5 Link-State Acknowledgment (LSAck) Confirms receipt of LSUs to guarantee reliable flooding Multicast or unicast; matches LSA header parameters
4. The Common Neighbor State Progression
Before two OSPF routers can share topology details, they must progress through a formalized seven-state finite state machine:
Down : The initial state of an OSPF neighbor conversation. No Hello packets have been received from the remote router on the local interface.
Init : A Hello packet has been received from the remote neighbor, but the local router's own Router ID is not listed in the neighbor's received Hello packet. This confirms unidirectional reception only.
2-Way : The local router observes its own Router ID in the Neighbors field of the received Hello packet. Bidirectional communication is confirmed. On broadcast multi-access links, the Designated Router (DR) and Backup Designated Router (BDR) election takes place in this state. Routers that are neither DR nor BDR (DROthers) stop here with one another, remaining in the 2-Way state.
ExStart : The beginning of database synchronization between adjacent routers. The two routers establish a master/slave relationship and negotiate an initial Database Description sequence number. The router with the higher Router ID becomes the Master; the master drives sequence number increments, while the slave acknowledges.
Exchange : The routers exchange Database Description (DBD) packets containing the headers of all LSAs in their local databases. Each router compares the received LSA headers against its own LSDB to identify missing, older, or corrupted entries.
Loading : Routers send Link-State Request (LSR) packets for any missing or outdated LSAs identified during the Exchange state. The neighbor answers with Link-State Update (LSU) packets containing the full LSAs, which the receiving router acknowledges with Link-State Acknowledgment (LSAck) packets.
Full : The Link-State Databases of the two adjacent routers are completely synchronized. The routers can now compute shortest paths using Dijkstra's algorithm.
5. Network Types & DR/BDR Election Mechanics
OSPF behavior depends directly on the underlying network medium type. The two primary network types encountered in enterprise campus and core networks are Broadcast Multi-Access and Point-to-Point (P2P) . +---------------------------------------------------------------------------------------------------+
- | BROADCAST MULTI-ACCESS ADJACENCY MESH COMPARISON |
- | |
- | Without DR/BDR (Full Mesh): With DR/BDR Architecture: |
- | N * (N - 1) / 2 adjacencies 2N - 3 adjacencies |
- | Example: 6 Routers = 15 Adjacencies Example: 6 Routers = 9 Adjacencies |
- | |
- | [R1]-------[R2] [R1]-------[DR] |
- | | \ / | | / | |
- | | \ / | | / | |
- | | \ / | | / | |
- | [R3]-------[R4] [R2]----+ [BDR] |
- | | / \ | | \ | |
- | [R5]-------[R6] [R3] +-[DROther] |
- +---------------------------------------------------------------------------------------------------+
- The Multi-Access Flooding Challenge
On a multi-access broadcast segment (such as an Ethernet VLAN switch fabric) with n n n participating routers, requiring every router to establish full adjacencies with every other router produces an n ( n − 1 ) / 2 n(n-1)/2 n ( n − 1 ) /2 full mesh. In a segment with 10 routers, this generates 45 separate adjacencies, creating redundant LSA flooding, duplicate acknowledgments, and high CPU overhead.
To solve this, OSPF elects a Designated Router (DR) and a Backup Designated Router (BDR) on all broadcast networks:
Designated Router (DR) : Acts as the central hub for the multi-access segment. It forms full adjacencies with all routers on the link, receives updates, and originates the Type 2 Network LSA representing the pseudo-node subnet.
Backup Designated Router (BDR) : Maintains concurrent full adjacencies with all routers on the segment and listens to all updates, ready to assume the DR role instantly without database resynchronization if the active DR fails.
DROther : Routers that are neither DR nor BDR form full adjacencies only with the DR and BDR. Between two DROther routers, the adjacency stops permanently in the 2-Way state.
Junos DR/BDR Election Rules
Interface Priority : Priority ranges from 0 to 255. In Junos OS, the default priority is 128 (unlike Cisco IOS, which defaults to 1). A priority of 0 renders an interface completely ineligible to become DR or BDR.
Tiebreaker : When priority values tie, the router with the highest Router ID is elected.
Non-Preemptive Nature : The election is non-preemptive. If a router with a higher priority or higher RID joins an existing segment where a DR and BDR are already operational, the newcomer will not usurp either role. It remains a DROther until the existing DR or BDR fails, reboots, or has its interface reset.
Dedicated Multicast Addressing
OSPF uses two reserved IPv4 link-local multicast addresses on broadcast networks:
224.0.0.5 ( AllSPFRouters ): Listened to by all active OSPF routers. The DR and BDR transmit LSUs and Hellos to this address to reach all segment participants. Point-to-point links also communicate exclusively on 224.0.0.5 .
224.0.0.6 ( AllDRouters ): Listened to exclusively by the DR and BDR. DROther routers transmit their Link-State Updates and Link-State Acknowledgments to this address, preventing other DROther routers from processing transit flooding.
Point-to-Point Interfaces
On dedicated point-to-point links (such as routed switch-to-switch interconnects configured with interface-type p2p ), no DR or BDR is elected. Both routers form a direct full adjacency, optimizing convergence by eliminating DR election timers and reducing packet processing.
The seven states shown are the usual broadcast/point-to-point progression. OSPF also defines Attempt for configured NBMA neighbors; the complete standard state set has eight states. Router-ID address selection is separate from DR election: Junos automatically favors a low address for identity, while the DR election favors the highest RID after interface priority ties.
Official references checked 2026-10-18: Router ID selection .