ospf1
TRANSCRIPT
Open Shortest Path First(OSPF)
Presenter: Lilian Atieno
Course: ECE 697C (Fall 2002)
Instructor: Professor Linix Gao
Outline Introduction OSPF routing Protocol Overview
– Features– Processing of LSAs and data– OSPF packet Format
Black-box OSPF delay measurements– Testbed setup & Procedure– Actual experimental results
Conclusions
Introduction
OSPF is an internal Gateway Protocol– Determines how routing is done in an AS
Primary Characteristics– I)Protocol is open
• Specifications published in RFC
– ii)It’s a Link-state routing protocol• router broadcasts routing information to other
routers and so each router has complete view of topology
OSPF overview
Protocol overview
Internal details of an AS is invisible to other ASs
Each OSPF router maintains database of its AS topology.
Router builds shortest path tree. Routers obtain forwarding table (FIB)
from the tree. OSPF is a dynamic routing protocol
AS Splitting
OSPF allows AS to be configured into areas– Each area runs its own OSPF link-state routing
algorithm.• Router broadcasts its link state only to area routers
Topology of an area invisible to other areas Adv. of splitting:
– reduction of routing traffic
An OSPF AS Consists of Multiple Areas
Classification of routers
I)Internal routers• only perform intra AS routing
II)Area Border routers• Belong to both area and backbone
III)Backbone routers• Perform routing within the backbone
IV)Boundary routers• Exchange routing info. With routers in other Ass.
Backbone area
One area in the AS is configured to be backbone area.
• Consists of Area boarder routers (ABRs) and other non-ABRs.
• It must be contiguous otherwise virtual links have to be configured to restore connectivity.
• It routes traffic between areas in the AS.
Backbone topology invisible to intra- area routers.
Stub area
It’s one of the enhancements in OSPF protocol.
These are areas configured not be flooded by external advertisements.
All data traffic to external destinations will follow default route
Types of OSPF routing
I)Inter-area routing• Source & destination in different areas
ii)Intra-area routing• Source & destination in same area
OSPF also receives and transmits routes to other Ass through boundary routes.
Inter-area routing
Its like a star configuration• backbone-hub• areas-spokes
How does routers choose ABR for packet exit?
• Each ABR in an area advertise location of AS boundary router.
• Also advertise cost to ABRs in other areas
Router Model
Route Processor (CPU)
FIB
Interface card Interface card
Forwarding
SwitchingFabric
Data packet
Data packet
TopologyView
SPF Calculation
OSPF Process
LSA
LS Ack
LSA
Forwarding
LSA Processing
LSA Flooding
SPF Calculation
FIB Update
LSA ProcessingReceive an LS Update packet
New/duplicate?new
Update link state database
Schedule SPF calc. if reqd.
duplicate
Acknowledge LSA immed.Send LS Ack packet back
Get (next) LSA
Determine which interfaces LAS needs to be flooded out
FIB is updated
Next LSA exist?
LS Update processing over
Bundle LSAs into packet & flood it out
SPF calculation
Types of Link-state Advertisements Router link adv.
• Originated by all routers (flooded per area).• Describes states of the router’s interfaces
Network link adv• Originated by Designated router for multi-
access networks (flooded per area)• Contain list of all routers connected to the
network
Cont’
Summary link adv• Originated by ABRs (flooded per area)• Describe route to dest. Outside the area but in AS• 2 types:
– Type 3 – describe routes to networks
– Type 4 - describe routes to AS boundary routers
AS external adv• Originated by AS boundary routers (flooded in AS)• Describe routes to a dest in another AS
Packet format
Version Number - OSPF used Type - Hello, Database Description, Link-state request etc Packet length - Specifies packet length including the header Router ID - Identifies source of packet Area ID - Identifies area to which the packet belongs Checksum - Checks packet for damage suffered during transit Authentication type - Contains Auth. Type configured in the area Authentication - Contains authentication information
Routing protocol packets
Are given preference over regular data packets
Include:-• Hello• Database Description• Link-state Request• Link-state Update• Link-state Acknowledgement
Hello packet
Used to acquire neighbors– After a router is assured by the lower-layer
protocols that it’s interfaces are functional, it uses hello packet to acquire neighbors
It acts as keepalives– Sent periodically on all interfaces– Let routers know that other routers are
functional
Database Description packet
Type 2 OSPF packet Describe contents of topological
database These packets are exchanged when
adjacency is being initialized
Link-state Request
Are type 3 Packets Requests pieces of topological dbase
from neighbors Are sent when router discovers that part
of its topological database is outdated
Link-state Update
Type 4 Responds to link-state request
– Implement flooding of LSAs Several LSAs may be included in a
packet
Link-state Acknowledgement
Are type 5 It ensures reliability
– It acknowledges the link-state update packets
Packet Authentication
Authentication differs for each area– Autype 0 -No authentication– Autype 1 -Simple password– All others - Reserved for assignment by IANA
Additional authentication on per-interface basis.
• Example: Simple password for area and additional password configured for each network in the area
OSPF Delay Measurements
Why measure OSPF ?– Internal OSPF processing delays impact:-
• speed updates propagate through network• Amount of load on routers• time needed for routing to converge incase of
topology/configuration change
How to measure OSPF
Methods– Black-box - based on external observation– white-box - based on internal
instrumentation Key internal tasks considered in
measuring delays– Processing LSAs, performing SPF
calculations,updating FIB & Flooding LSAs
Black-box protocol measurements
3 techniques enforced in designing expt.– Use of OSPF emulator
• generates OSPF patterns
– Exploit features mandated by OSPF specs• duplicate LSAs must be acknowledged
immediately
– Set config. Parameters to ensure tasks in an order that allow for measurement
Methodology
PC1 Expect script TopTracker
Target router
Emulated topology
•Load emulated topology on target router•Initiate task of interest•Measure the time for task
(Testbed setup)
LSA
Top Tracker- OSPF topology emulatorTarget router-router whose OSPF impl. Is under test
PC2
VLAN1
VLAN2
Experimental Designs
Task Logical Connectivity
LSA Processing
LSA Flooding
SPF Calculation
FIB Update
PCI - target router on VLAN1
PCI - target router on VLAN1 & 2
PCI - target router on VLAN1
PCI - target router on VLAN1 & PC2 acts as pin generator on VLAN1
Measuring Task Time
top bracket event
bottom bracket event
task start time
task finish time
time
1. Use a black-box method to bracket task start and finish times
2. Subtract out intervals that precede and exceed these times
X
B
C
X = A - (B+C)
A
LSA Processing Time
Most complex– OSPF bundles LSAs into LS Update packets
For expt:– Top tracker sends 2 packets back to back
• 1st contain legitimate LSAs (probeLSAs)• 2nd contain duplicate LSA
– Top tracker logs time it sends packet (ts) and the time ack for duplicate LSA it received (tr)
LSA processing calculation
Ack for duplicate LSA arrives(tr)
Duplicate LSA arrives t2’
time
Target RouterTopTracker
Duplicate LSA sent t1’
Probe LSA Sent (ts)
Duplicate LSA processing over t3
• X = t2 - t1 =(tr-ts)-[(tr-t3)+(t3-t2)+(t1-ts)]• Estimate the overhead = [(tr-t3)+(t3-t2)+(t1-ts)]
Probe LSA arrive (t1)
Probe LSAs processing over t2
X
- To estimate overhead Top tracker sends one packet with duplicate and logs transmission and reception time
Cont’ Processing time for the packet depends
on:-– Number of links the LSA describes– The number of interfaces on which The
LSA must later be flooded to– Size of link state database
LSA Flood Time
This is the time target router takes to flood LSA after receiving it
Probe LSA is received (tr)
time
Target RouterTopTracker
Probe LSA Sent (ts)
Probe LSA is flooded out t3
Probe LSA arrive (t1)
Probe LSAs processing over t2
X
Cont’
X = t3 - t1 =(tr-ts)-[(tr-t3)+(t1-ts)] Estimate the overhead = [(tr-t3)+(t1-ts)]
The overhead is the round trip to forward a packet between the 2 Tracker interfaces via target router
Pacing-timer– Controls rate at which packets are transmitted out
an interface
SPF Calculation 2 parameters influence the scheduling of the
calculation• spf-delay-specifies how long OSPF waits between receiving
topology change and starting SPF comp.• spf-hold time-Enforces a lag time between consecutive comps.
Expt:-• Set both parameters to 0• Send a probe LSA whose receipt immediately initiates calc on
the target router• Send duplicate LSA whose role is to bracket the finish time if
SPF calculation.
Methodology for SPF Calculation
Ack for duplicate LSA arrives
Initiator LSA arrives
SPF calculation ends
SPF calculation starts
time
Target RouterTopTracker
Send initiator LSA
Send duplicate LSA
Load desired topology
Send ack for duplicate LSA
• X = A – (B + C + D + E)• Estimate the overhead = B + C + D + E•The overhead is therefore a round trip between tracker and router
A X
C
D
B
E
Estimating the Overhead
Remove SPF calculation from bracketset spf_delay = 60 seconds (very large value)
Ack for duplicate LSA arrives
Initiator LSA arrives
Initiator LSA processing done
Duplicate LSA arrivestime
Target RouterTopTracker
Send initiator LSASend duplicate LSA
Duplicate LSA processing done; send ack
SPF calculation starts
overhead = B + C + D + E.tracker logs sending time of probe and the reception time of ack for duplicate LSA
B
E
C
D
Overhead
Results for Cisco Routers
Similar results for two modelsSPF calculation time is O(n2)
Mean SPF time (Cisco GSR)
0
0.005
0.01
0.015
0.02
0.025
0.03
0 20 40 60 80 100
Number of nodes (n)
Tim
e (s
eco
nd
s)
Mean SPF Time (Cisco 7513)
0
0.005
0.01
0.015
0.02
0.025
0.03
0 20 40 60 80 100
Number of nodes (n)T
ime
(sec
on
ds)
Results for GateD
Black-box over-estimates white-box measurementBlack-box captures the characteristics very well
Mean SPF Time (GateD)
0
0.002
0.004
0.006
0.008
0.01
0.012
0.014
0.016
0.018
0 20 40 60 80 100
Number of nodes (n)
Tim
e (s
eco
nd
s)
Black-box
White-box
FIB Update Time
It’s time it takes to update FIB after it starts SPF calculation
Expt:– PC2 pings a destination addr d
every .01sec– Until FIB updated, all pings are dropped– When change is reflected in FIB, ping
packet is forwarded to PC1
FIB timer
First ping packet reaches(tr)
SPF computation starts t2
time
Target RouterTopTracker (PC1)
Probe LSA Sent (ts)
Ping packet reaches target router t5
• X = t4 - t1 =(tr-ts)-[(tr-t5)+(t5-t4)+(t2-t1)+(t1-ts)]
Probe LSA arrive (t1)
Route to d installed in FIB t4
X
SPF computation ends t3
PC2
ping d
OSPF Task Delays (Cisco)
LSA Processing 100-800 microseconds
LSA flooding30-40 millisecondspacing timer is the determining factor
SPF calculation 100-300 milliseconds
FIB update timeno dependence on the size of the topology1-40 milliseconds
Conclusions
OSPF routing protocol proved to be effective in serving large, heterogeneous internetworksBlack-box methods for estimating OSPF processing delays worked:
LSA processing and floodingSPF calculation and FIB Update
Applied techniques to Cisco GSR and 7513 routers as well as GateDFuture work
develop techniques for other protocols, in particular BGP
Any questions?