~/netref / OSPF
##

OSPF

Link-state IGP, Dijkstra SPF, AD 110, IP protocol 89. Cost = 100,000 Kbps ÷ link speed.

// neighbor adjacency states

1 Down
2 Attempt
3 Init
4 2-Way
5 Exstart
6 Exchange
7 Loading
8 Full
// LSA types
TypeNameDescription
1RouterNeighbors + cost; flooded within the area
2NetworkFrom the DR; routers on a segment; within the area
3Network SummaryFrom an ABR; advertised between areas
4ASBR SummaryFrom an ABR; locates an ASBR
5ExternalFrom an ASBR; routes external to OSPF
7NSSA ExternalASBR in an NSSA; ABR converts to type 5
// network types
TypeDR?Hello/DeadTopology
BroadcastYes10 / 40Any
Non-broadcast (NBMA)Yes30 / 120Full mesh
Point-to-PointNo10 / 40P2P
Point-to-MultipointNo30 / 120Any
// packet types
HelloDiscover & maintain neighbors
DBDDatabase Description — LSDB summary
LSRLink-State Request
LSULink-State Update (carries LSAs)
LSAckAcknowledge an LSU
// area types
StandardDefault area type
StubType 5 LSAs → default route
Totally StubbyType 3, 4 & 5 → default route
NSSAStub with an ASBR; type 7 → type 5 at ABR
// router types
InternalAll interfaces in one area
BackboneAn interface in area 0
ABRConnects two or more areas
ASBRConnects to other routing domains

// facts

  • Cost = 100,000 Kbps ÷ link speed (reference bandwidth tunable)
  • AllSPFRouters 224.0.0.5 · AllDRouters 224.0.0.6 · IP proto 89
  • DR/BDR priority 0–255 (default 1); 0 never elected; no preemption
  • External E1 = ASBR cost + external · E2 (default) = external only
  • Auth: plaintext or MD5 · AD 110 · standard RFC 2328
configuration · cisco ios
router ospf 100
 router-id 1.1.1.1
 network 192.168.0.0 0.0.0.255 area 0
 network 10.0.0.0 0.0.0.3 area 0
 area 1 stub
 passive-interface default
!
interface GigabitEthernet0/0
 ip ospf 100 area 0
 ip ospf priority 100
 ip ospf authentication message-digest
 ip ospf message-digest-key 1 md5 S3cret
verify
show ip ospf neighbor
show ip ospf interface brief
show ip ospf database
show ip route ospf