Static routing: default, network, host, and floating static routes

Cisco CCNA Preparation · lesson 18 of 36 · 25 min

What Is OSPF?

OSPF (Open Shortest Path First) is a link-state routing protocol that uses Dijkstra’s Shortest Path First algorithm to calculate the best path to every network. It is the most commonly tested dynamic routing protocol on the CCNA exam.

Key characteristics: open standard (RFC 2328), classless, fast convergence, uses cost as its metric, supports VLSM and CIDR, scales well in large networks.

OSPF Key Concepts

OSPF Neighbor States

Goal state

OSPF neighbors should reach Full state. On multi-access networks, non-DR/BDR routers reach 2-Way with each other (not Full) — this is normal.

OSPF Configuration

Wildcard mask

OSPF uses wildcard masks (inverse of subnet mask) in the network statement. /24 = 255.255.255.0 subnet mask = 0.0.0.255 wildcard. Subtract each octet from 255.

Flashcard Drill

OSPF cost 100 Mbps / interface bandwidth. Lower cost = preferred path. FastEthernet = 1, GigabitEthernet = 1 (adjust reference bandwidth). Router ID Unique OSPF identifier — highest loopback IP, or manually set with router-id command. LSDB Link State Database — identical on all routers in an area; used to run SPF. Full state OSPF adjacency fully formed — routers have identical LSDBs. Area 0 OSPF backbone area — all other areas must connect to Area 0. DR Designated Router — elected on multi-access networks to reduce LSA flooding. Hello interval Default 10 seconds — routers send hellos to discover and maintain neighbors. Dead interval Default 40 seconds — neighbor declared dead if no hello received. Wildcard mask Inverse of subnet mask — used in OSPF network statements. /24 = 0.0.0.255. passive-interface Stops OSPF hellos on an interface — network is still advertised but no neighbors form.

Knowledge Check

OSPF — 10 Questions

What metric does OSPF use?

  • Hop count
  • Bandwidth
  • Cost (100 Mbps / bandwidth)
  • Delay

Answer: Cost (100 Mbps / bandwidth)
OSPF cost = 100 Mbps / interface bandwidth. Lower cost = better path.

Which OSPF neighbor state indicates a fully formed adjacency with identical LSDBs?

  • 2-Way
  • Exchange
  • Loading
  • Full

Answer: Full
Full state means the adjacency is complete and both routers have identical LSDBs.

The OSPF backbone area is Area _____.

Answer: 0
Area 0 is the OSPF backbone — all other areas must connect to it.

What is the wildcard mask for a /24 network?

  • 255.255.255.0
  • 0.0.0.255
  • 255.255.255.255
  • 0.0.0.0

Answer: 0.0.0.255
Wildcard mask = inverse of subnet mask. /24 = 255.255.255.0 → wildcard = 0.0.0.255.

Which command verifies OSPF neighbor relationships?

  • show ip route
  • show ip ospf neighbor
  • show interfaces
  • show ip ospf database

Answer: show ip ospf neighbor
show ip ospf neighbor shows all OSPF neighbors and their current state.

The OSPF process ID must match on all routers for adjacency to form.

  • True
  • False

Answer: False
The OSPF process ID is locally significant — it does not need to match between routers.

What is the default OSPF hello interval on broadcast networks?

  • 5 seconds
  • 10 seconds
  • 30 seconds
  • 40 seconds

Answer: 10 seconds
Default hello interval is 10 seconds on broadcast and point-to-point networks.

The passive-interface command on an OSPF interface:

  • Shuts down the interface
  • Stops OSPF hellos but still advertises the network
  • Removes the interface from OSPF
  • Increases the cost
  • Answer: Stops OSPF hellos but still advertises the network

passive-interface prevents hello packets (no neighbors form) but the network is still included in OSPF advertisements.

On a multi-access network, non-DR/BDR routers reach which state with each other?

  • Full
  • Loading
  • 2-Way
  • Exchange

Answer: 2-Way
2-Way is normal between non-DR/BDR routers on multi-access networks — Full is only with DR/BDR.

OSPF uses _____ algorithm to calculate the shortest path.

Answer: Dijkstra’s
OSPF uses Dijkstra’s Shortest Path First (SPF) algorithm to calculate loop-free paths.


Previous lesson: Routing table components: prefix, mask, next hop, AD, metric, gateway of last resort
Back to Cisco CCNA Preparation
Next lesson: Administrative distance and route selection: which route wins and why