Open Shortest Path First Protocol (OSPF) - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

Open Shortest Path First Protocol (OSPF)

Description:

Open Shortest Path First Protocol (OSPF) Author: Anoop George Ninan Last modified by: cape Created Date: 11/12/2000 10:59:33 PM Document presentation format: – PowerPoint PPT presentation

Number of Views:545
Avg rating:3.0/5.0
Slides: 43
Provided by: AnoopGeo
Category:
Tags: ospf | first | open | ospf | path | protocol | shortest

less

Transcript and Presenter's Notes

Title: Open Shortest Path First Protocol (OSPF)


1
Open Shortest Path First Protocol(OSPF)

2
Overview
  • Introduction
  • Motivation
  • OSPF Basics
  • Hierarchical Routing in OSPF
  • Summary

3
Introduction
  • Development began in 1987
  • OSPF Working Group (part of IETF)
  • OSPFv2 first established in 1991
  • Many new features added since then
  • Updated OSPFv2 specification in RFC 2178

4
Motivation
  • Original IGP used was RIP
  • Based on Bellman-Ford Algorithm
  • Worked well in small systems
  • Suffered from problems of Distance Vector
    Protocol
  • Count to Infinity Problem
  • Slow Convergence

5
Motivation
  • Problems with Distance Vector Protocol
  • Large update packets
  • Slow response to topological changes
  • Need for a Link State Protocol
  • A long list of functional requirements follows

6
Functional Requirements of OSPF
  • Faster Convergence and less consumption of
    network resources
  • A more descriptive routing metric
  • configurable
  • value ranges between 1 and 65,535
  • no restriction on network diameters
  • Equal-cost multipath
  • a way to do load balancing

7
Functional Requirements(contd.)
  • Routing Hierarchy
  • support large routing domains
  • Separate internal and external routes
  • Support of flexible subnetting schemes
  • route to arbitrary address,mask combinations
    using VLSMs
  • Security
  • Type of Service Routing

8
OSPF Basicsthe essence
  • Distributed, replicated database model
  • describes complete routing topology
  • Link state advertisements
  • carry local piece of routing topology
  • Distribution of LSAs using reliable flooding
  • Link state database
  • identical for all the routers

9
Link State Advertisements(LSAs)
LS Age
Options
LS Type
Link State ID
Advertising Router
LS Sequence Number
LS Checksum
Length
0
16
LSA Header
10
LSAs contd.
  • Identifying LSAs
  • LS type field
  • Link State ID field
  • mostly carries addressing information
  • e.g. IP address of externally reachable network
  • Advertising Router field
  • originating routers OSPF router ID

11
LSAs contd.
  • Identifying LSA instances
  • needed to update self-originated LSAs
  • LS Sequence Number field
  • 32 bit values
  • monotonically increasing until some max value
  • 600 years to roll over!
  • LSA checksum and LS Age guard against potential
    problems

12
LSAs contd.
  • Verifying LSA contents
  • LS Checksum field
  • computed by the originating router and left
    unchanged thereafter
  • LS age field not included in checksum
  • Removing LSAs from databases
  • LS Age field
  • ranges from 0 to 30 min.
  • Max Age LSAs used to delete outdated LSAs

13
LSAs contd.
  • Other LSA Header fields
  • Options field
  • sometimes used to give special treatment during
    flooding or routing calculations
  • Length field
  • includes LSA header and contents
  • ranges from 20-65535 bytes

14
Sample Router LSA
10.1.1.1
10.1.1.2
10.1.1.4
10.1.1.6
10.1.1.3
10.1.1.5
15
Sample Router LSA contd..
LS Age
0 seconds
Options
LS Type
E-bit,LS Type 1
10.1.1.1
Link State ID
Advertising Router
10.1.1.1
LS Sequence Number
0x80000006
LS Checksum
0x9b47
Length
60 bytes
Router Type
0
0 (ordinary)
of links
3
Link ID
10.1.1.3
Link Data
Ifindex 2 (unnumbered link)
Link 1
Link Type
TOS Metrics
1(point to point), 0
Metric
5
16
Link State Database
  • Collection of all OSPF LSAs
  • databases exchanged between neighbors
  • synchronization thru reliable flooding
  • gives the complete routing topology
  • each OSPF router has identical link-state
    database

