Configuring OSPF

Download Report

Transcript Configuring OSPF

OSPF Overview
RFC 2328, 2178, 1583
© 1999, Cisco Systems, Inc.
www.cisco.com
8-1
What Is OSPF?
• Has fast convergence
• Supports VLSM
• Has no hop count limitation
• Processes updates efficiently
• Selects paths based on bandwidth
OSPF Terminology
Links
Token
Ring
OSPF Terminology
Links
Cost=10
Cost=1785
Token
Ring
Cost=6
OSPF Terminology
Area 0
Links
Area 1
Cost=1785
Cost=10
Token
Ring
Cost=6
OSPF Terminology
Area 0
Links
Area 1
Cost=1785
DR
Cost=10
Token
Ring
BDR
Cost=6
OSPF Terminology
Area 0
Links
Area 1
DR
Cost=10
Token
Ring
Cost=1785
Adjacencies
Database
Lists Neighbors
BDR
Cost=6
OSPF Terminology
Area 0
Links
Area 1
DR
Cost=10
Token
Ring
Cost=1785
Adjacencies
Database
Lists Neighbors
BDR
Cost=6
Topology
Database
Lists All Routes
OSPF Terminology
Area 0
Links
Area 1
DR
Cost=10
Token
Ring
Cost=1785
Adjacencies
Database
Lists Neighbors
BDR
Cost=6
Topology
Database
Lists All Routes
Routing
Table
Lists Best Routes
OSPF Operation
within a Single Area
© 1999, Cisco Systems, Inc.
www.cisco.com
8-10
Establishing Adjacencies
D
E
Hello
B
A
afadjfjorqpoeru
39547439070713
C
Router ID
Hello/Dead Intervals
Neighbors
Area-ID
Router Priority
DR IP Address
BDR IP Address
Authentication Password
Stub Area Flag
*
*
Hello
*
*
Establishing Adjacencies
(cont.)
A
172.68.5.1/24
E0
172.68.5.2/24
E1
Down State
B
Establishing Adjacencies
(cont.)
A
172.68.5.1/24
E0
172.68.5.2/24
E1
B
Down State
I am router ID 172.68.5.1 and I see no one.
Init State
Router B
Adjacencies Database
172.68.5.1/24, int E1
Establishing Adjacencies
(cont.)
A
172.68.5.1/24
E0
172.68.5.2/24
E1
B
Down State
I am router ID 172.68.5.1 and I see no one.
Init State
Router B
Adjacencies Database
172.68.5.1/24, int E1
I am router ID 172.68.5.2, and I see 172.68.5.1
Establishing Adjacencies
(cont.)
A
172.68.5.1/24
E0
172.68.5.2/24
E1
B
Down State
I am router ID 172.68.5.1 and I see no one.
Init State
Router B
Adjacencies Database
172.68.5.1/24, int E1
I am router ID 172.68.5.2, and I see 172.68.5.1
Router A
Adjacencies Database
172.68.5.2/24, int E0
Two-Way State
Electing the DR and BDR
DR
BDR
• Hellos elect DR and BDR
• Each router forms adjacency with DR and BDR
Electing the DR and BDR
(cont.)
P=3
P=2
DR
BDR
Hello
P=1
P=1
P=0
• Hello packets exchanged via IP multicast
• Router with highest OSPF priority elected
Discovering Routes
DR
E0
E0
172.68.5.1
afadjfjorqpoeru
39547439070713
Hello
172.68.5.3
Exstart State
I will start exchange because I have router ID 172.68.5.1.
No, I will start exchange because I have a
higher router ID.
afadjfjorqpoeru
39547439070713
Hello
Discovering Routes
DR
E0
172.68.5.3
E0
172.68.5.1
afadjfjorqpoeru
39547439070713
Hello
Exstart State
I will start exchange because I have router ID 172.68.5.1.
No, I will start exchange because I have a
higher router ID.
Exchange State
Here is a summary of my link-state database.
afadjfjorqpoeru
39547439070713
Hello
afadjfjorqpoeru
39547439070713
DBD
afadjfjorqpoeru
39547439070713
DBD
Here is a summary of my link-state database.
Discovering Routes (cont.)
DR
E0
172.68.5.1
E0
172.68.5.3
afadjfjorqpoeru
39547439070713
LSAck
afadjfjorqpoeru
39547439070713
Thanks for the information!
LSAck
Discovering Routes (cont.)
DR
E0
172.68.5.1
E0
172.68.5.3
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713
LSAck
Thanks for the information!
LSAck
Loading State.
afadjfjorqpoeru
39547439070713
LSR
I need the complete entry for network 172.68.6.0/24.
afadjfjorqpoeru
39547439070713
Here is the entry for network 172.68.6.0/24.
afadjfjorqpoeru
39547439070713
LSAck Thanks for the information!
LSU
Discovering Routes (cont.)
DR
E0
172.68.5.1
E0
172.68.5.3
afadjfjorqpoeru
39547439070713
afadjfjorqpoeru
39547439070713
LSAck
Thanks for the information!
LSAck
Loading State.
afadjfjorqpoeru
39547439070713
LSR
I need the complete entry for network 172.68.6.0/24.
afadjfjorqpoeru
39547439070713
Here is the entry for network 172.68.6.0/24.
afadjfjorqpoeru
39547439070713
LSAck Thanks for the information!
Full State
LSU
Choosing Routes
1.1.1.0/24
A
Token
Ring
2.2.2.0/24
B
FDDI
Cost=6
3.3.3.0/24
C
Cost=1
Cost=10
4.4.4.0/24
Routing Table
Net
Cost Out Interface
2.2.2.0 6
TR0
3.3.3.0 7
TR0
This is the best route to C.
3.3.3.0 10
E0
Maintaining Routing
Information
Link-State Change
DR
x
1 LSU
A
New Router
B
• New router tells all OSPF DRs on 224.0.0.6
Maintaining Routing
Information
2
Link-State Change
LSU
x
DR
1 LSU
A
B
New Router
• New router tells all OSPF DRs on 224.0.0.6
• DR tells others on 224.0.0.5
Maintaining Routing
Information
2
Link-State Change
LSU
x
DR
1 LSU
A
New Router
B
3
LSU
• New router tells all OSPF DRs on 224.0.0.6
• DR tells others on 224.0.0.5
Maintaining Routing
Information
2
Link-State Change
LSU
DR
4 I need to update
my routing table.
1 LSU
x
A
B
3
LSU
New Router
• New router tells all OSPF DRs on 224.0.0.6
• DR tells others on 224.0.0.5
Maintaining Routing
Information (cont.)
LSU
LSA
Is entry in
link-state
database?
No
A
Add to database
Flood LSA
Run SPF to calculate
new routing table
End
Maintaining Routing
Information (cont.)
LSU
LSA
Is entry in
link-state
database?
No
Add to database
Flood LSA
Run SPF to calculate
new routing table
End
Yes
Is seq. #
the same?
No
Is seq. #
newer?
No
Send LSU
with newer
information to
source
End
Maintaining Routing
Information (cont.)
LSU
LSA
Is entry in
link-state
database?
No
Add to database
Flood LSA
Run SPF to calculate
new routing table
End
Yes
Is seq. #
the same?
No
Is seq. #
newer?
No
Send LSU
with newer
information to
source
End
Ignore LSA
Yes
Maintaining Routing
Information (cont.)
LSU
LSA
Is entry in
link-state
database?
No
A
Add to database
Flood LSA
Run SPF to calculate
new routing table
End
Yes
Is seq. #
the same?
Ignore LSA
Yes
No
Is seq. #
newer?
Yes
Send LSAck
to DR
No
Send LSU
with newer
information to
source
End
Go
to
A
Configuring OSPF on Internal
Routers
Broadcast Network
E0
A
Point-to-Point Network
10.64.0.2
10.64.0.1
E0
S0
B
<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
Can assign network or
interface address.
10.2.1.2
10. 2.1.1
S1
C
<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
Configuring Optional
Commands (cont.)
Traffic
Token
Ring
Cisco
Non-Cisco
Router(config-if)#
ip ospf cost cost
• Assigns a cost to an outgoing interface
• May be required for interoperability
• Use default cost between Cisco devices
Creating Multiple
OSPF Areas
© 1999, Cisco Systems, Inc.
www.cisco.com
9-34
Issues with Maintaining a
Large OSPF Network
OSPF
The SPF is running too
often for me to route.
I am only receiving
LSAs, no data.
OSPF
OSPF
OSPF
OSPF
My routing table is too big,
I am running low on memory.
The Solution: OSPF
Hierarchical Routing
Area 0
Area 1
Area 2
Autonomous System
• Consists of areas and autonomous systems
• Minimizes routing update traffic
OSPF Multiarea Components
Areas
Routers
LSAs
afadjfjorqpoeru
39547439070713
Area 0
I am a backbone.
Internal
Type 1
afadjfjorqpoeru
39547439070713
Type 2
Area 1
I am standard.
ABR
afadjfjorqpoeru
39547439070713
Type 3/4
Area 2
I am a stub.
ASBR
afadjfjorqpoeru
39547439070713
Type 5
Backbone
Types of OSPF Routers
Area 1
Backbone Area 0
Area 2
ABR and
Backbone
Router Backbone/
Internal
Internal
Routers
Routers
Internal
Routers
ASBR and
ABR and
Backbone
Backbone
Router External Router
AS
Flooding LSUs to Multiple
Areas (cont.)
Routing Table
Intra-area
routes
Area 1
Interarea
routes
Area 1
External
(non-OSPF
routes)
Area 1
Area 0
RIP
OSPF Area Configuration
Example
External
AS
192.168.14.1
E0
R3
192.168.15.1
S0
192.168.15.2
S0
Area 0
R4
Stub Area 2
R3#
interface Ethernet 0
ip address 192.168.14.1 255.255.255.0
interface Serial 0
ip address 192.168.15.1 255.255.255.252
router ospf 100
network 192.168.14.0 0.0.0.255 area 0
network 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 15
network 192.168.15.0 0.0.0.255 area 2
Link-State Network Discovery
Y
X
W
A
E0
S1
B
S1
S0
Z
C
S1
E1
Routing Table
Routing Table
Routing Table
W
E0
0
X
S1
0
Y
S1
0
X
S1
0
Y
S0
0
Z
E1
0
Routers calculate the shortest path to destinations in parallel
Link-State Network Discovery
Y
X
W
A
E0
S1
B
S1
S0
Z
C
S1
E1
Routing Table
Routing Table
Routing Table
W
E0
0
X
S1
0
Y
S1
0
X
S1
0
Y
S0
0
Z
E1
0
Topological
Database
SPF
Topological
Database
SPF
Topological
Database
SPF
Routers calculate the shortest path to destinations in parallel
Link-State Network Discovery
Y
X
W
A
E0
S1
B
S1
S0
Z
C
S1
E1
Routing Table
Routing Table
Routing Table
W
E0
0
X
S1
0
Y
S1
0
X
S1
0
Y
S0
0
Z
E1
0
Topological
Database
SPF Tree
SPF
A
Routing
Table
Topological
Database
SPF Tree
SPF
B
Routing
Table
Topological
Database
SPF Tree
SPF
C
Routing
Table
Routers calculate the shortest path to destinations in parallel
Link-State Topology Changes
Process to
update this
routing
table
Topology
change
in
linkstate
update
Process to
update this
routing
table
Process to
update this
routing
table
Update processes proceed using the
same link-state update
Link-State Concerns
Processing and memory
required for link-state
routing
Topological
Database
SPF Tree
SPF
A
Routing
Table
Link-State Concerns
Processing and memory
required for link-state
routing
Topological
Database
SPF Tree
SPF
A
Routing
Table
Bandwidth consumed for
initial link-state “flood”
Problem: Link-State Updates
Slow path update
Network 1, Unreachable
B
C
A
X, ok
Network 1
goes down
then comes up
Network 1, Unreachable
D
Unsynchronized updates, inconsistent path decisions
Problem: Link-State Updates
Slow path update
Network 1, Unreachable
Slow path update arrives last
B
Network 1, Unreachable
Which SPF tree to
use for routing?
C
A
X, ok
Network 1
goes down
then comes up
Fast path updates arrive first
Network 1, Unreachable
D
Network 1, Back Up Now
Unsynchronized updates, inconsistent path decisions
Problem: Link-State Updates
Slow path update
Network 1, Unreachable
Slow path update arrives last
B
Network 1, Unreachable
Which SPF tree to
use for routing?
C
A
X, ok
Network 1
goes down
then comes up
Fast path updates arrive first
Network 1, Unreachable
D
Network 1, Back Up Now
Unsynchronized updates, inconsistent path decisions
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
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
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