OSPF (Open Shortest Path First): Quick Reference Notes
Quick OSPF notes, made for network professionals seeking insights into key attributes, the link-state routing protocol, and network convergence.
Open Shortest Path First (OSPF)
Basic Information
- Version: v2
- Standard: RFC 2328
- Algorithm: Dijkstra
- Type: IGP – Link – State
- Metric: Cost (Bandwidth)
- Administrative Distance: 110
- Transport: 89
- Authentication: Plaintext, MD5
Packet Types
- Hello Packets
- Database Description
- Link State Request
- Link State Update
- Link State Acknowledge
OSPF Table Types
- Neighbor table
- Topology table
- Routing table
OSPF – Neighbor Adjacency States
- Down – No Hellos have been learned from the neighboring router.
- Init – Hello packet has been learned from the neighbor, but two-way communication has not yet been initialized.
- 2-Way – Bidirectional communication has been built, Designated and Backup Designated Routers are selected at this stage.
- Ex-Start – The routers are planning to share the link-state information. Master/slave relations are established between routers.
- Exchange – The routers are switching Database Descriptors (DBDs), the router will query a neighbor’s DBD to decide if it has data to share.
- Loading – The routers are finally switching Link State Advertisements, including data about all links connected to each router. Routers will share their topology tables.
- Full – The routers are completely synchronized.
Path Selection
- Select the longest match, the most specific route.
- Select the path with the lowest administrative distance.
- Select most preferred route origination within OSPF.
- Select the lowest cumulative cost.
OSPF Session Establishment between peers
- Neighbor discovery
- Link-state information exchange
- Best-path calculation
OSPF Network Types
- Broadcast Multi-Access – OSPF will elect DRs and BDRs
- Point-to-Point – OSPF will not elect DRs and BDRs
- Point-to-Multipoint – OSPF will not elect DRs and BDRs
- Non-broadcast Multi-access Network – OSPF will elect DRs and BDRs
Link-state advertisements (LSAs)
- Router LSA (Type 1)
- Network LSA (Type 2)
- Network Summary LSA (Type 3)
- ASBR Summary LSA (Type 4)
- External LSA (Type 5)
- Multicast OSPF LSA (MOSPF – Type 6)
- NSSA External LSA (Type 7)
OSPF defines two types of external routes
- Type 2 (E2) – Includes only the external cost to the destination Network.
- Type 1 (E1) – Includes both the external cost, and the internal cost.
OSPF Commands of Cisco, Juniper & Alcatel
Cisco OSPF Commands
- show ip ospf database
- show ip ospf interface
- show ip ospf neighbor
- show route ospf
- show ospf statistics
Juniper OSPF Commands
- show ospf database
- show ospf interface
- show ospf neighbor
- show route protocol ospf
- show ospf statistics
Alcatel OSPF Commands
- show router ospf database
- show router ospf interface
- show router ospf neighbor
- show router ospf routes
- show router ospf statistics
Other important OSPF topics
- OSPF Passive-Interfaces
- OSPF Authentication
- OSPF Virtual Links
- OSPF SPF Timers
- Inter-Area OSPF Summarization
- External OSPF Summarization