Back to Networking
OSPF Routing
Open Shortest Path First protocol
OSPF Overview
OSPF is a link-state routing protocol commonly used in enterprise networks.
Key Concepts
- * Areas: Hierarchical design with Area 0 as backbone
- * Router ID: Unique identifier (usually loopback IP)
- * Cost: Metric based on interface bandwidth
- * LSA: Link State Advertisements for topology sharing
- * DR/BDR: Designated routers on multi-access networks
Basic Configuration
Cisco IOS Example
! Enable OSPF process router ospf 1 router-id 10.0.0.1 ! Advertise networks into Area 0 network 10.10.10.0 0.0.0.255 area 0 network 10.10.20.0 0.0.0.255 area 0 ! Passive interface (no OSPF hellos) passive-interface GigabitEthernet0/1 ! Default route redistribution default-information originate
Verification Commands
show ip ospf neighbor show ip ospf interface brief show ip route ospf show ip ospf database
Best Practices
- * Use loopbacks for Router ID: Ensures stability
- * Set reference bandwidth:
auto-cost reference-bandwidth 10000for 10G networks - * Use passive-interface default: Only enable OSPF where needed
- * Summarize at area boundaries: Reduce LSA flooding
- * Use authentication: MD5 or SHA for security
- * Document area design: Keep topology diagrams current
Common Issues
- Neighbor stuck in INIT/2-WAY:
Check MTU mismatch, hello/dead timers, area ID
- Routes not appearing:
Verify network statements, check for filtering
- Suboptimal routing:
Review cost settings, check for summarization issues