OSPF lab practice
Enable single-area OSPFv2, form neighbor adjacencies, read the neighbor and interface tables and confirm learned routes.
7 labs · 11 lessons · 7 commands · 5 projects
OSPF is the link-state routing protocol the CCNA tests in depth. Routers form adjacencies with their neighbors, flood link-state advertisements so every router in an area has the same map, and each runs SPF to find the lowest-cost path.
Most OSPF faults show up as a neighbor that never reaches FULL (mismatched area, subnet, timers, MTU or a passive interface) or a network that is never advertised. The commands below separate those two cases quickly.
Hands-on labs
- OSPF Single-Area Base (Pro)
- Advertising Three Networks Into OSPF (Pro)
- OSPF Passive Interface (Pro)
- OSPF Network Statements Across Two Areas (Pro)
- OSPF Multi-Area Tuning (Pro)
- Running OSPF and Static Routes Together (Pro)
- Advertising a Forgotten Network Into OSPF (Pro)
To practise for free, build the topology in the free Sandbox.
Lessons, in order
- IP Routing & OSPF (3. IP Connectivity, 16 min)
- Dynamic Routing Concepts (3. IP Connectivity, 10 min)
- OSPF Basics & Neighbor States (3. IP Connectivity, 22 min)
- OSPF Configuration & Network Command (3. IP Connectivity, 9 min)
- OSPF Cost Calculation & Tuning (3. IP Connectivity, 12 min)
- Multi-Area OSPF & Default Route Injection (3. IP Connectivity, 9 min)
- Enable OSPF with network statements (3. IP Connectivity, 14 min)
- Separate OSPF adjacency from route advertisement (3. IP Connectivity, 13 min)
- Scale single-area OSPF across three routers (3. IP Connectivity, 14 min)
- Originate a default route into OSPF (3. IP Connectivity, 13 min)
- Assessment: Single-area OSPF (3. IP Connectivity, 13 min)
Commands
- show ip ospf neighbor — Lists every OSPF neighbor with its router ID, priority, adjacency state, dead timer, address and interface.
- show ip ospf interface brief — Lists every OSPF-enabled interface with its process, area, address, cost, DR/BDR state and neighbor count.
- show ip ospf — Shows the OSPF process: router ID, SPF timers, how many areas and interfaces it runs, and how often SPF has run.
- show ip ospf database — Lists the link-state advertisements in this router’s OSPF database, by area and LSA type.
- show ip protocols — Shows each running routing protocol: router ID, networks it is routing for, passive interfaces and information sources.
- show ip route ospf — Shows only the routes learned from OSPF, with their administrative distance, metric and next hop.
- show ip route — Shows the IPv4 routing table: every network the router can reach, how it learned it, and the next hop or exit interface.
Related projects
- Multi-Router OSPF Enterprise — Dunmore Builders' Merchants has four depots, each with its own router, and a ring of links between them. The static routes have been wrong twice this year. Replace them with OSPF.
- Retail Branch OSPF Area 0 with a Passive Customer LAN — A retail chain runs OSPF between its branch and its distribution centre. The customer-facing LAN must be advertised but must never form an OSPF adjacency.
- Manufacturing Plant OSPF with Silent, Authenticated Production Cells — A packaging plant connects two production cells (an HMI station on one, a PLC on the other) to its office network, where the manufacturing execution system (MES) runs. Both routers are addressed; there is no routing, so production cannot report to the MES. The control systems on the cells are intolerant of unexpected multicast, and the OT security policy requires authenticated routing on the plant's one transit link. Run OSPF area 0 between the plant and office routers with fixed router IDs, advertise every cell and the office LAN without sending a single hello onto them, and authenticate the transit adjacency with MD5.
- Multi-Area OSPFv2 Network with Area 0 Backbone & Stub Routing — Build a multi-area OSPFv2 enterprise network with a high-speed Backbone Area 0, Campus Area 1, and totally stubby Branch Area 2 with route summarization.
- University Campus Network — Northmoor University's science campus has three buildings with an access layer each, a routed core, and students, faculty, labs and management to keep apart. Design it so one failed uplink or core switch takes nothing offline.