0% found this document useful (0 votes)
3 views

OSPF [Compatibility Mode]

The document provides a comprehensive overview of the Open Shortest Path First (OSPF) protocol, detailing its motivation, functional requirements, and hierarchical routing structure. It explains the importance of link state advertisements (LSAs), neighbor discovery, and database synchronization in maintaining efficient routing. Additionally, it discusses OSPF area types and their roles in managing routing information within large networks.

Uploaded by

subhrand66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

OSPF [Compatibility Mode]

The document provides a comprehensive overview of the Open Shortest Path First (OSPF) protocol, detailing its motivation, functional requirements, and hierarchical routing structure. It explains the importance of link state advertisements (LSAs), neighbor discovery, and database synchronization in maintaining efficient routing. Additionally, it discusses OSPF area types and their roles in managing routing information within large networks.

Uploaded by

subhrand66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Overview

• 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

Motivation Functional Requirements of OSPF

• 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

• Routing Hierarchy • Distributed, replicated database model


– support large routing domains – describes complete routing topology
• Separate internal and external routes • Link state advertisements
• Support of flexible subnetting schemes – carry local piece of routing topology
• Security • Distribution of LSAs using reliable flooding
• Type of Service Routing • Link state database
– identical for all the routers

Link State Advertisements(LSAs) LSAs contd.

• 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

LSAs contd. LSAs contd.

• Identifying LSA instances • Verifying LSA contents


– needed to update self-originated LSAs – LS Checksum field
– LS Sequence Number field • computed by the originating router and left unchanged
• 32 bit values thereafter
• monotonically increasing until some max value • LS age field not included in checksum
• LSA checksum and LS Age guard against potential • Removing LSAs from databases
problems – LS Age field
• ranges from 0 to 30 min.
• Max Age LSAs used to delete outdated LSAs

2
LSAs contd. Sample Router LSA

• Other LSA Header fields


10.1.1.1 10.1.1.2 10.1.1.4 10.1.1.6
– 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 10.1.1.3 10.1.1.5

Sample Router LSA contd.. Link State Database

LS Age 0 seconds • Collection of all OSPF LSAs


Options LS Type E-bit,LS Type 1

Link State ID 10.1.1.1 • databases exchanged between neighbors


Advertising Router 10.1.1.1 • synchronization through reliable flooding
LS Sequence Number 0x80000006
• gives the complete routing topology
LS Checksum 0x9b47
Length 60 bytes • each OSPF router has identical link-state
Router Type 0 0 (ordinary)
# of links 3 database
Link ID 10.1.1.3

Link 1 Link Data If index 2 (unnumbered link)

Link Type #TOS Metrics 1(point to point), 0

Metric 5

Link State Database contd.. Communication between OSPF Routers

• Example of a link state database • OSPF packets encapsulated in IP packets


– standard 24 byte header
– OSPF packet type field
LS Type Link State ID Adv Router LS Checksum LS Seq No LS Age
– OSPF router ID of sender
Router LSA 10.1.1.1 10.1.1.1 0x9b47 0x80000006 0
– Packet checksum
….. …... ….. ….. …. …...
– Authentication fields
– OSPF Area ID

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

Database Exchange Reliable Flooding

• 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

Reliable Flooding (contd..) Reliable Flooding (contd..)

10.1.1.1 10.1.1.2 10.1.1.4 10.1.1.6 10.1.1.1 10.1.1.2 u 10.1.1.4 10.1.1.6


u
Time T1 Time T2
u

u
u
u u
u

10.1.1.3 10.1.1.5 10.1.1.3 10.1.1.5

4
Reliable Flooding (contd..) Reliable Flooding (contd..)

10.1.1.1 10.1.1.2 10.1.1.4 u 10.1.1.6 10.1.1.1 10.1.1.2 10.1.1.4 10.1.1.6

Time T3 Time T3+


u
ack ack ack ack

10.1.1.3 10.1.1.5 10.1.1.3 ack 10.1.1.5

Reliable Flooding(contd..) Routing Calculations

