##
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
| Type | Name | Description |
|---|
| 1 | Router | Neighbors + cost; flooded within the area |
| 2 | Network | From the DR; routers on a segment; within the area |
| 3 | Network Summary | From an ABR; advertised between areas |
| 4 | ASBR Summary | From an ABR; locates an ASBR |
| 5 | External | From an ASBR; routes external to OSPF |
| 7 | NSSA External | ASBR in an NSSA; ABR converts to type 5 |
// network types
| Type | DR? | Hello/Dead | Topology |
|---|
| Broadcast | Yes | 10 / 40 | Any |
| Non-broadcast (NBMA) | Yes | 30 / 120 | Full mesh |
| Point-to-Point | No | 10 / 40 | P2P |
| Point-to-Multipoint | No | 30 / 120 | Any |
// packet types
| Hello | Discover & maintain neighbors |
| DBD | Database Description — LSDB summary |
| LSR | Link-State Request |
| LSU | Link-State Update (carries LSAs) |
| LSAck | Acknowledge an LSU |
// area types
| Standard | Default area type |
| Stub | Type 5 LSAs → default route |
| Totally Stubby | Type 3, 4 & 5 → default route |
| NSSA | Stub with an ASBR; type 7 → type 5 at ABR |
// router types
| Internal | All interfaces in one area |
| Backbone | An interface in area 0 |
| ABR | Connects two or more areas |
| ASBR | Connects 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