Professional Documents
Culture Documents
Introduction To OSPF v2
Introduction To OSPF v2
Introduction to OSPF
Agenda
Basic Elements of OSPF
OSPF in Service Provider Networks
Best Common Practices in OSPF
Network Aggregation
OSPF Command Reference
OSPF
Open Shortest
Path First
Link State or SPF
technology
Developed by the IETFs
OSPF working group (RFC
1247)
Designed for TCP/IP
Fast Convergence
Link-State
Zs Link-state
Qs Link-state
Z
X
Xs Link-state
A
B
C
Q
Z
X
2
13
13
Topology information is
stored in a DB separate
from the routing table
Link-State Routing
Neighbor discovery
Construct a Link State Packet (LSP)
Distribute the LSP
Link State Announcement LSA
Route calculation
If a link fails
Flood new LSPs
All routers recalculate their routing tables
LSA
R1
LSA
Cost = 1
Cost = 1
FDDI
Dual Ring
FDDI
Dual Ring
N3
R2
R3
N1
R1
R4
N4
Cost = 10
N5
Cost = 10
Fast Convergence
Detection plus LSA/SPF
R2
Alternate Path
N1
R1
X
Primary Path
N2
R3
Fast Convergence
Finding a new path
Flood LSAs in the area
Based in acknowledgements
(Ack)
N1
Synchronized topology DB
Each router calculates its routing
table for each destination network
LSA
R1
Uses IP Multicast to
Send/Receive changes
Multi-Access networks
All routers must accept packets sent to the AllSPFRouters
(224.0.0.5) address
All DR and BDR routers must accept packets sent to the
AllDRouters (224.0.0.6) address
OSPF Areas
Group of contiguous
nodes/networks
Per area topology DB
Invisible outside the area
Reduces routing traffic
Area 2
Area 3
Area 0
Backbone Area
Virtual Links
Area 1
Area 4
Router Classification
IR
Area 3
Area 2
ABR/BR
Area 0
ASBR
To another AS
Area 1
IR/BR
Area 2
Area 0
ABR
Area 3
Intra-Area Route
ASBR
To Another AS
Inter-Area Route
External Route
R2
FDDI
Dual Ring
With
Summarization
Without
Network
Summarization
1.A
1.B
1.C
Next Hop
R1
R1
R1
Backbone
Area 0
R1 (ABR)
Area 1
1.A
1.B
1.C
External Routes
Redistributed into OSPF
Flooded without changes throughout the AS
OSPF supports two type of external metrics
Type 1
Type 2 (Default)
OSPF
Redistribute
RIP
IGRP
EIGRP
BGP
etc.
External Routes
Type 1 external metric: metrics are added to
the internal link cost
To N1
External Cost = 1
R1
Cost = 10
R2
Cost = 8
R3
Network Type 1
N1
11
N1
10
Next Hop
R2
R3
Selected
Route
To N1
External Cost = 2
External Routes
Type 2 external metric: metrics are compared
without adding the internal link cost
To N1
External Cost = 1
R1
Cost = 10
R2
To N1
External Cost = 2
Cost = 8
R3
Network Type 2
N1
1
N1
2
Next Hop
R2
R3
Selected Route
Topology/Links-State DB
Protocol Functionality
Bringing up adjacencies
LSA Types
Area Classification
Hello
FDDI
Dual Ring
Hello
Router Priority
Hello Interval
Router dead interval
Network mask
Options: T-bit, E-bit
List of neighbors
Hello
Hello
FDDI
Dual Ring
Hello
Designated
Router
Backup
Designated
Router
131.108.3.3
DR
R1 Router ID = 144.254.3.5
144.254.3.5
R2 Router ID = 131.108.3.3
Neighbor States
2-way
The router sees itself in other Hello packets
DR is selected from neighbors in state 2-way or greater
2-way
DR
BDR
Neighbor States
Full
Routers are fully adjacent
DB is synchronized
Relationship to the DR and
BDR
Full
DR
BDR
DR
BDR
Router LSA
Network LSA
Summary LSA
External LSA
ASBR
Backbone
Area #0
1.A
1.B
1.C
1.D
2.A
2.B
2.C
1.B
External Links
3.B
1.A
Token
Ring
Token
Ring
1.C
1.D
3.A
3.B
3.C
3.D
Token
Ring
2.B
Token
Ring
2.A
2.C
3.A
Token
Ring
Token
Ring
3.C
3.D
External Links
ASBR
Backbone
Area #0
1
2
1.B
3.B
1.A
Token
Ring
Token
Ring
1.C
1.D
Token
Ring
2.B
Token
Ring
2.A
3.A
Token
Ring
Token
Ring
3.C
3.D
External Links
ASBR
2.A
2.B
2.C
3.A
3.B
3.C
3.D
1.B
1.A
1.B
1.C
1.D
2.A
2.B
2.C
Backboen
1.A Area #0
1.B
1.C
1.D
3.A
3.B
3.C
3.D
3.B
1.A
Token
Ring
Token
Ring
1.C
1.D
Token
Ring
2.B
Token
Ring
2.A
2.C
3.A
Token
Ring
Token
Ring
3.C
3.D
External Links
ASBR
Backbone
Area #0
1,2
2,3
1,3
1.B
1.A
Token
Ring
Token
Ring
1.C
3.A
3.B
Token
Ring
2.B
1.D
2.A
Token
Ring
Token
Ring
Token
Ring
3.D
3.C
X.1
External Networks
ASBR
1,2
2,3
1,3
1.B
1.A
Token
Ring
X.1
1.C
3.B
Token
Ring
1.D
2.B
2.A
Token
Ring
X.1
Token
Ring
3.A
X.1
Token
Ring
2.D
Token
Ring
3.C
3.D
2.C
External Networks
X.1
ASBR
1,2
1.A
Token
Ring
X.1
1.C
3.B
Token
Ring
1.D
2.B
2.A
Token
Ring
X.1
2.C
Token
Ring
3.A
X.1
Token
Ring
2.D
3.C
Token
Ring
3.D
External Networks
ASBR
X.1
1,2
Default 2&3
1,3
1.B
1.A
Token
Ring
X.1
1.C
3.B
Token
Ring
1.D
2.B
2.A
Token
Ring
X.1
2.C
Token
Ring
3.A
X.1
Token
Ring
2.D
3.C
Token
Ring
3.D
Not-So-Stubby Area
Capable of importing external routes in a limited
fashion
Type-7 LSAs carry external information within an
NSSA
NSSA border routers translate selected type-7 LSAs
External Networks
into type -5 external network LSAs
ASBR
X.1
1,2
Default 2&3
1,3
1.B
External
Networks
X.2
1.A
Token
Ring
X.1
1.C
3.B
Token
Ring
1.D
2.B
2.A
Token
Ring
Token
Ring
2.D
X.1, X.2
2.C
3.A
Token
Ring
Token
Ring
X.1, X.2
3.C
3.D
Addressing
Area 0
Network 192.117.49.0
Range 255.255.255.0
Area 1
Network 131.108.0.0
Subnets 17-31
Range 255.255.240.0
Area 2
Network 131.108.0.0
Subnets 33-47
Range 255.255.240.0
area 3
Network 131.108.0.0
Subnets 49-63
Range 255.255.240.0
Summary
Scalable OSPF Network Design
Area hierarchy
Stub areas
Contiguous addressing
Route summarization
Backbone area
(0) must exist
All other areas
Area 2
Area 3
must have
connection to
Area 0
Ruteador
backbone
Backbone
Interno
Backbone must Router
be contiguous
Do not partition
Area 4
area (0)
Area 1
Internet
Autonomous
System (AS)
Border Router
OSPF Design
Figure out your addressing first OSPF
and addressing go together
The objective is to maintain a small link-state
DB
Create address hierarchy to match the
network topology
Separate blocks for infrastructure, customer
interfaces, customers, etc.
OSPF Design
Examine the physical topology
Is it meshed or hub-and-spoke (star)
OSPF Design
One SPF per area, flooding done per area
Try not to overload the ABRs
Normal areas
Stub areas
Totally stubby (stub no-summary)
Not so stubby areas (NSSA)
OSPF Design
Redundancy
Dual links out of each area using metrics (cost) for traffic
engineering
Too much redundancy
Dual links to backbone in stub areas must be the same
otherwise sub-optimal routing will result
Too much redundancy in the backbone area without
good summarization will affect convergence in the area
0
ISP Backbone
OC12c
OC48
OC12c
Customer Connections
Not recommended
OSPF Useful
Features
OSPF Router ID
If the loopback interface exists and has an IP
address, that is used as the router ID in routing
protocols - stability!
If the loopback interface does not exist, or has no IP
address, the router ID is the highest IP address
configured danger!
Subcommand to manually set the OSPF router ID :
OSPF Clear/Restart
clear ip ospf [pid] redistribution
<metric>
<metric-type (1 or 2)
<tag>
<subnets>
Interface Sub-Commands