• Robustness • Link costs configurable by administrator


– updates flooded over all the links , so failure of any link • Smaller values for more preferred links
doesn’t affect database synchronization
• must make sense to add link costs
– LSAs refreshed every 30 minutes
– LSA checksum field detects corruption
• different costs for each link direction possible
– flooding loops avoided by LS Age field • Dijkstra’s shortest path algorithm
– MinLSInterval limits rate of LSA origination – incrementally calculates tree of shortest paths
– Receivers can refuse to accept LSA updates if they received – each link in the network examined once
an update less than a second ago – computes multiple shortest paths (equal-cost multipath)

Hierarchical Routing an example

• Technique used to build large networks


• minimizes consumption of network resources such as 10.3
10.3.3
– router memory
10.0.0.0/8
– router computing resources 10.3.1
10.3.2

– 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

• Two-level hierarchical routing scheme through the Area 0.0.0.1

use of areas 10.2.1.0/24 10.2.2.0/24

1 3 1
• areas identified by 32-bit id I J

• each area has its own link state database which is 3 3

a collection of network-LSAs and router-LSAs B C

• 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

OSPF Areas contd.. OSPF Areas contd..

• Example of Summary LSA(router B) • Reduction in link state databases of an area


• reduction in amount of flooding traffic needed for
LS Age 0
synchronization
Options LS Type 0x2, Type 3(summary-LSA)

Link State ID 10.2.0.0


• reduction in the cost of the shortest path
calculations
Advertising Router Router B’s router ID
• increased robustness
LS Sequence Number 0x80000001 • routing protection
LS Checksum
Length 28 bytes
• Hidden prefixes
Network Mask 255.255.0.0

TOS TOS 0 (normal)


Metric Cost of 7

Area Organization Incorporating external routing information

• 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

OSPF Area Types OSPF Area Types contd..

• Stub Areas • NSSAs


– no AS-External-LSAs – import small amount of routing information
– routing to external destinations based on default routes – this information flooded to other areas by the NSSA Border
originated by the area’s border routers router
– summary LSAs also made optional – translated into AS-External-LSA at the NSSA Border
– must lie on the edge of OSPF routing domain – one-way filter
– inter-area routing may also be based on default routes
– improved scaling
– but not preferred due to the possibility of suboptimal
routes

OSPF messages Summary


Hello
Hello messages are used as a form of greeting, to allow a router to discover other adjacent routers on its local
links and networks. The messages establish relationships between neighboring devices (called adjacencies)
and communicate key parameters about how OSPF is to be used in the autonomous system or area. During
• Why OSPF is needed in the Internet?
normal operation, routers send hello messages to their neighbors at regular intervals (the hello interval); if a
router stops receiving hello messages from a neighbor, after a set period (the dead interval) the router will • The basics of the protocol
assume the neighbor has gone down.
Database Description (DBD)
Database description messages contain descriptions of the topology of the autonomous system or area. They
– The Link state Advertisements
convey the contents of the link-state database (LSDB) for the area from one router to another. Communicating
a large LSDB may require several messages to be sent by having the sending device designated as a master
– Neighbor Discovery (Hello Protocol)
device and sending messages in sequence, with the slave (recipient of the LSDB information) responding with
acknowledgements. – Database Synchronization and reliable flooding
Link State Request (LSR)
Link state request messages are used by one router to request updated information about a portion of the
LSDB from another router. The message specifies the link(s) for which the requesting device wants more
• Hierarchical Routing in OSPF
current information.
Link State Update (LSU)
– OSPF Areas and Area Organization
Link state update messages contain updated information about the state of certain links on the LSDB. They are
sent in response to a Link State Request message, and also broadcast or multicast by routers on a regular – Interaction with External Routing Information
basis. Their contents are used to update the information in the LSDBs of routers that receive them.
Link State Acknowledgment (LSAck) – OSPF Area Types viz. Stub Areas and NSSAs
Link state acknowledgement messages provide reliability to the link-state exchange process, by explicitly
acknowledging receipt of a Link State Update message.

You might also like