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

  1. Version: v2
  2. Standard: RFC 2328
  3. Algorithm: Dijkstra
  4. Type: IGP – Link – State
  5. Metric: Cost (Bandwidth)
  6. Administrative Distance: 110
  7. Transport: 89
  8. Authentication: Plaintext, MD5

 

Packet Types

  1. Hello Packets
  2. Database Description
  3. Link State Request
  4. Link State Update
  5. Link State Acknowledge
 

OSPF Table Types

  1. Neighbor table
  2. Topology table
  3. Routing table
 

OSPF – Neighbor Adjacency States

  1. Down – No Hellos have been learned from the neighboring router.
  2. Init – Hello packet has been learned from the neighbor, but two-way communication has not yet been initialized.
  3. 2-Way – Bidirectional communication has been built, Designated and Backup Designated Routers are selected at this stage.
  4. Ex-Start – The routers are planning to share the link-state information. Master/slave relations are established between routers.
  5. Exchange – The routers are switching Database Descriptors (DBDs), the router will query a neighbor’s DBD to decide if it has data to share.
  6. Loading – The routers are finally switching Link State Advertisements, including data about all links connected to each router. Routers will share their topology tables.
  7. Full – The routers are completely synchronized.
 

Path Selection

  1. Select the longest match, the most specific route.
  2. Select the path with the lowest administrative distance.
  3. Select most preferred route origination within OSPF.
  4. Select the lowest cumulative cost.
 

OSPF Session Establishment between peers

  1. Neighbor discovery
  2. Link-state information exchange
  3. Best-path calculation

 

OSPF Network Types

  1. Broadcast Multi-Access – OSPF will elect DRs and BDRs
  2. Point-to-Point – OSPF will not elect DRs and BDRs
  3. Point-to-Multipoint – OSPF will not elect DRs and BDRs
  4. Non-broadcast Multi-access Network – OSPF will elect DRs and BDRs

 

Link-state advertisements (LSAs)

  1. Router LSA (Type 1)
  2. Network LSA (Type 2)
  3. Network Summary LSA (Type 3)
  4. ASBR Summary LSA (Type 4)
  5. External LSA (Type 5)
  6. Multicast OSPF LSA (MOSPF – Type 6)
  7. NSSA External LSA (Type 7)

 

OSPF defines two types of external routes

  1. Type 2 (E2) – Includes only the external cost to the destination Network.
  2. Type 1 (E1) – Includes both the external cost, and the internal cost.

 

OSPF Commands of Cisco, Juniper & Alcatel

 

Cisco OSPF Commands

  1. show ip ospf database
  2. show ip ospf interface
  3. show ip ospf neighbor
  4. show route ospf
  5. show ospf statistics

 

Juniper OSPF Commands

  1. show ospf database
  2. show ospf interface
  3. show ospf neighbor
  4. show route protocol ospf
  5. show ospf statistics

 

Alcatel OSPF Commands

  1. show router ospf database
  2. show router ospf interface
  3. show router ospf neighbor
  4. show router ospf routes
  5. show router ospf statistics

 

Other important OSPF topics

  1. OSPF Passive-Interfaces
  2. OSPF Authentication
  3. OSPF Virtual Links
  4. OSPF SPF Timers
  5. Inter-Area OSPF Summarization
  6. External OSPF Summarization