Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Introduction to OSPF - Lecture slides-2024

The document provides an overview of the Open Shortest Path First (OSPF) protocol, detailing its link-state nature, neighbor discovery through hello packets, and the construction and flooding of Link State Packets (LSPs). It explains the hierarchical design of OSPF, the roles of routers, and the various types of Link State Advertisements (LSAs) used for routing information dissemination. Additionally, it discusses OSPF path costs, the significance of designated routers, and the scalability of OSPF through multi-area configurations.

Uploaded by

bikashbang666
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Introduction to OSPF - Lecture slides-2024

The document provides an overview of the Open Shortest Path First (OSPF) protocol, detailing its link-state nature, neighbor discovery through hello packets, and the construction and flooding of Link State Packets (LSPs). It explains the hierarchical design of OSPF, the roles of routers, and the various types of Link State Advertisements (LSAs) used for routing information dissemination. Additionally, it discusses OSPF path costs, the significance of designated routers, and the scalability of OSPF through multi-area configurations.

Uploaded by

bikashbang666
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

OSPF

Open Shortest Path First

Unit Code & Title


The Story So Far…

Hierarchy provides
redundancy, availability,
reliability, scalability,
security and economics

We accomplish this with
multiple devices, scaled at
power and price as
appropriate.

To do this we use
Spanning Tree and VLANs
and a bit of Routing
The Story So Far…

Spanning Tree doesn’t give
the best path, only a loop
free path.

We can manipulate to our
choosing but it won’t
optimize.

To improve the situation
instead of running all traffic
on the same tree we can
use VLAN’s to isolate traffic
and improve security.
The Story So Far…

Still to this point
everything has been with
layer 2 protocols. We
only briefly needed any
layer 3 to allow VLAN’s to
talk to each other.

This has mostly been just
Dist and Access

Today we move to the
core
OSPF - Overview

• A link state protocol


• Every router has full knowledge of the topology
• Makes for fast convergence
• Takes memory to store
• Takes bandwidth to communicate
• Every router calculates path costs each time a route change
occurs
• Makes for fast convergence
• Takes CPU to calculate “the shortest path”
•Event driven
•Hierarchical - Scalable
OSPF Hello Packets
Neighbour discovery

• Connected interfaces that are configured for OSPF will exchange


hello packets.
• Once routers learn it has neighbours they form an adjacency
• 2 adjacent neighbours will exchange hello packets
• Serves as a keep-alive function
OSPF
https://contenthub.netacad.com/ensa-dl/1.2.3

Note there are many many types of


Link State Packets. Here we are lumping

Building a Link State Packet them into one term LSP.

Each router builds its own Link State Packet (LSP)

Contents of LSP:
• State of each directly connected link
• Includes information about neighbours such as neighbour ID,
link type & bandwidth.
OSPF Using the multicast address:
224.0.0.x
(the x number above

Flooding LSPs to Neighbours


varries depending on
a few different factors, see
cisco ENSA chap 1)

• Once LSP are created they are forwarded out to neighbors.


• After receiving the LSP the neighbor continues to forward it
throughout the routing area.
OSPF
Conditions for sending out LSPs

LSPs are sent out under the following conditions


• Initial router start up or routing process
• When there is a change in topology

Not sending entire updates


every 30 seconds like RIP
LSAs are stored in a database
Database and shortest path from R1’s perspective
Note: shortest path is not the only path…
OPSF
Database -> SPF -> Routing table

This is the process...


The algo calculates entire network topology and
identifies the shortest path.
OSPF Designated Router (DR) This is only for special cases,
when we have multiple routers in the
same network
Sciences Bldg

Arts Bldg Core Layer Router

Library Bldg

More Bldgs...

In large Ethernet environments with lots of OSPF routers you may


have many neighbours.
It is inefficient for to handle all of the communications as many of
the LSP exchanges involve the same information.
OSPF solution:
• Designated Router
• Within a broadcast domain
• DR is responsible for updating all other OSPF routers
• Backup Designated Router (BDR)
• Takes over DR’s responsibilities if DR fails
• Roles are elected based on configured priority or highest loopback
IP address or physical interface IP if no loopback present.
OSPF Link-state Updates

Purpose of a Link State Update (LSU) -


Used to deliver link state advertisements
Purpose of a Link State Advertisement (LSA) -
Contains information about neighbors & path costs
OSPF Path costs

OSPF uses cost as the metric for determining the best route
• The best route will have the lowest cost
• Cost is based on bandwidth of an interface
• Cost is calculated using the formula
108 / bandwidth
• Reference bandwidth defaults to 100Mbps (108)
• can be modified using auto-cost reference-bandwidth
command
OSPF link cost Cost is not same as bandwidth.
Cost is customizable and can be changed to modify preferred paths.

• Usually the actual speed of a link is different than the default


bandwidth
• Imperative that the bandwidth value reflects link’s actual speed.
Reason: so routing table has best path information
• The show interface command will display interface’s
bandwidth
• Most serial links default to 1.544Mbps

Think about if an old wireless G wifi router


is at the end of a 1 GB router interface
OSPF link cost
Modifying the cost
• Both sides of a serial link should be configured with the same
bandwidth
• Commands used to modify bandwidth value
• Bandwidth command:

Router(config-if)#bandwidthbandwidth-kbps
• ip ospf cost command allows you to directly specify
interface cost
Multi-area OSPF
Problems as OSPF networks grow

