Study guide

8.3 OSPFv2 & OSPFv3 Configuration and Verification

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.3 OSPFv2 & OSPFv3 Configuration and Verification

Key Takeaways Explain This Topic AI

Junos OSPFv2 configuration activates interfaces under area stanzas at [edit protocols ospf area <area-id> ], using decimal or dotted-decimal area notation.

Configuring an interface with the passive option advertises its connected subnet into OSPF Type 1 LSAs as a stub link while preventing Hello transmission and adjacency formation.

Junos calculates interface metric as reference-bandwidth divided by interface-bandwidth; the 100 Mbps default assigns cost 1 to all links 100 Mbps and faster, requiring explicit reference-bandwidth tuning in modern high-speed networks.

OSPFv3 runs per-link using IPv6 link-local addresses (fe80::/10) rather than per-subnet, decoupling topology from prefix addressing via Type 8 (Link) and Type 9 (Intra-Area Prefix) LSAs.

Essential verification commands include show ospf neighbor, show ospf database, show ospf interface, and show route protocol ospf.

Last updated: October 2026

OSPFv2 & OSPFv3 Configuration and Verification

Implementing OSPF on Juniper EX Series switches, MX Series routers, and SRX Series security gateways requires configuring interface parameters under the [edit protocols ospf] hierarchy for IPv4 and [edit protocols ospf3] for IPv6. In addition to basic protocol activation, enterprise deployments require tuning interface types, configuring passive subnets, adjusting reference bandwidth metrics, and conducting systematic verification.

1. Junos OSPFv2 Configuration Hierarchy

In Junos OS, OSPF is not enabled by applying network wildcard masks as seen in some traditional network operating systems. Instead, interfaces are explicitly assigned to specific OSPF areas under [edit protocols ospf area <area-id>] : [edit]

user@EX4300# edit protocols ospf

  • [edit protocols ospf]
  • user@EX4300# set area 0.0.0.0 interface ge-0/0/0.0 interface-type p2p
  • user@EX4300# set area 0.0.0.0 interface ge-0/0/1.0 priority 200
  • user@EX4300# set area 0.0.0.0 interface lo0.0 passive

In this configuration:

area 0.0.0.0 : Specifies the backbone area. Junos accepts both dotted-decimal ( 0.0.0.0 ) and integer ( 0 ) formats interchangeably.

interface-type p2p : Overrides the default broadcast mode on Ethernet interface ge-0/0/0.0 . On point-to-point router links, this eliminates DR/BDR election overhead and speeds up convergence.

priority 200 : Raises the DR election priority on ge-0/0/1.0 above the Junos default of 128 to influence Designated Router election.

passive : Declares lo0.0 as a passive interface.

2. Passive Interface Mechanics & Security

In enterprise networks, access switch VLANs (such as user, VoIP, or printer subnets terminating on irb interfaces) must be advertised across the OSPF backbone so that endpoints can be reached. However, running active OSPF on user-facing ports creates serious security and efficiency vulnerabilities:

Untrusted client machines or unauthorized switches could send OSPF Hellos, form adjacencies, and inject rogue routes into the enterprise core.

Continuous transmission of OSPF Hello multicasts consumes unnecessary bandwidth on client access ports. +---------------------------------------------------------------------------------------------------+

  • | PASSIVE INTERFACE OPERATION |
  • | |
  • | Active OSPF Interface (ge-0/0/0.0): |
  • | [Router] <======== Hello / DBD / LSR / LSU / LSAck ========> [Neighbor Router] |
  • | - Transmits and receives OSPF packets; forms full adjacency. |
  • | |
  • | Passive Interface (irb.10): |
  • | [Router] --x (Suppressed Hellos) --x [User PC / Workstation] |
  • | - Subnet 10.1.10.0/24 is included in Type 1 Router LSA as a Stub Network. |
  • | - No Hellos transmitted or accepted; no neighbor adjacency can ever form. |
  • +---------------------------------------------------------------------------------------------------+

