You are on page 1of 52

OSPF

Malin Bornhager
Halmstad University

Session Number
Version 2002-1 © 2002, Svenska-CNAP Halmstad University 1
Objectives

• OSPF Overview
• OSPF Operation
• OSPF Configuration and Verification
• Multiarea OSPF Operation
• Multiarea OSPF Configuration and Verification
• Stub, Totally Stubby, and Not-So-Stubby
Areas
• Virtual Links

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 2


Issues Addressed by OSPF

• Fast convergence
• Supports Variable-Length Subnet Masking
(VLSM)
• Network size, no distance limitations
• Processes updates efficiently
• Selects paths based on bandwidth
• Supports equal-cost multipath
• Grouping of members (area)
Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 3
OSPF Terminology

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 4


OSPF Terminology (Cont.)

• Adjacencies database
– Lists neighbors
• Topological database
– Lists all routes
• Routing table
– Lists best routes

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 5


OSPF Topologies

Broadcast
Multiaccess

Point-to-Point

NBMA X.25
Frame Relay

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 6


OSPF States

• Down
• Init
• Two-way
• ExStart
• Exchange
• Loading
• Full adjacency

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 7


OSPF Packet Types

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 8


The OSPF Hello Protocol

• At Layer 3 of the OSI model, Hello packets are


addressed to the multicast address 224.0.0.5.
This address effectively means all OSPF routers.
• OSPF routers use Hello packets to initiate new
adjacencies and to ensure that adjacent
neighbors have not disappeared.
• Hellos are sent every ten seconds by default on
multiaccess and point-to-point networks.
• On interfaces that connect to NBMA networks,
such as Frame Relay, Hellos are sent every 30
seconds.

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 9


Steps of OSPF Operation

• Step 1: Establish router adjacencies


• Step 2: Elect a DR and a BDR
• Step 3: Discover routes
• Step 4: Select appropriate routes
• Step 5: Maintain routing information

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 10


Step 1: Establish Router Adjacencies
Router ID = highest IP address on router

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 11


Step 2: Elect a DR and a BDR

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 12


Electing the DR and BDR

P=3 P=2

DR BDR

Hello

P=1 P=1 P=0

ƒ Hello packets exchanged via IP multicast


ƒ A lot of Hello packets sent on multiaccess network

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 13


DR and BDR

DR BDR

ƒ Hellos elect DR and BDR to represent segment


ƒ Router with highest ID elected
ƒ Each router then forms adjacency with DR and BDR
Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 14
Point-to-Point Neighborship

ƒ Router dynamically detects its neighboring router


using the Hello protocol
ƒ No election: Adjacency is automatic as soon as the
two routers can communicate
ƒ OSPF packets are always sent as multicast 224.0.0.5

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 15


Step 3: Discover routes

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 16


Step 4: Select Appropriate Routes

SPF algorithm selects the best route

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 17


Choosing Routes

10.1.1.0/24 10.2.2.0/24 10.3.3.0/24


Token
A Ring B FDDI C
Cost=6
Cost=1 Cost=10

Cost=10
10.4.4.0/24

Topology Table
Net Cost Out Interface
10.2.2.0 7 To0
10.3.3.0 17 To0 This is the best route to 10.3.3.0.
10.3.3.0 20 E0

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 18


Step 5: Maintain Routing Information

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 19


Maintaining Routing Information

Link-State Change
DR

1 LSU

x A
B

Router A notifies all OSPF DRs on 224.0.0.6

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 20


Maintaining Routing Information

2
Link-State Change
DR
LSU

1 LSU

x A
B

ƒ Router A notifies all OSPF DRs on 224.0.0.6


ƒ DR notifies others on 224.0.0.5

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 21


Maintaining Routing Information

2
Link-State Change
DR
LSU

1 LSU
3
x A
B
LSU

ƒ Router A notifies all OSPF DRs on 224.0.0.6


ƒ DR notifies others on 224.0.0.5

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 22


Maintaining Routing Information

2
Link-State Change
DR
LSU
4 I need to update
my routing table.
1 LSU
3
x A
B
LSU

ƒ Router A notifies all OSPF DRs on 224.0.0.6


ƒ DR notifies others on 224.0.0.5

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 23


Maintaining Routing Information (cont.)

LSU
Is entry in
LSA link-state
database?

No
Add to database

Send LSAck
to DR

Flood LSA

Run SPF to calculate


new routing table

End
Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 24
Maintaining Routing Information (cont.)

LSU
Is entry in Is seq. #
LSA link-state Ignore LSA
database? the same?
Yes Yes

No
Add to database

Send LSAck
to DR

Flood LSA

Run SPF to calculate


new routing table

End
Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 25
Maintaining Routing Information (cont.)

LSU
Is entry in Is seq. #
LSA link-state Ignore LSA
database? the same?
Yes Yes

No
No
Add to database
Is seq. #
higher?
Send LSAck
to DR No

Flood LSA Send LSU


with newer
Run SPF to calculate information to
new routing table source

End End
Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 26
Maintaining Routing Information (cont.)

LSU
Is entry in Is seq. #
LSA link-state Ignore LSA
database? the same?
Yes Yes

No
No
A Add to database Go
Is seq. #
to
higher? Yes
Send LSAck A
to DR No

Flood LSA Send LSU


with newer
Run SPF to calculate information to
new routing table source

End End
Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 27
Configuring OSPF on Routers Within
a Single Area

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 28


Optional Configuration Commands

For DR/BDR election:


• Configuring a Loopback Address
–Router(config)#interface loopback0
Router(config-if)#ip address
192.168.1.1 255.255.255.255

• Modifying OSPF Router Priority


–RTB(config)#interface e0
RTB(config-if)#ip ospf priority 0

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 29


Monitoring OSPF with show ip ospf
interface command

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 30


Default OSPF Path Costs

Cost = 10^8/bandwidth
Router(config-if)#ip ospf cost number

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 31


The ip ospf message-digest-
key Command Parameters

Router(config-if)#ip ospf message-digest-key key-id md5


[encryption-type] password

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 32


show commands

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 33


debug commands

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 34


Creating Multiple OSPF Areas
• Reduze size of routing table (summarization)
• Smaller topology tables
• All areas need to be connected to Area 0
(backbone)

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 35


OSPF Router Types

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 36


OSPF Area Types

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 37


Updating the Routing Table

• Path calculation order


–Intra-area routes
–Interarea routes
–External destinations

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 38


Configuring OSPF ABRs

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 39


Configuring an ASBR

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 40


Configuring OSPF Route
Summarization
RTA(config)#router ospf 1
RTA(config-router)#summary-address 200.9.0.0 255.255.0.0
RTB(config)#router ospf 1
RTB(config-router)#area 1 range 192.168.16.0 255.255.252.0

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 41


Verifying Multiarea OSPF Operation

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 42


Using Stub and Totally Stubby Areas

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 43


Stub and Totally Stubby Area Criteria

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 44


OSPF Stub Area Configuration
Example

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 45


OSPF Totally Stubby Area
Configuration Example

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 46


NSSA Overview

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 47


Configuring OSPF NSSA

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 48


Verifying OSPF NSSA

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 49


Meeting the Backbone Area
Requirements

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 50


Configuring Virtual Links

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 51


OSPF Virtual Link Configuration
Example

Version 2002-1 © 2002, Svenska-CNAP / Halmstad University. 52

You might also like