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.
- 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.
| Type | LS ID | Adv router | Seq | Age | Contents |
|---|---|---|---|---|---|
| 1 · Router | 1.1.1.1 | 1.1.1.1 | 0x80000133 | 410s | transit 10.0.0.0/24 cost 1 · serial to R3 cost 64 · stub 10.1.10.0/24 cost 1 |
| 1 · Router | 2.2.2.2 | 2.2.2.2 | 0x80000134 | 411s | transit 10.0.0.0/24 cost 1 |
| 1 · Router | 3.3.3.3 | 3.3.3.3 | 0x80000135 | 412s | transit 10.0.0.0/24 cost 1 · serial to R1 cost 64 · stub 10.1.30.0/24 cost 1 |
| 2 · Network | 10.0.0.1 | 3.3.3.3 | 0x80000117 | 994s | DR 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.
| Prefix | Code | Cost | Next hop | Why |
|---|---|---|---|---|
| 10.0.0.0/24 | O | 1 | connected | R1 → lan |
| 10.1.10.0/24 | O | 1 | connected | R1 → s1 |
| 10.1.30.0/24 | O | 2 | R3 | R1 → 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