Applying the passive statement under an interface stanza instructs Junos to:

Advertise the interface's IP subnet as a Stub Network link inside the local Type 1 Router LSA.

Completely suppress the generation of OSPF Hello packets out of that interface.

Discard any incoming OSPF packets arriving on that interface, ensuring no neighbor adjacency can ever form. [edit protocols ospf area 0.0.0.0]

  • user@EX4300# set interface irb.10 passive
  • user@EX4300# set interface irb.20 passive
  • 3. Metric Calculation & Reference Bandwidth Tuning

OSPF determines the cost of an interface using a metric calculation inversely proportional to the interface bandwidth:

Cost = Reference Bandwidth Interface Bandwidth \text{Cost} = \frac{\text{Reference Bandwidth}}{\text{Interface Bandwidth}} Cost = Interface Bandwidth Reference Bandwidth ​

By default, Junos OS defines the reference bandwidth as 100 Mbps ( 10 8 10^8 1 0 8 bps). Because the minimum OSPF link cost is an integer value of 1, any interface with a bandwidth equal to or greater than 100 Mbps receives a cost of 1: +---------------------------------------------------------------------------------------------------+

  • | DEFAULT VS ADJUSTED REFERENCE BANDWIDTH METRIC COMPARISON |
  • +----------------------+--------------------+-----------------------+-------------------------------+
  • | Interface Speed | Nominal Bandwidth | Default Cost (100M) | Adjusted Cost (100G Ref-BW) |
  • +----------------------+--------------------+-----------------------+-------------------------------+
  • | Fast Ethernet | 100 Mbps | 1 | 1,000 |
  • | Gigabit Ethernet | 1 Gbps (1,000M) | 1 (100M/1G = 0.1 -> 1)| 100 |
  • | 10-Gigabit Ethernet | 10 Gbps (10,000M) | 1 (100M/10G = 0.01->1)| 10 |
  • | 100-Gigabit Ethernet | 100 Gbps | 1 (100M/100G = 0.001) | 1 |
  • +----------------------+--------------------+-----------------------+-------------------------------+
  • The Metric Differentiation Problem

Under the default 100 Mbps reference bandwidth, a 100 Mbps FastEthernet uplink, a 1 Gbps trunk, a 10 Gbps core link, and a 100 Gbps backbone link all share the exact same metric of 1. OSPF cannot differentiate link speeds, potentially routing high-volume core traffic over a saturated 1 Gbps link instead of an available 10 Gbps path.

To restore correct path calculation, enterprise administrators must explicitly set a modern reference bandwidth at the top level of the OSPF hierarchy: [edit protocols ospf]

user@EX4300# set reference-bandwidth 100g

Critical Requirement : The reference-bandwidth must be configured identically on every router in the entire OSPF domain . If routers compute costs using different reference bandwidths, path metrics become asymmetric, producing asymmetric or unintended path costs. Matching reference bandwidth is an operational consistency practice, not an adjacency requirement.

4. OSPFv3 Architecture for IPv6

OSPFv3 (RFC 5340) adapts the link-state mechanics of OSPF to support IPv6. While the core algorithms (Dijkstra SPF) and state machines remain identical, OSPFv3 introduces significant architectural shifts:

Runs Per-Link Rather Than Per-Subnet : In OSPFv2, neighbors must reside on the same IPv4 subnet to form an adjacency. In OSPFv3, neighbors form adjacencies across a physical link using their IPv6 Link-Local addresses ( fe80::/10 ) , regardless of whether they share common global unicast prefixes.

Decoupling of Addresses from Topology : OSPFv2 Type 1 and Type 2 LSAs carry both topological connection graphs and IPv4 prefix information. OSPFv3 removes IP prefix data from Type 1 and Type 2 LSAs entirely, using them purely to map node connectivity. Two new LSA types carry prefix reachability:

