Practice library / Networking hands-on
Lab · Medium · 75 minutesFree account
OSPF Routing Lab
OSPF areas, DR/BDR election, and route summarisation.
On this page 12 sections
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.
| Feature | Value |
|---|---|
| Protocol type | Link-state (Interior Gateway Protocol) |
| Algorithm | Dijkstra SPF |
| Metric | Cost (100Mbps reference BW / interface BW) |
| Administrative Distance | 110 |
| Transport | IP Protocol 89 (not TCP/UDP) |
| Multicast addresses | 224.0.0.5 (all OSPF), 224.0.0.6 (DR/BDR) |
| Hello interval | 10s (broadcast), 30s (non-broadcast) |
| Dead interval | 4x 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/24Step 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 shutdownSign 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