Courses3 levels
Level 1 · Foundations11 courses
Level 2 · Core5 courses
Level 3 · Advanced5 courses
Labs8 topics
Library Practice exams AI Range Pricing Start free

Practice library / Networking hands-on

Lab · Medium · 75 minutesFree account

OSPF Routing Lab

OSPF areas, DR/BDR election, and route summarisation.

  • ospf
  • routing
  • cisco-ios
  • packet-tracer
  • ccna
On this page 12 sections
  1. ·OSPF Overview
  2. 1Lab Topology
  3. 2Interface Configuration
  4. Locked: Enable OSPF
  5. Locked: Router ID
  6. Locked: Verify Neighbours
  7. Locked: DR/BDR Election
  8. Locked: OSPF Cost
  9. Locked: Multi-Area OSPF
  10. Locked: Passive Interfaces
  11. Locked: Troubleshooting
  12. Locked: OSPF Command Reference

Before you start

OSPF is the link-state protocol most enterprise networks still rely on, and a bad adjacency, a wrong area design or a weak authentication key can split the network or expose routes to anyone on the segment. Engineers who tune OSPF confidently also spot the misconfigurations attackers abuse. Configure neighbours, elect a DR and BDR, set costs, and split a topology across areas with ABRs.

Lab Objectives

  • Understand OSPF operation: LSAs, SPF algorithm, link-state database
  • Configure OSPF on multiple routers and verify neighbour adjacency
  • Set router IDs manually using loopback interfaces
  • Understand and influence DR/BDR election on multi-access networks
  • Adjust OSPF cost to control path selection
  • Configure multi-area OSPF with ABRs

OSPF Overview

OSPF (Open Shortest Path First) is a link-state routing protocol standardised as RFC 2328. Each router builds a complete map of the network topology by exchanging LSAs (Link State Advertisements), then runs Dijkstra's SPF algorithm to find the shortest path to every destination.

FeatureValue
Protocol typeLink-state (Interior Gateway Protocol)
AlgorithmDijkstra SPF
MetricCost (100Mbps reference BW / interface BW)
Administrative Distance110
TransportIP Protocol 89 (not TCP/UDP)
Multicast addresses224.0.0.5 (all OSPF), 224.0.0.6 (DR/BDR)
Hello interval10s (broadcast), 30s (non-broadcast)
Dead interval4x Hello (40s / 120s)

Step 1: Lab Topology

        .1          .2
R1 ----[eth0/1]---[eth0/1]---- R2
10.0.12.0/30              10.0.23.0/30
                       .1          .2
              R2 ----[eth0/2]---[eth0/2]---- R3

Loopbacks:
R1: 1.1.1.1/32
R2: 2.2.2.2/32
R3: 3.3.3.3/32

LANs:
R1: 192.168.1.0/24
R3: 192.168.3.0/24

Step 2: Interface Configuration

! R1
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
interface GigabitEthernet0/1
 ip address 10.0.12.1 255.255.255.252
 no shutdown
interface GigabitEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 no shutdown

! R2
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
interface GigabitEthernet0/1
 ip address 10.0.12.2 255.255.255.252
 no shutdown
interface GigabitEthernet0/2
 ip address 10.0.23.1 255.255.255.252
 no shutdown

! R3
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
interface GigabitEthernet0/2
 ip address 10.0.23.2 255.255.255.252
 no shutdown
interface GigabitEthernet0/0
 ip address 192.168.3.1 255.255.255.0
 no shutdown

Sign in to continue

9 more sections are for signed-in members. It is free: sign in with Google.

Related

This lab is extra practice for the course Networking hands-on. Do the lessons first.Open the course