Study guide

3.4 Single-Area OSPFv2 — Concepts

Cisco Certified Network Associate CCNA

Track your progress as you read

Finished sections get a check mark.

1 Introduction

About the CCNA 200-301 Exam Domains and Weights Study Strategies and Tips

2 Chapter 1: Network Fundamentals (20%)

1.1 Network Components 1.2 Network Topology Architectures 1.3 Physical Interfaces and Cabling 1.4 TCP vs. UDP 1.5 IPv4 Addressing and Subnetting 1.6 IPv6 Addressing and Prefix 1.7 Wireless Principles 1.8 Virtualization Fundamentals 1.9 Switching Concepts 1.10 OSI and TCP/IP Reference Models 1.11 Verifying IP Parameters on Client Operating Systems

3 Chapter 2: Network Access (20%)

2.1 VLANs — Configuration and Verification 2.2 Trunking and 802.1Q 2.3 Layer 2 Discovery Protocols (CDP and LLDP) 2.4 EtherChannel (Link Aggregation) 2.5 Spanning Tree Protocol (STP) and RSTP 2.6 Wireless Architectures and AP Modes 2.7 Network Access Troubleshooting 2.8 Inter-VLAN Routing — Deep Dive

4 Chapter 3: IP Connectivity (25%)

3.1 Routing Table Components 3.2 Router Forwarding Decisions 3.3 IPv4 and IPv6 Static Routing 3.4 Single-Area OSPFv2 — Concepts 3.5 Single-Area OSPFv2 — Configuration 3.6 First Hop Redundancy Protocols (FHRP) 3.7 Troubleshooting IP Connectivity 3.8 OSPF Troubleshooting Scenarios

5 Chapter 4: IP Services (10%)

4.1 NAT (Network Address Translation) 4.2 DHCP and DNS 4.3 NTP, SNMP, and Syslog 4.4 QoS Fundamentals 4.5 TFTP/FTP and Remote Access 4.6 IP Services — Comprehensive Review

6 Chapter 5: Security Fundamentals (15%)

5.1 Key Security Concepts 5.2 Device Access Control and Password Policies 5.3 VPN Fundamentals 5.4 Access Control Lists (ACLs) 5.5 Layer 2 Security Features 5.6 Network Security Best Practices and Hardening 5.7 Threat Mitigation and Incident Response

7 Chapter 6: Automation and Programmability (10%)

6.1 Impact of Automation on Network Management 6.2 Controller-Based and Software-Defined Architectures 6.3 AI and Machine Learning in Network Operations 6.4 REST-Based APIs 6.5 Configuration Management Tools 6.6 JSON-Encoded Data 6.7 Automation and Programmability — Comprehensive Review

3.4 Single-Area OSPFv2 — Concepts

Key Takeaways Explain This Topic AI

OSPF is a link-state routing protocol that uses Dijkstra's SPF algorithm to find the shortest path.

OSPF uses cost as its metric, calculated as reference bandwidth divided by interface bandwidth.

The default reference bandwidth is 100 Mbps, making all Gigabit and faster links cost 1.

OSPF routers form neighbor adjacencies by exchanging Hello packets to multicast 224.0.0.5.

OSPF uses areas for scalability; the CCNA covers single-area OSPF with all interfaces in Area 0.

Last updated: June 2026

OSPF (Open Shortest Path First) is the most commonly used interior gateway protocol (IGP) in enterprise networks. It is an open-standard link-state routing protocol defined in RFC 2328, and it is the primary routing protocol tested on the CCNA 200-301 exam.

Why OSPF?

  • Feature OSPF RIP EIGRP
  • Type Link-state Distance-vector Advanced distance-vector
  • Standard Open (RFC 2328) Open Cisco (now open)
  • Metric Cost (bandwidth) Hop count (max 15) Bandwidth + delay
  • Convergence Fast Slow Fast
  • Scalability Excellent (areas) Poor Good
  • AD 110 120 90
  • How OSPF Works

Step 1 — Discover neighbors. Routers send Hello packets to discover OSPF speakers on directly connected links.

Step 2 — Form adjacencies. Routers exchange Hellos and progress through neighbor states until fully adjacent.

Step 3 — Exchange link state. Routers exchange Link-State Advertisements (LSAs) describing their interfaces, networks, and costs.

Step 4 — Build the LSDB. Each router assembles an identical Link-State Database (LSDB) — a full topology map of the area.

Step 5 — Run SPF. Each router runs Dijkstra's Shortest Path First algorithm against the LSDB, placing itself at the root of a shortest-path tree.

Step 6 — Install routes. Best paths from the SPF tree are installed into the routing table.

