CCIE R&S Written Overview: OSPF

OSPF Overview

• Open Shortest Path First

– Open Standards Based Interior Gateway Routing Protocol (IGP)

– RFC 2328 “OSPF Version 2”

• Link-State Protocol

– Uses Dijkstra’s SPF Algorithm

OSPF Features

• “Classless” Protocol

– Supports VLSM And Summarization

• Guarantees Loop-Free Topology

– All routers agree on overall topology

– Uses Dijkstra’s SPF Algorithm to calculate SPT

• Standards Based

– Inter-operability between vendors

• Uses its own transport protocol

– IP protocol 89 (OSPF)

– Uses unicast or multicasts to 224.0.0.5 and 224.0.0.6

• Large Scalability

– Hierarchy through “areas”

– Topology summarization

• Fast Convergence

– Actively Tracks Neighbor Adjacencies

– Event Driven Incremental Updates

• Efficient Updating

– Uses reliable multicast and unicast updates

– Non-OSPF devices do not need to process updates

• Bandwidth Based Cost Metric

– More flexible than static hop count

• Control Plane Security

– Supports clear-text and MD5 based authentication

• Extensible

– Future application support through “opaque” LSAs, e.g. MPLS Traffic Engineering

Forming OSPF Adjacencies

• Like EIGRP, OSPF uses “hello” packets to discover neighbors on OSPF enabled attached links

• Hello packets contain attributes that neighbors must agree on to form “adjacency”

– Not all OSPF neighbors actually form adjacency

• To form adjacency neighbors must agree on…

– Unique Router-ID

– Unique IP Address

– Interface Area-ID

– Hello interval & dead interval

– Interface network address

– Interface MTU

– Network Type

– Authentication

– Stub Flags

– Other optional capabilities

OSPF Network Types

• Network type used to deal with different media characteristics

• OSPF network types control…

– How updates are sent

– Who forms adjacency

– How next-hop is calculated

• OSPF Network Types are…

– Broadcast

– Non-Broadcast

– Point-to-Point

– Point-to-Multipoint

– Point-to-Multipoint Non-Broadcast

– Loopback

OSPF DR & BDR

• Designated Router (DR) used on broadcast and non-broadcast network types to…

– Minimize adjacencies

– Minimize LSA replication

• Backup Designated Router (BDR)

– Used for redundancy of DR

• DROthers

– All other routers on link

– Form full adjacency with DR & BDR

– Stop at 2-Way adjacency with each other

OSPF DR & BDR Election

• Election based on interface priority and Router-ID

– Priority

• 0 – 255

• Higher better

• 0 = never

– Router-ID

• Highest loopback / interface IP

• Can be statically set

• Higher better

• No preemption unlike IS-IS’s DIS

Sending OSPF Updates

• OSPF “flooding procedure” is used to synchronize the database between routers

– Routers in the same area share the same database

– Database is used as an input to SPF algorithm to calculate SPT

• How flooding occurs depends on LSA type

• Different LSAs used to describe different types of routes

– Intra Area

– Inter Area

– External

– NSSA External

OSPF LSA Types

• Type 1 – Router LSA

• Type 2 – Network LSA

• Type 3 – Network Summary LSA

• Type 4 – ASBR Summary LSA

• Type 5 – External LSA

• Type 7 – NSSA External LSA

• Others outside our scope…

– Type 6 – Multicast LSA

– Type 8 – Inter-AS OSPF

– Types 9, 10, & 11 – Opaque LSA

OSPF Path Selection

• OSPF path selection order is fixed as follows…

– (O) Intra Area

– (O IA) Inter Area

– (E1) External Type 1

– (E2) External Type 2

– (N1) NSSA External Type 1

OSPF Route Filtering

• Routers in the same OSPF area must have the same database

– Limits filtering capabilities of routing advertisements

• Filtering can be accomplished…

– Locally from the database to the routing table

• Distribute-list in

– On the ABR

• Summarization

• Stub Areas

• Inter Area (LSA Type 3) filter

OSPF Stub Areas

• Used to filter routes on ABR based on LSA type

– Reduces database size without impacting reachability

• Four types of stub areas…

– Stub

– Totally Stubby

– NSSA

– Totally NSSA

OSPF Virtual Links

• OSPF area 0 must be contiguous

– Breaks in area 0 result in failure of SPF calculation

– Virtual Links can be used to fix these breaks

• Virtual Links are…

– Used to connect area 0 over a non-transit area

– A virtual area 0 adjacency between two ABRs over a non-transit area

• Requirements…

– Non-transit area must have full routing information

– Cannot be a stub area and should not have filtering

OSPF Reconvergence Tuning

• OSPF database calculation & lookup times a function of hardware

– e.g. faster CPU, more memory, faster lookups

• Resource needs can be lowered through…

– Areas for flooding domain segmentation

– Summarization

– Stub areas

• Further optimization through timers

– Hello & dead timers

– Faster neighbor down detection

– Pacing timers

• How long do I wait between updates, retransmits, etc.

– Throttling timers

• How often do I generate LSAs, run SPF, etc.