01 · single area

Single Area OSPF Visualization

Three routers in area 0 on a shared 10.0.0.0/24 segment, with a slow serial link as a backup between R1 and R3. Adjust the interface priorities to move the DR and BDR, change the segment and serial speeds to recompute every cost, and step through the adjacency states to watch the databases synchronize. The link-state database and the routing table below update with each change.

AREA 0backbonecost 1cost 1cost 1cost 64Serial T1cost 1cost 1R11.1.1.1R22.2.2.2BDRR33.3.3.3DR10.0.0.0/24Broadcast10.1.10.0/24stub10.1.30.0/24stub
Dashed ring marks the viewpoint router (R1) — click any router to change it. Highlighted cables are that router's shortest-path tree.
  • in the SPF tree
  • known but not used
  • DR
  • BDR

DR

R3

BDR

R2

Hello / dead

10s / 40s

Segment cost

1

Adjacency state machine

Neighbors are not routes. Nothing is installed until both sides say Full.

7 / 7 · Full · packet LSAck

Databases identical. SPF runs and routes are installed.

R2# show ip ospf neighbors
Neighbor ID     Pri   State           Dead Time   Address       Interface
1.1.1.1           1     FULL/DROTHER   00:00:33   10.0.0.1      1/1/1
3.3.3.3           1     FULL/BDR    00:00:33   10.0.0.3      1/1/1

Link-state database · area 0

Identical on all three routers. Only the SPF run afterwards differs.

TypeLS IDAdv routerSeqAgeContents
1 · Router1.1.1.11.1.1.10x80000133410stransit 10.0.0.0/24 cost 1 · serial to R3 cost 64 · stub 10.1.10.0/24 cost 1
1 · Router2.2.2.22.2.2.20x80000134411stransit 10.0.0.0/24 cost 1
1 · Router3.3.3.33.3.3.30x80000135412stransit 10.0.0.0/24 cost 1 · serial to R1 cost 64 · stub 10.1.30.0/24 cost 1
2 · Network10.0.0.13.3.3.30x80000117994sDR R3 lists R1, R2, R3 attached · mask /24

Slide sideways to see the whole table.

Routing table · R1

Every entry here is intra-area, so the code is a plain O.

PrefixCodeCostNext hopWhy
10.0.0.0/24O1connectedR1 → lan
10.1.10.0/24O1connectedR1 → s1
10.1.30.0/24O2R3R1 → R3 → s3

Slide sideways to see the whole table.

What to draw attention to

Key point

Set every priority to 1 and the DR is R3 — highest router ID wins the tie. Then raise R1 to 200 and nothing moves: OSPF elections are not pre-emptive. Clear the process and R1 takes over.

Set R3's priority to 0 and it becomes permanently DROTHER, even though its router ID is the highest on the wire.

Drop the shared segment to 10 Mb and watch the serial backup become competitive: cost is bandwidth, and OSPF does not care that one link is a single hop.

R1(config)# router ospf 1
R1(config-ospf-1)#   router-id 1.1.1.1
R1(config-ospf-1)#   area 0
R1(config)# interface 1/1/1
R1(config-if)#   ip address 10.0.0.1/24
R1(config-if)#   ip ospf 1 area 0
R1(config-if)#   ip ospf priority 1
R1(config-if)#   ip ospf hello-interval 10