OSPF Packet Types

  • Type Name Purpose
  • 1 Hello Discover and maintain neighbor relationships
  • 2 DBD (Database Description) Summarize LSDB contents for synchronization
  • 3 LSR (Link-State Request) Request specific LSAs from a neighbor
  • 4 LSU (Link-State Update) Carry the actual LSAs
  • 5 LSAck Acknowledge received LSAs

OSPF runs directly over IP as protocol number 89 and uses multicast 224.0.0.5 (AllSPFRouters) for general traffic and 224.0.0.6 (AllDRouters) to reach the DR/BDR.

OSPF Cost Calculation

OSPF metric is cost , computed as:

Cost = Reference Bandwidth / Interface Bandwidth (result rounded up, minimum 1)

Default reference bandwidth = 100 Mbps.

  • Interface Speed Default Cost Note
  • 10 Mbps 10 Correct
  • 100 Mbps (FastEthernet) 1 Correct
  • 1 Gbps 1 Same as FastEthernet — problem
  • 10 Gbps 1 Same as FastEthernet — problem

Fix: Raise the Reference Bandwidth Router(config-router)# auto-cost reference-bandwidth 10000 ! 10 Gbps reference

With a 10 Gbps reference, 1 Gbps becomes cost 10 and 10 Gbps becomes cost 1, restoring differentiation. The reference bandwidth must be identical on every OSPF router or path selection becomes inconsistent. You can also pin a value directly: ip ospf cost 5 under the interface.

OSPF Neighbor Requirements

Two routers will not become neighbors unless these match:

  • Parameter Must Match? Notes
  • Area ID Yes Both interfaces in the same area
  • Hello/Dead timers Yes Defaults 10s/40s on broadcast; 30s/120s on NBMA
  • Authentication Yes Same type and key if used
  • Subnet/Mask Yes Interfaces on the same subnet
  • MTU Yes Mismatch stalls adjacency in ExStart
  • Stub/area type flag Yes Both agree on stub/NSSA
  • Router ID No Must be unique, need not match
  • OSPF Neighbor States
  • State Description
  • Down No Hello received
  • Init Hello received, but own RID not yet seen in it
  • 2-Way Bidirectional — each sees the other's RID; DR/BDR election happens here
  • ExStart Master/slave negotiation for DBD exchange
  • Exchange DBD packets exchanged
  • Loading LSRs/LSUs exchanged to sync LSDBs
  • Full LSDBs synchronized — full adjacency

On the Exam: 2-Way is normal between two DROther routers and is not a fault. A neighbor stuck in ExStart/Exchange almost always means an MTU mismatch . Stuck in Init means one-way Hellos (an ACL or filter blocking return traffic).

OSPF Areas

Area 0 is the backbone; every other area must connect to it.

Single-area OSPF places all interfaces in Area 0 — this is the CCNA scope.

Multi-area OSPF (different areas, ABRs) is CCNP-level.

Keeping everything in Area 0 keeps the LSDB simple and is exactly what CCNA configuration and troubleshooting items assume.

Link-State vs. Distance-Vector: Why It Matters

A distance-vector protocol like RIP shares its entire routing table with directly connected neighbors and trusts what they report — "routing by rumor." A link-state protocol like OSPF instead floods raw topology information (LSAs) so every router builds the same complete map and independently computes its own shortest paths. This gives OSPF faster, loop-free convergence and lets it use a real cost metric rather than a crude hop count. The trade-off is more memory and CPU to hold the LSDB and run SPF, which is why areas exist — they shrink each router's LSDB.

For the CCNA, connect the concept to behavior: OSPF reacts quickly to a failure because every router already holds the topology and only needs to rerun SPF.

Worked Example: Computing Cumulative Cost

OSPF cost is the sum of the outbound interface costs along the path from the router to the destination. Suppose R1 reaches network X through two Gigabit links (each cost 1 at the default reference) then one FastEthernet link (cost 1). With the default 100 Mbps reference, every hop costs 1, so the total is 3 — and a parallel path crossing three 10 Mbps links would total 30, so R1 picks the first path. The catch: at the default reference, Gigabit and 10-Gigabit links both cost 1, masking the faster path. Raising the reference bandwidth to 10000 makes Gigabit cost 10 and 10-Gigabit cost 1, so SPF can finally prefer the faster medium.

Why the Router ID Must Be Stable

The Router ID identifies a router uniquely in the LSDB and seeds tie-breaks like DR election. If you let it default to the highest interface IP and that interface later goes down, the RID could change and force the whole process to reconverge. That is why best practice — and the recommended exam answer — is to configure a loopback or a manual router-id , giving a value that never disappears with a physical interface.

Loading diagram... OSPF Neighbor Adjacency Formation