OSPF [Compatibility Mode]
OSPF [Compatibility Mode]
• Introduction
Open Shortest Path First Protocol • Motivation
(OSPF) • OSPF Basics
• Hierarchical Routing in OSPF
Link State Routing • Summary
Introduction Motivation
• Original IGP used was RIP
• Development began in 1987 • Based on Bellman-Ford Algorithm
• OSPF Working Group (part of IETF) • Worked well in small systems
• OSPFv2 first established in 1991 • RIP has limitations in large internets
• Many new features added since then • OSPF is preferred interior routing protocol for
• Updated OSPFv2 specification in RFC 2178 TCP/IP based internets
• Suffered from problems of Distance Vector
Protocol
– Count to Infinity Problem
– Slow Convergence
• Problems with Distance Vector Protocol • Faster Convergence and less consumption of
– Large update packets network resources
– Slow response to topological changes • A more descriptive routing metric
• Need for a Link State Protocol – configurable
• A long list of functional requirements follows – value ranges between 1 and 65,535
– no restriction on network diameters
• Equal-cost multipath
– a way to do load balancing
1
Functional Requirements(contd.) OSPF Basics
the essence
• Identifying LSAs
LS Age
– LS type field
Options LS Type
– Link State ID field
Link State ID
• mostly carries addressing information
Advertising Router • e.g. IP address of externally reachable network
– Advertising Router field
LS Sequence Number
• originating router’s OSPF router ID
LS Checksum
Length
0 16
LSA Header
2
LSAs contd. Sample Router LSA
Metric 5
3
Neighbor Discovery and Maintenance Database Synchronization
• OSPF Hello Protocol • Crucial to ensure correct and loop free routing
• Hello packets sent out every 10 seconds • must be done before 2 neighbors start
• helps to detect failed neighbors communication
• RouterDeadInterval (default 40 seconds) • also whenever new LSAs are introduced
• also ensures that link is bidirectional – uses reliable flooding
• neighboring routers agree on intervals • each router sends LSA headers to its neighbor when
connection comes up
– hello interval set so that a link is not accidentally brought
down • requests only those LSAs which are recent
• Neighboring routers first exchange hellos • Starts when a router wants to update self-originated
• a database description packet establishes the LSAs
sequence number • Link State Update packets
• the other router sends LSA headers • Neighbor installs more recent LSAs into its database
• sequence number incremented for every pair of • floods out on all interfaces except the one on which
database description packets it arrived
– implicit acknowledgement for the previous pair • reliability-retransmissions until acks received
• after examining LSA headers explicit request sent for
complete LSAs
u
u
u u
u
4
Reliable Flooding (contd..) Reliable Flooding (contd..)
– link bandwidth
• with flat routing linear increase in routing table size 10.1.3
10.1
10.2.3
10.2
• with hierarchical, size increases logarithmically 10.1.1 10.1.2 10.2.2
10.2.1
5
OSPF Areas Sample Area Configuration
1 3 1
• areas identified by 32-bit id I J
• area’s topology hidden from all other areas Area 0.0.0.2 Area 0.0.0.3
10.1.2.0/24 1 1 1
• interconnection of areas through area border 1
G
2 2
E
3
routers (ABRs) 3
1 Area 0.0.0.0
10.3.7.0/24
AA D 3 10.8.2.0/24
• ABR leaks IP addressing information to other 10.1.1.0/24 1
H 3 F
areas through summary LSAs 1 3 1
• All the areas are connected to area 0.0.0.0 also called • Special routers called AS boundary routers (ASBR) at
the backbone area the edge of OSPF domain
• need not have a direct physical connection though • ASBRs originate AS-External LSAs
– virtual links provide logical link to backbone • only routes for which the choice of an ASBR makes
– summary LSAs tunneled across non backbone areas
sense are imported
• otherwise default routes are used
• exchange of routing information between areas using
Distance Vector Protocol • AS external LSAs similar to Summary LSAs with 2
additional fields
– absence of redundant paths between areas
– Forwarding address
– not subject to convergence problems
– external route tag
6
Interaction with areas OSPF Area Types
• AS-External LSAs flooded across borders • Restrict the amount of external routing information
• ASBR summary LSAs used to know the location of the within an area
originator of AS-External LSA • used when resources especially router memory is
• Link State ID of ASBR Summary LSA set to the OSPF very limited
router ID of the ASBR whose location is advertised • two types of restricted areas
• similar to summary LSA in all other respects – Stub Areas
– NSSAs or Not-So-Stubby-Areas