17
Link State Database contd..
  • Example of a link state database

LS Type
Link State ID
Adv Router
LS Checksum
LS Seq No
LS Age
Router LSA
10.1.1.1
10.1.1.1
0x9b47
0x80000006
0
..
...
..
..
.
...
18
Communication between OSPF Routers
  • OSPF packets encapsulated in IP packets
  • standard 24 byte header
  • OSPF packet type field
  • OSPF router ID of sender
  • Packet checksum
  • Authentication fields
  • OSPF Area ID

19
Neighbor Discovery and Maintenance
  • OSPF Hello Protocol
  • Hello packets sent out every 10 seconds
  • helps to detect failed neighbors
  • RouterDeadInterval (default 40 seconds)
  • also ensures that link is bidirectional
  • neighboring routers agree on intervals
  • hello interval set so that a link is not
    accidentally brought down

20
Database Synchronization
  • Crucial to ensure correct and loop free routing
  • must be done before 2 neighbors start
    communication
  • also whenever new LSAs are introduced
  • uses reliable flooding
  • each router sends LSA headers to its neighbor
    when connection comes up
  • requests only those LSAs which are recent

21
Database Exchange
  • Neighboring routers first exchange hellos
  • a database description packet packet establishes
    the sequence number
  • the other router sends LSA headers
  • sequence number incremented for every pair od
    database description packets
  • implicit acknowledgement for the previous pair
  • after examining LSA headers explicit request sent
    for complete LSAs

22
Reliable Flooding
  • Starts when a router wants to update
    self-originated LSAs
  • Link State Update packets
  • Neighbor installs more recent LSAs into its
    database
  • floods out on all interfaces except the one on
    which it arrived
  • reliability-retransmissions until acks received

23
Reliable Flooding (contd..)
10.1.1.1
10.1.1.2
10.1.1.4
10.1.1.6
Time T1
u
u
u
10.1.1.3
10.1.1.5
24
Reliable Flooding (contd..)
10.1.1.1
10.1.1.2
10.1.1.4
10.1.1.6
u
u
Time T2
u
u
u
10.1.1.3
10.1.1.5
25
Reliable Flooding (contd..)
10.1.1.1
10.1.1.2
10.1.1.4
10.1.1.6
u
Time T3
u
10.1.1.3
10.1.1.5
26
Reliable Flooding (contd..)
10.1.1.1
10.1.1.2
10.1.1.4
10.1.1.6
Time T3
ack
ack
ack
ack
ack
10.1.1.3
10.1.1.5
27
Reliable Flooding(contd..)
  • Robustness
  • updates flooded over all the links , so failure
    of any link doesnt affect database
    synchronization
  • LSAs refreshed every 30 minutes
  • LSA checksum field detects corruption
  • flooding loops avoided by LS Age field
  • MinLSInterval limits rate of LSA origination
  • Receivers can refuse to accept LSA updates if
    they received an update less than a second ago

28
Routing Calculations
  • Link costs configurable by administrator
  • Smaller values for more preferred links
  • must make sense to add link costs
  • different costs for each link direction possible
  • Dijkstras shortest path algorithm
  • incrementally calculates tree of shortest paths
  • each link in the network examined once
  • computes multiple shortest paths (equal-cost
    multipath)

29
Hierarchical Routing
  • Technique used to build large networks
  • minimizes consumption of network resources such
    as
  • router memory
  • router computing resources
  • link bandwidth
  • with flat routing linear increase in routing
    table size
  • with hierarchical, size increases logarithmically

30
an example
10.3
10.3.3
10.0.0.0/8
10.3.2
10.3.1
10.1.3
10.2.3
10.1
10.2
10.1.1
10.1.2
10.2.2
10.2.1
31
example contd..
  • Consider a router in 10.1.1
  • assume 16 entries in each of the first level
    partitions
  • with flat routing, 916 144 entries/router
  • with 3 level hierarchy, the router has 16 entries
    within 10.1.1.0/24 entries for 10.1.2.0/24,
    10.1.3.0/24,10.1.0.0/16 for a total of 19
    entries.
  • Marked reduction in routing table size
  • but might lead to suboptimal routing