Type 8: Link LSA : Flooded link-local only. Advertises the router's link-local address and any IPv6 global unicast prefixes configured on that link.

Type 9: Intra-Area Prefix LSA : Flooded intra-area. Carries all IPv6 prefixes associated with a router (referencing a Type 1 LSA) or associated with a transit multi-access network (referencing a Type 2 LSA).

32-Bit Router ID : Even in a pure IPv6 environment, OSPFv3 routers still identify themselves using a 32-bit Router ID represented in IPv4 dotted-decimal syntax (e.g., 10.255.0.1 ).

  • Junos OSPFv3 Configuration
  • OSPFv3 is configured under the distinct [edit protocols ospf3] hierarchy: [edit]
  • user@EX4300# edit protocols ospf3
  • [edit protocols ospf3]
  • user@EX4300# set area 0.0.0.0 interface ge-0/0/0.0
  • user@EX4300# set area 0.0.0.0 interface lo0.0 passive

OSPFv2 and OSPFv3 operate as separate, independent routing protocol processes inside Junos ( rpd ), maintaining isolated neighbor sessions and separate link-state databases.

5. Operational Verification Commands

Junos provides comprehensive operational commands to verify and troubleshoot OSPF operations:

  • show ospf neighbor
  • Displays the status of immediate OSPF adjacencies: user@EX4300> show ospf neighbor
  • Address Interface State ID Pri Dead
  • 192.168.12.2 ge-0/0/0.0 Full 10.255.0.2 128 36
  • 192.168.14.2 ge-0/0/1.0 2Way 10.255.0.3 128 32

State : Confirms whether the neighbor has reached Full (synchronized) or 2Way (DROther neighbor on broadcast network).

Dead : Countdown timer (default 40s) reset each time a valid Hello is received.

  • show ospf interface
  • Verifies interface settings, cost, and DR/BDR roles: user@EX4300> show ospf interface ge-0/0/0.0
  • Interface State Area DR ID BDR ID Nbrs
  • ge-0/0/0.0 DR 0.0.0.0 10.255.0.1 10.255.0.2 1
  • Type: LAN, Address: 192.168.12.1, Mask: 255.255.255.0, MTU: 1500, Cost: 100
  • Adj count: 1, Priority: 128, Hello: 10, Dead: 40
  • show route protocol ospf

Verifies that OSPF has installed computed shortest-path routes into the master routing table ( inet.0 ), displaying route preference (default 10 for internal routes) and metric.

Output note: Command output shown here is a schematic teaching example, not a captured device session. Field names and feature support depend on platform and Junos release.

OSPFv3 Realms and Address Families

A realm selects an OSPFv3 address family. IPv6 unicast is the default realm. Other supported realms are ipv4-unicast , ipv4-multicast , and ipv6-multicast ; they separate the routing information calculated and advertised. A realm is not an OSPF area or a tenant routing instance. Each realm still has its own area/interface configuration and database context.

For example, on supported platforms, IPv4 unicast over OSPFv3 is configured under protocols ospf3 realm ipv4-unicast area 0.0.0.0 interface ge-0/0/0.0 . Both endpoints must support and configure the same realm. Enabling only ordinary protocols ospf3 area ... configures default IPv6 unicast, not an IPv4 realm. OSPFv3 still uses IPv6 link-local transport, so working IPv4 addressing alone is insufficient to establish its neighbor exchange.

When a neighbor appears healthy but the intended family’s routes are missing, inspect the realm explicitly: show ospf3 route realm ipv4-unicast and show ospf3 log realm ipv4-unicast . Compare the protocol database with show route table inet.0 for IPv4 and inet6.0 for IPv6. A route in one family’s protocol view does not prove it was installed in the other family’s RIB. This separation helps diagnose the difference between an adjacency problem, a wrong realm, and a competing active route.

Official references checked 2026-10-18: OSPFv3 realms .