CCNA NOTES 8 # OSPF Complete Reference Guide for CCNA & CCNP | Areas, LSAs, DR/BDR & Configuration

OSPF Network Protocol Reference Notes

OSPF

PROTOCOL #89  ·  AD = 110
LAYER 3  ·  LINK-STATE
DIJKSTRA / SPF  ·  OPEN STD
OPEN SHORTEST PATH FIRST  —  COMPLETE REFERENCE
01Protocol Overview
Metric
100 / BW
Cost = 100 ÷ Interface BW (Mbps)
Algorithm
SPF
Dijkstra Shortest Path First
Key concept — Routes are never directly advertised. Complete topology data (LSAs) floods the domain. Each router independently runs SPF to calculate its best paths.
InterfaceSpeedDefault Cost
Ethernet10 Mbps10
FastEthernet100 Mbps1
Serial (T1)1.544 Mbps64

02Areas & Router Types
Rule — Area 0 is the backbone and must be central. All non-backbone areas must connect to Area 0, directly or via a Virtual Link. Only one Area 0 per domain.
Router TypeDefinitionGenerates
Backbone RouterAll interfaces in Area 0LSA 1
Non-Backbone RouterAll interfaces in a non-backbone areaLSA 1
ABRInterface in Area 0 + at least one other area. Holds full LSDB of each connected area.LSA 3, 4
ASBRConnects OSPF to an external AS. Redistributes external routes into OSPF.LSA 5

03Process ID & Router ID
Process ID Range
1 – 65535
Locally significant · never advertised
Router ID Format
32-bit
Looks like an IP · unique within area
PriorityRID Election Method
1stManually configured Router ID
2ndHighest Loopback interface IP address
3rdHighest physical interface IP (even if not OSPF-enabled)

04Neighborship Requirements
Same Subnet & MaskSame Area IDUnique Router IDHello/Dead Timers matchMTU matchAuthentication match
TimerBroadcast / P2PNon-Broadcast / Multipoint
Hello Interval10 sec30 sec
Dead Interval40 sec120 sec
Wait Timer40 sec120 sec

05Packet Types & Tables
#TypePurpose
1HelloNeighbor discovery, keepalive, DR/BDR election
2DBDDatabase Description — LSA headers exchanged
3LSRRequest missing or outdated LSA details
4LSUCarries full LSA data in response to LSR
5LSAckConfirms receipt of LSU
Neighbor TableTopology / LSDB TableRouting Table (RIB)

06Neighbor States
Down
Init
2-Way
ExStart
Exchange
Loading
Full ✓
StateWhat happens
DownNo Hellos sent or received. Interface or process is down.
InitHello sent but own RID not yet seen in neighbor's Hello. One-way only.
2-WayOwn RID seen in neighbor's Hello. DR/BDR election occurs here on BMA networks.
ExStartNull DBD exchanged. Master/Slave election — higher RID wins. MTU & sequence negotiated.
ExchangeDBD packets (LSA headers only) exchanged. Both learn what the other has.
LoadingLSRs sent for missing info. Slave responds with LSUs. Acknowledged with LSAck.
Full ✓LSDB fully synchronized. Adjacency established. Wait timer = 40 sec.

07DR & BDR Election
Why elect? Full-mesh adjacency on BMA networks requires n(n−1)/2 adjacencies. DR/BDR reduces this — DROthers form adjacency only with DR & BDR. Election is non-preemptive. Priority 0 = permanently ineligible.
Designated Router
R1
Priority: 100
DR
Backup DR
R2
Priority: 50
BDR
Other
R3
Priority: 1
DROther
224.0.0.5
All OSPF Routers — everyone receives
224.0.0.6
DR and BDR only — DROthers send here
If DR fails → BDR automatically becomes DR, then a new BDR is elected. No DR/BDR on Point-to-Point segments.

08LSA Types
Type 1
Router LSA
Generated byEvery router
ScopeSame area only
LSIDOriginator RID
Type 2
Network LSA
Generated byDR only
ScopeSame area only
LSIDDR interface IP
Type 3
Summary LSA
Generated byABR
ScopeInter-area
LSIDNetwork ID
Type 4
ASBR Summary
Generated byABR
ScopeAreas without ASBR
LSIDASBR Router ID
Type 5
AS-External LSA
Generated byASBR
ScopeAll areas (non-stub)
LSIDExternal Network

09Virtual Link & Redistribution
Virtual Link — A logical tunnel over a transit area to connect a disconnected area to Area 0. Configured between two ABRs using Router IDs. Transit area must be a normal area (not stub).
! Virtual Link — on R2 (ABR: Area 0 ↔ Area 1)
router ospf 1
  area 1 virtual-link <R3-Router-ID>

! Virtual Link — on R3 (ABR: Area 1 ↔ Area 2)
router ospf 1
  area 1 virtual-link <R2-Router-ID>

! Redistribution (on ASBR)
router ospf 1
  redistribute static subnets     ! static → OSPF
  redistribute connected subnets  ! connected → OSPF
Redistributed routes become LSA Type 5. Always use the subnets keyword to include classless (VLSM) networks.

10Configuration & Verification
! Basic OSPF setup
router ospf 1
  router-id 1.1.1.1
  network 192.168.1.0 0.0.0.255 area 0

! Timer tuning
interface fa0/1
  ip ospf hello-interval 20       ! Dead = 4 × Hello
  ip mtu 1400                     ! range: 68 – 1500

! Authentication (plain text)
interface fa0/1
  ip ospf authentication
  ip ospf authentication-key CISCO

! DR Priority
interface fa0/0
  ip ospf priority 100            ! 0 = ineligible
! Verification
show ip protocols
show ip ospf neighbor
show ip ospf database
show ip route
show ip ospf interface
debug ip ospf events              ! live event logs
clear ip ospf process             ! reset: Down → Full

Comments

Popular posts from this blog

Network Topologies

Network Devices

CCNA Notes #01: Computer Networks — Types & Classification (Complete Guide)