32
OSPF Areas
  • Two-level hierarchical routing scheme through the
    use of areas
  • areas identified by 32-bit id
  • each area has its own link state database which
    is a collection of network-LSAs and router-LSAs
  • areas topology hidden from all other areas
  • interconnection of areas through area border
    routers (ABRs)
  • ABR leaks IP addressing information to other
    areas through summary LSAs

33
Sample Area Configuration
Area 0.0.0.1
10.2.1.0/24
10.2.2.0/24
1
3
1
I
J
3
3
B
C
Area 0.0.0.2
Area 0.0.0.3
10.1.2.0/24
1
1
1
E
G
2
2
1
3
10.3.7.0/24
3
Area 0.0.0.0
1
A
D
A
A
3
10.8.2.0/24
1
10.1.1.0/24
3
H
F
3
1
1
34
OSPF Areas contd..
  • Example of Summary LSA(router B)

LS Age
0
Options
LS Type
0x2, Type 3(summary-LSA)
Link State ID
10.2.0.0
Advertising Router
Router Bs router ID
LS Sequence Number
0x80000001
LS Checksum
Length
28 bytes
Network Mask
255.255.0.0
TOS
TOS 0 (normal)
Metric
Cost of 7
35
OSPF Areas contd..
  • Reduction in link state databases of an area
  • reduction in amount of flooding traffic needed
    for synchronization
  • reduction in the cost of the shortest path
    calculations
  • increased robustness
  • routing protection
  • Hidden prefixes

36
Area Organization
  • All the areas are connected to area 0.0.0.0 also
    called the backbone area
  • need not have a direct physical connection though
  • virtual links provide logical link to backbone
  • summary LSAs tunneled across non backbone areas
  • exchange of routing information between areas
    using Distance Vector Protocol
  • absence of redundant paths between areas
  • not subject to convergence problems

37
Incorporating external routing information
  • Special routers called AS boundary routers at the
    edge of OSPF domain
  • ASBRs originate AS-External LSAs
  • only routes for which the choice of an ASBR makes
    sense are imported
  • otherwise default routes are used
  • AS external LSAs similar to Summary LSAs with 2
    additional fields
  • Forwarding address
  • external route tag

38
Interaction with areas
  • AS-External LSAs flooded across borders
  • ASBR summary LSAs used to know the location of
    the originator of AS-External LSA
  • Link State ID of ASBR Summary LSA set to the OSPF
    router ID of the ASBR whose location is
    advertised
  • similar to summary LSA in all other respects

39
OSPF Area Types
  • Restrict the amount of external routing
    information within an area
  • used when resources especially router memory is
    very limited
  • two types of restricted areas
  • Stub Areas
  • NSSAs or Not-So-Stubby-Areas

40
OSPF Area Types
  • Stub Areas
  • dont support ASBRs and hence no AS-External-LSAs
  • routing to external destinations based on default
    routes originated by the areas border routers
  • summary LSAs also made optional
  • must lie on the edge of OSPF routing domain
  • inter-area routing may also be based on default
    routes
  • improved scaling
  • but not preferred due to the possibility of
    suboptimal routes

41
OSPF Area Types contd..
  • NSSAs
  • import small amount of routing information
  • this information flooded to other areas by the
    NSSA Border router
  • Use Type-7 LSAs to import external routing
    information
  • translated into AS-External-LSA at the NSSA
    Border
  • one-way filter

42
Summary
  • Why OSPF is needed in the Internet?
  • The basics of the protocol
  • The Link state Advertisements
  • Neighbor Discovery (Hello Protocol)
  • Database Synchronization and reliable flooding
  • Hierarchical Routing in OSPF
  • OSPF Areas and Area Organization
  • Interaction with External Routing Information
  • OSPF Area Types viz. Stub Areas and NSSAs
Write a Comment
User Comments (0)
About PowerShow.com