• Large link-state database (LSDB)


• Because the LSDB covers the topology of the entire
network, each router must maintain an entry for every
network in the area, even if not every route is selected for
the routing table.
• Frequent SPF algorithm calculations
• In a large network, changes are inevitable, so the routers
spend many CPU cycles recalculating the SPF algorithm and
updating the routing table. And those routes may not even go into the table

To make OSPF more efficient and scalable, OSPF supports


hierarchical routing using areas.
• An OSPF area is a group of routers that share the same link-state
database.
OSPF Areas
• Area 0 is the backbone or transit area
• Normally other areas must be directly connected to Area 0.
• Detailed knowledge of own area and area 0 only.
OSPF router roles
Internal router –All of its interfaces in the same area. Same LSDBs.
Backbone router – All of its interfaces in the backbone area.
Area Border Router (ABR) –Has interfaces attached to multiple areas.
Maintain separate LSDBs for each area. Summarisation often occurs
here. ABRs distribute the routing information into the backbone. The
backbone routers then forward the information to the other ABRs.
Autonomous System Boundary Router (ASBR) – This is a router that
has at least one interface attached to an external internetwork.
Redistribution occurs here.

Interfaces are what is exmained to determine the Area

Internal Router
ABR

ASBR
OSPF LSA types
Type 1 – Router LSA

All routers generate type 1 LSAs.


• Type 1 LSAs are flooded within the area and do not propagate
beyond an ABR.
• A type 1 LSA link-state ID is identified by the router ID of the
originating router.
OSPF LSA types
Type 2 – Network LSA
Only a DR generates a type 2 LSA.
• Identify the routers and the network addresses of the multi-access
links.
• Flooded within the multi-access network and do not go beyond an
ABR.
• A type 2 LSA link-state ID is identified by the DR router ID.

Type 2 updates are sent in this topology


OSPF LSA types
Type 3 – Summary LSA
ABRs flood type 3 LSAs to other areas and are regenerated by other
ABRs.
• Describes a network address learned by type 1 LSAs.
• A type 3 LSA is required for every subnet.
• A type 3 LSA link-state ID is identified by the network address.
• By default, routes are not summarized.
OSPF LSA types
Type 4 – Summary LSA
Area Border Routers (ABR) generate type 4 LSAs.
•Used to advertise an Autonomous System Border Router (ASBR) to
other areas and provide a route to the ASBR.
•Generated by the originating ABR and regenerated by other ABRs.
•A type 4 LSA link-state ID is identified by the router ID of the
ASBR.
OSPF LSA types
Type 5 – Autonomous System LSA
An ASBR generates a type 5 LSA.
• Type 5 LSAs are used to advertise external (i.e., non-OSPF) network
addresses.
• Type 5 LSAs are flooded throughout the area and regenerated by
other ABRs.
Summary
From: OSPF LSA Types By CCIETalk on July 13, 2008

LSA 1 (Router LSA) Generated by all routers in an area to describe their directly
attached links (Intra-area routes). These do not leave the area.
LSA 2 (Network LSA) Generated by the DR of a broadcast or nonbroadcast segment
to describe the neighbors connected to the segment. These do not leave the area.
LSA 3 (Summary LSA) Generated by the ABR to describe a route to neighbors
outside the area. (Inter-area routes)
LSA 4 (Summary LSA) Generated by the ABR to describe a route to an ASBR to
neighbors outside the area.
LSA 5 (External LSA) Generated by ASBR to describe routes redistributed into the
area. These routes appear as E1 or E2 in the routing table. E2 (default) uses a
static cost throughout the OSPF domain as it only takes the cost into account that
is reported at redistribution. E1 uses a cumulative cost of the cost reported into the
OSPF domain at redistribution plus the local cost to the ASBR.
Outside our scope…
LSA 6 (Multicast LSA) Not supported on Cisco routers.
LSA 7 (NSSA External LSA) Generated by an ASBR inside a NSSA to describe routes
redistributed into the NSSA. LSA 7 is translated into LSA 5 as it leaves the NSSA by
the ABR. These routes appear as N1 or N2 in the IP routing table inside the NSSA.
Much like LSA 5, N2 is a static cost while N1 is a cumulative cost that includes the
cost to the ASBR
Order of route determination and appearance
of LSA types in the routing table

1. All routers calculate the best paths to


destinations within their area (intra-area)
and add these entries to the routing
table. These are the type 1 and type 2
LSAs, which are noted in the routing
table with a routing designator of O.
2. All routers calculate the best paths to
the other areas within the internetwork.
These best paths are the interarea route
entries, or type 3 and type 4 LSAs, and
are noted with a routing designator of O
IA.
3. All routers (except those that are in a
form of stub area) calculate the best
paths to the external autonomous system
(type 5) destinations. These are noted
with either an O E1 or an O E2 route
designator, depending on the
configuration. (3)
Redistributing an OSPF Default Route
• Topology includes a link to ISP
• Router connected to ISP
• Called an autonomous system border router (ASBR).
• Used to propagate a default route
• Example of static default route
• R1(config)#ip route 0.0.0.0 0.0.0.0 loopback 1
• Requires the use of the default-information originate command
• R1(config)#router ospf 1
R1(config-router)#default-information originate
All graphics courtesy of
Cisco Systems under the
terms of the Networking
Academy Agreement.

You might also like