Professional Documents
Culture Documents
Introduction To OSPF
Introduction To OSPF
ISP/IXP Workshops
Session Number
Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1
OSPF
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 2
Link State
A Q 2
B Z 13
Q Y
C X 13
Topology Information Is
X Kept in a Database
X’s Link State Separate from the
Routing Table
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 3
Link State Routing
• Neighbour discovery
• Constructing a Link State Packet (LSP)
• Distribute the LSP
(Link State Announcement – LSA)
• Compute routes
• On network failure
New LSPs flooded
All routers recompute routing tables
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 4
Low Bandwidth Utilisation
LSA
X R1
LSA
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 5
Fast Convergence
Alternate Path R2
N1
R1 X R3
N2
Primary Path
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 6
Fast Convergence
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 7
IP Multicast for Sending/Receiving Updates
• Broadcast networks
All routers must accept packets sent to AllSPFRouters
(224.0.0.5)
All DR and BDR routers must accept packets sent to
AllDRouters (224.0.0.6)
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 8
OSPF Areas
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 9
Classification of Routers
R1 IR R2
IR
Area 2 Area 3
Rc Rb
ABR/BR
Area 0
Rd Ra
IR/BR
ASBR • Internal Router (IR)
R5 R4
To other AS • Area Border Router (ABR)
Area 1 • Backbone Router (BR)
R3
• Autonomous System
Border Router (ASBR)
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 10
OSPF Route Types
R1 IR R2
IR
Area 2 Area 3
Rc Rb
ABR/BR
Area 0
Rd Ra • Intra-area Route
ASBR all routes inside an area
R5 R4 • Inter-area Route
To other AS
routes advertised from one area to
another by an Area Border Router
Area 1
R3
• External Route
routes imported into OSPF from other
protocol or static routes
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 11
Inter-Area Route Summarisation
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 12
External Routes
RIP
IGRP
EIGRP
OSPF BGP
R2
etc.
Redistribute
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 13
External Routes
to N1
Cost = 10 External Cost = 1
R2
R1
to N1
Cost = 8 R3 External Cost = 2
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 14
External Routes
to N1
Cost = 10 External Cost = 1
R2
R1
to N1
Cost = 8 R3 External Cost = 2
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 15
Topology/Link State Database
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 16
Protocol Functionality
• Bringing up adjacencies
• LSA types
• Area classification
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 17
The Hello Protocol
Hello
FDDI
Dual Ring
Hello Hello
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 18
The Hello Packet
Hello
• Router priority
• Hello interval FDDI
Dual Ring
• Router dead interval Hello Hello
• Network mask
• Options: T-bit, E-bit
• List of neighbours
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 19
Designated Router
Backup
Designated Designated
Router Router
Designated Backup
Router Designated Router
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 20
Designated Router by Priority
131.108.3.2 131.108.3.3
R1 DR R2
144.254.3.5
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 21
Neighbouring States
• Full
Routers are fully adjacent
Databases synchronised
Relationship to DR and BDR
Full
DR BDR
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 22
Neighbouring States
• 2-way
Router sees itself in other Hello packets
DR selected from neighbours in state 2-way or greater
2-way
DR BDR
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 23
When to Become Adjacent
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 24
LSAs Propagate Along Adjacencies
DR BDR
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 25
Routing Protocol Packets
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 26
Different Types of LSAs
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 27
Router LSA (Type 1)
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 28
Network LSA (Type 2)
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 29
Summary LSA (Type 3 and 4)
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 30
External LSA (Type 5 and 7)
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 31
No Summarisation
• Specific Link LSA advertised out of each area
• Link state changes propagated out of each area
ASBR
External
1.A links
1.B
1.C 3.A
1.D 3.B
Area 0 3.C
2.A 3.D
2.B
2.C
2.D
1.B 3.B
1.A 3.A
2.B
1.C 1.D 2.A 3.C 3.D
2.C 2.D
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 32
With Summarisation
• Only summary LSA advertised out of each area
• Link state changes do not propagate out of the area
ASBR
External
links
1 3
Area 0
2
1.B 3.B
1.A 3.A
2.B
1.C 1.D 2.A 3.C 3.D
2.C 2.D
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 33
No Summarisation
• Specific Link LSA advertised in to each area
• Link state changes propagated in to each area
ASBR
External
2.A 2.B links
2.C 2.D
3.A 3.B 1.A 1.B
3.C 3.D 1.C 1.D
Area 0 2.A 2.B
1.A 1.B 2.C 2.D
1.C 1.D
3.A 3.B
3.C 3.D
1.B 3.B
1.A 3.A
2.B
1.C 1.D 2.A 3.C 3.D
2.C 2.D
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 34
With Summarisation
• Only summary link LSA advertised in to each area
• Link state changes do not propagate in to each area
ASBR
External
links
2 1
3 2
Area 0
1
3
1.B 3.B
1.A 3.A
2.B
1.C 1.D 2.A 3.C 3.D
2.C 2.D
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 35
Types of Areas
• Regular
• Stub
• Totally Stubby
• Not-So-Stubby
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 36
Regular Area (Not a Stub)
• From Area 1’s point of view, summary networks from other areas are
injected as are external networks such as X.1
ASBR
X.1 External
networks
X.1
2 1
3 2 X.1
Area 0
X.1
1
3
2.B
1.D X.1 2.A 3.D
1.C 3.C
2.C 2.D
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 37
Normal Stub Area
• Summary networks, default route injected
• Command is area x stub
ASBR
X.1 External
networks
Default
2 1
3 2 Default
Area 0
Default
1
3
2.B
1.D X.1 2.A 3.D
1.C 3.C
2.C 2.D
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 38
Totally Stubby Area
• Only a default route injected
Default path to closest area border router
• Command is area x stub no-summary
ASBR
X.1 External
networks
1
Totally Default 2 Default
Stubby Area Area 0
Default
1
3
2.B
1.D X.1 2.A 3.D
1.C 3.C
2.C 2.D
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 39
Not-So-Stubby Area
• Capable of importing routes in a limited fashion
• Type-7 LSA’s carry external information within an NSSA
• NSSA Border routers translate selected type-7 LSAs into type-5 external network
LSAs ASBR
X.1 External
networks
1
Not-So- Default 2 Default
Stubby Area Area 0 X.2
Default
X.2 1
3 X.2
X.2
X.1 1.B 3.B
1.A X.1 3.A
X.2 2.B
1.D X.1 2.A 3.D
1.C 3.C
External
networks
2.C 2.D
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 40
Addressing for Areas
Area 0
network 192.117.49.0
range 255.255.255.0
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 41
Summary
Cisco ISP Workshops © 2006 Cisco Systems, Inc. All rights reserved. 42
Introduction to OSPF
ISP/IXP Workshops
Session Number
Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. Cisco Confidential 43