OSPF Cheat Sheet
Open Shortest Path First routing protocol guide
Basic Configuration
router ospf [process-id]
Enable OSPF routing process
Example:
router ospf 1
network [network] [wildcard-mask] area [area-id]
Define networks to advertise in OSPF
Example:
network 192.168.1.0 0.0.0.255 area 0
router-id [ip-address]
Set the router ID
Example:
router-id 1.1.1.1
area [area-id] stub
Configure area as stub area
Example:
area 1 stub
Verification Commands
show ip ospf neighbor
Display OSPF neighbor information
Example:
show ip ospf neighbor detail
show ip ospf database
Display OSPF link-state database
Example:
show ip ospf database router
show ip route ospf
Display OSPF routing table
Example:
show ip route ospf 192.168.1.0
show ip ospf interface
Display OSPF interface information
Example:
show ip ospf interface brief
Troubleshooting Commands
debug ip ospf adj
Debug OSPF adjacency events
Example:
debug ip ospf adj
clear ip ospf process
Reset OSPF process
Example:
clear ip ospf process
show ip ospf statistics
Display OSPF statistics
Example:
show ip ospf statistics detail
Neighbor States
Down
Init
Two-Way
ExStart
Exchange
Loading
Full