OSPF Cheat Sheet
Open Shortest Path First routing protocol guide
Basic Configuration
router ospf [process-id]Enable OSPF routing process
Example:
router ospf 1network [network] [wildcard-mask] area [area-id]Define networks to advertise in OSPF
Example:
network 192.168.1.0 0.0.0.255 area 0router-id [ip-address]Set the router ID
Example:
router-id 1.1.1.1area [area-id] stubConfigure area as stub area
Example:
area 1 stubVerification Commands
show ip ospf neighborDisplay OSPF neighbor information
Example:
show ip ospf neighbor detailshow ip ospf databaseDisplay OSPF link-state database
Example:
show ip ospf database routershow ip route ospfDisplay OSPF routing table
Example:
show ip route ospf 192.168.1.0show ip ospf interfaceDisplay OSPF interface information
Example:
show ip ospf interface briefTroubleshooting Commands
debug ip ospf adjDebug OSPF adjacency events
Example:
debug ip ospf adjclear ip ospf processReset OSPF process
Example:
clear ip ospf processshow ip ospf statisticsDisplay OSPF statistics
Example:
show ip ospf statistics detailNeighbor States
Down
Init
Two-Way
ExStart
Exchange
Loading
Full