© 1999, Cisco Systems, Inc. www.cisco.com 8-1 OSPF Overview RFC 2328, 2178, 1583
Jan 12, 2016
© 1999, Cisco Systems, Inc. www.cisco.com 8-1
OSPF Overview
RFC 2328, 2178, 1583
OSPF Overview
RFC 2328, 2178, 1583
• Has fast convergence
• Supports VLSM
• Has no hop count limitation
• Processes updates efficiently
• Selects paths based on bandwidth
What Is OSPF?
OSPF Terminology
Links
TokenRing
OSPF Terminology
Links
TokenRing
Cost=10
Cost=1785Cost=6
OSPF Terminology
Area 1Links
TokenRing
Cost=10
Cost=1785Cost=6
Area 0
OSPF Terminology
Area 1Links
TokenRing
Cost=10
Cost=1785Cost=6
Area 0DR
BDR
OSPF Terminology
Adjacencies Database
Lists Neighbors
Area 1Links
TokenRing
Cost=10
Cost=1785Cost=6
Area 0DR
BDR
OSPF Terminology
Topology Database
Lists All Routes
Area 1Links
TokenRing
Cost=10
Cost=1785Cost=6
Area 0DR
BDR
Adjacencies Database
Lists Neighbors
Area 1Links
TokenRing
Cost=10
Cost=1785Cost=6
Area 0
OSPF Terminology
DR
BDR
RoutingTable
Lists Best Routes
Topology Database
Lists All Routes
Adjacencies Database
Lists Neighbors
© 1999, Cisco Systems, Inc. www.cisco.com 8-10
OSPF Operation within a Single Area
OSPF Operation within a Single Area
Establishing Adjacencies
Hello
A
D E
CB
Hello
afadjfjorqpoeru39547439070713
Router IDHello/Dead IntervalsNeighborsArea-IDRouter PriorityDR IP AddressBDR IP AddressAuthentication PasswordStub Area Flag
* *
* *
Establishing Adjacencies (cont.)
172.68.5.1/24
E0
172.68.5.2/24
E1A BDown State
Establishing Adjacencies (cont.)
172.68.5.1/24
E0
172.68.5.2/24
E1
Router BAdjacencies Database
172.68.5.1/24, int E1
I am router ID 172.68.5.1 and I see no one.
A BDown State
Init State
Establishing Adjacencies (cont.)
172.68.5.1/24
E0
I am router ID 172.68.5.2, and I see 172.68.5.1
172.68.5.2/24
E1
Router BAdjacencies Database
172.68.5.1/24, int E1
I am router ID 172.68.5.1 and I see no one.
A BDown State
Init State
Establishing Adjacencies (cont.)
172.68.5.1/24
E0
I am router ID 172.68.5.2, and I see 172.68.5.1
Router AAdjacencies Database
172.68.5.2/24, int E0
172.68.5.2/24
E1
Router BAdjacencies Database
172.68.5.1/24, int E1
I am router ID 172.68.5.1 and I see no one.
A BDown State
Init State
Two-Way State
• Hellos elect DR and BDR• Each router forms adjacency with DR and BDR
Electing the DR and BDR
DR BDR
• Hello packets exchanged via IP multicast • Router with highest OSPF priority elected
P=1 P=0P=1
Electing the DR and BDR (cont.)
P=3 P=2
Hello
DR BDR
Discovering Routes
E0
172.68.5.1
DRE0
172.68.5.3
No, I will start exchange because I have a higher router ID.
I will start exchange because I have router ID 172.68.5.1.Hello
afadjfjorqpoeru39547439070713
Hello
afadjfjorqpoeru39547439070713
Exstart State
Discovering Routes
E0
172.68.5.1
DRE0
172.68.5.3
No, I will start exchange because I have a higher router ID.
I will start exchange because I have router ID 172.68.5.1.
Here is a summary of my link-state database.
Hello
afadjfjorqpoeru39547439070713
Hello
afadjfjorqpoeru39547439070713
DBD
afadjfjorqpoeru39547439070713
Exstart State
Exchange State
Here is a summary of my link-state database.DBD
afadjfjorqpoeru39547439070713
Discovering Routes (cont.)
E0
172.68.5.1
E0
172.68.5.3
Thanks for the information!LSAck
afadjfjorqpoeru39547439070713
LSAck
afadjfjorqpoeru39547439070713
DR
Discovering Routes (cont.)
E0
172.68.5.1
E0
172.68.5.3
I need the complete entry for network 172.68.6.0/24.
Here is the entry for network 172.68.6.0/24.
Thanks for the information!
LSR
afadjfjorqpoeru39547439070713
LSAck
afadjfjorqpoeru39547439070713
LSU
afadjfjorqpoeru39547439070713
Loading State.
Thanks for the information!LSAck
afadjfjorqpoeru39547439070713
LSAck
afadjfjorqpoeru39547439070713
DR
Discovering Routes (cont.)
E0
172.68.5.1
E0
172.68.5.3
I need the complete entry for network 172.68.6.0/24.
Here is the entry for network 172.68.6.0/24.
Thanks for the information!
LSR
afadjfjorqpoeru39547439070713
LSAck
afadjfjorqpoeru39547439070713
LSU
afadjfjorqpoeru39547439070713
Full State
Loading State.
Thanks for the information!LSAck
afadjfjorqpoeru39547439070713
LSAck
afadjfjorqpoeru39547439070713
DR
Choosing Routes
Routing TableNet Cost Out Interface2.2.2.0 6 TR03.3.3.0 7 TR03.3.3.0 10 E0
TokenRing
Cost=10
Cost=6FDDI
Cost=1A B C
This is the best route to C.
1.1.1.0/24 2.2.2.0/24 3.3.3.0/24
4.4.4.0/24
Maintaining Routing Information
New Routerxx
Link-State Change
LSU1
DR
AB
• New router tells all OSPF DRs on 224.0.0.6
Maintaining Routing Information
New Routerxx
Link-State Change
LSU
LSU
1
2
DR
A B
• New router tells all OSPF DRs on 224.0.0.6
• DR tells others on 224.0.0.5
• New router tells all OSPF DRs on 224.0.0.6
• DR tells others on 224.0.0.5
New Routerxx
Link-State Change
LSU
LSU
LSU
1
2
3
Maintaining Routing Information
DR
A B
• New router tells all OSPF DRs on 224.0.0.6
• DR tells others on 224.0.0.5
Maintaining Routing Information
New Routerxx
Link-State Change
LSU
LSU
LSU
1
2
3
I need to update my routing table.
DR
AB
4
Maintaining Routing Information (cont.)
Is entry inlink-state
database?
No
Run SPF to calculate new routing table
Add to database
Flood LSA
End
LSA
LSU
A
Maintaining Routing Information (cont.)
Is entry inlink-state
database? Yes
No
Run SPF to calculate new routing table
Add to database
Flood LSA
Is seq. # the same?
No
Send LSUwith newer
information to source
EndEnd
LSA
LSU
Is seq. #newer?
No
Maintaining Routing Information (cont.)
Is entry inlink-state
database? Yes
No
Run SPF to calculate new routing table
Add to database
Flood LSA
Is seq. # the same?
Yes
No
Send LSUwith newer
information to source
EndEnd
LSA
LSU
Is seq. #newer?
No
Ignore LSA
Maintaining Routing Information (cont.)
Is entry inlink-state
database? Yes
No
Run SPF to calculate new routing table
Add to database
Flood LSA
Is seq. # the same?
Yes
No
Yes
Send LSUwith newer
information to source
EndEnd
LSA
LSU
Is seq. #newer?
No
A
Ignore LSA
Send LSAckto DR
Go to A
Configuring OSPF on Internal Routers
Can assign network or interface address.
Broadcast Network Point-to-Point Network
E0
10.64.0.1
10.64.0.2
E0
S0
10.2.1.210. 2.1.1
S1A B C
<Output Omitted>interface Ethernet0 ip address 10.64.0.1 255.255.255.0!<Output Omitted>router ospf 1 network 10.0.0.0 0.255.255.255 area 0
<Output Omitted>interface Ethernet0 ip address 10.64.0.2 255.255.255.0!interface Serial0 ip address 10.2.1.2 255.255.255.0<Output Omitted>router ospf 50 network 10.2.1.2 0.0.0.0 area 0 network 10.64.0.2 0.0.0.0 area 0
• Assigns a cost to an outgoing interface• May be required for interoperability• Use default cost between Cisco devices
Cisco Non-Cisco
Traffic
TokenRing
Router(config-if)#
ip ospf cost cost
Configuring Optional Commands (cont.)
© 1999, Cisco Systems, Inc. www.cisco.com 9-34
Creating Multiple OSPF Areas
Creating Multiple OSPF Areas
Issues with Maintaining a Large OSPF Network
OSPF
OSPF
OSPF
OSPF
OSPF
My routing table is too big, I am running low on memory.
The SPF is running toooften for me to route.
I am only receivingLSAs, no data.
Area 0
Area 1 Area 2
Autonomous System
• Consists of areas and autonomous systems
• Minimizes routing update traffic
The Solution: OSPF Hierarchical Routing
OSPF Multiarea Components
Area 0I am a backbone.
Area 2I am a stub.
Area 1I am standard.
Areas Routers LSAs
Internal
ABR
ASBR
Backbone
Type 1
afadjfjorqpoeru39547439070713
Type 2
afadjfjorqpoeru39547439070713
Type 3/4
afadjfjorqpoeru39547439070713
Type 5
afadjfjorqpoeru39547439070713
Types of OSPF Routers
InternalRouters
Area 1 Area 2
ASBR andBackbone
Router
Backbone/InternalRouters
ABR and Backbone
Router
Backbone Area 0
ExternalAS
ABR and Backbone
Router
InternalRouters
Flooding LSUs to Multiple Areas (cont.)
Routing Table
Interarea routes
Intra-area routes
External (non-OSPF routes)
Area 1
Area 1 Area 0
Area 1 RIP
OSPF Area Configuration Example
192.168.15.2
Area 0
Stub Area 2
192.168.14.1 192.168.15.1S0
S0E0
ExternalAS
R4
R3
R3#
interface Ethernet 0ip address 192.168.14.1 255.255.255.0interface Serial 0 ip address 192.168.15.1 255.255.255.252
router ospf 100network 192.168.14.0 0.0.0.255 area 0network 192.168.15.0 0.0.0.255 area 2
R4#
interface Serial 0 ip address 192.168.15.2 255.255.255.252
router ospf 15network 192.168.15.0 0.0.0.255 area 2
Link-State Network Discovery
Routers calculate the shortest path to destinations in parallel
AA BB CC
X YZW
Routing TableRouting Table
WW 00
XX 00
Routing TableRouting Table
XX 00
YY 00
Routing TableRouting Table
YY 00
ZZ 00
E0
S1 S0
S1 S1
E1
E0 S1 S1 S0 S1 E1
Link-State Network Discovery
Routers calculate the shortest path to destinations in parallel
SPF
AA BB CC
X YZ
TopologicalDatabase SPF
TopologicalDatabase SPF
TopologicalDatabase
W
Routing TableRouting Table
WW 00
XX 00
Routing TableRouting Table
XX 00
YY 00
Routing TableRouting Table
YY 00
ZZ 00
E0
S1 S0
S1 S1
E1
E0 S1 S1 S0 S1 E1
Link-State Network Discovery
Routers calculate the shortest path to destinations in parallel
SPF
SPF Tree SPF Tree SPF Tree
AA BB CC
X YZ
TopologicalDatabase
ARouting
Table
ARouting
Table
SPFTopological
Database
BRouting
Table
BRouting
Table
SPFTopological
Database
CRouting
Table
CRouting
Table
W
Routing TableRouting Table
WW 00
XX 00
Routing TableRouting Table
XX 00
YY 00
Routing TableRouting Table
YY 00
ZZ 00
E0
S1 S0
S1 S1
E1
E0 S1 S1 S0 S1 E1
Link-State Topology Changes
Update processes proceed using the same link-state update
Process to update this
routingtable
Process to update this
routingtable
Process to update this
routingtable
Process to update this
routingtable
TopologyTopologychange change
ininlink-link-statestate
updateupdate
Process to update this
routingtable
Process to update this
routingtable
Link-State Concerns
Processing and memory required for link-state routing
SPF
SPF Tree
TopologicalDatabase
ARouting
Table
ARouting
Table
Link-State Concerns
Processing and memory required for link-state routing
Bandwidth consumed for initial link-state “flood”
SPF
SPF Tree
TopologicalDatabase
ARouting
Table
ARouting
Table
Problem: Link-State Updates
Unsynchronized updates, inconsistent path decisions
DD
BB
AACC
Network 1, UnreachableNetwork 1, Unreachable
Network 1, UnreachableNetwork 1, UnreachableNetwork 1goes down
then comes up
X, okX, ok
Slow path update
Problem: Link-State Updates
Unsynchronized updates, inconsistent path decisions
DD
BB
AACC
Network 1, UnreachableNetwork 1, Unreachable Network 1, UnreachableNetwork 1, Unreachable
Network 1, Back Up NowNetwork 1, Back Up Now
Network 1, UnreachableNetwork 1, UnreachableNetwork 1goes down
then comes up
X, okX, ok Fast path updates arrive first
Slow path update arrives lastSlow path update
Which SPF tree touse for routing?
Problem: Link-State Updates
Unsynchronized updates, inconsistent path decisions
DD
BB
AACC
Network 1, UnreachableNetwork 1, Unreachable Network 1, UnreachableNetwork 1, Unreachable
Network 1, Back Up NowNetwork 1, Back Up Now
Network 1, UnreachableNetwork 1, UnreachableNetwork 1goes down
then comes up
X, okX, ok Fast path updates arrive first
Slow path update arrives lastSlow path update
Which SPF tree touse for routing?
Link-State Update Problems
Synchronizing large networks—which network topology updates are correct?
Link-State Update Problems
Synchronizing large networks—which network topology updates are correct?
Router startup—order of start alters the topology learned
Link-State Update Problems
Synchronizing large networks—which network topology updates are correct?
Router startup—order of start alters the topology learned
Partitioned regions—slow updating part separated from fast updating part
Reduce the need for resources– “Dampen” update frequency
– Target link-state updates to multicast
–Use link-state area hierarchy for topology
–Exchange route summaries at area borders
Solution: Link-State Mechanisms
Reduce the need for resources–“Dampen” update frequency
–Target link-state updates to multicast
–Use link-state area hierarchy for topology
–Exchange route summaries at area borders
Coordinate link-state updates–Use time stamps
–Update numbering and counters
–Manage partitioning using an area hierarchy
Solution: Link-State Mechanisms