0% found this document useful (0 votes)
39 views53 pages

NB - Layer 3 - OSPF

This document provides an overview of OSPF (Open Shortest Path First) routing protocol concepts including: - OSPF uses the Dijkstra shortest path first algorithm and link state routing to exchange topology information between routers. - It maintains neighbor, topology, and routing tables and uses hello, database description, link state request/update packets for neighbor discovery and topology exchange. - OSPF supports equal cost load balancing, VLSM, route tagging, and uses areas and route summarization to improve scalability. - It elects a designated router and backup designated router on multi-access networks using priority and router ID. - OSPF link state advertisements include router, network

Uploaded by

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

NB - Layer 3 - OSPF

This document provides an overview of OSPF (Open Shortest Path First) routing protocol concepts including: - OSPF uses the Dijkstra shortest path first algorithm and link state routing to exchange topology information between routers. - It maintains neighbor, topology, and routing tables and uses hello, database description, link state request/update packets for neighbor discovery and topology exchange. - OSPF supports equal cost load balancing, VLSM, route tagging, and uses areas and route summarization to improve scalability. - It elects a designated router and backup designated router on multi-access networks using priority and router ID. - OSPF link state advertisements include router, network

Uploaded by

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

Layer 3 – OSPF

Prepared by:
Mohit Sahai
SVS India
Foundation of Link State Routing Protocols

• Link State Database refers to a database which consists information about


each data link and its current operational state.
• Link-state routing protocols define the content and structure of data that
describes network topology, and define the processes by which routers
exchange that detailed topology information.
• Routing Protocols: OSPF and ISIS
• Use “Dijkstra’s shortest Path First (SPF)” Algorithm
• Send triggered Update to announce Network Change
• Send Periodic Updates (LS Refresh) on Long Intervals.
OSPF Features
OSPF Advantages
• Fast convergence than Distance Vector routing protocol
• Scalability to much larger network
• Less prone to false routing information
• Use of Areas: Hierarchal Network and reduces protocol impact on CPU and memory
• Fully classless, supports VLSM and Supernetting
• Metric based on BW
• Supports equal cost load balancing
• Reserved multicast address
• Supports route tagging for tracking external routes.

Maintains Three Tables


• Neighbor Table
• Topology Table
• Routing Table
OSPF Message Types
Hello Packet
Purpose
• Neighbor Discovery Packet Capture
• Matching Parameter
• Confirming Bidirectional communication
• Keepalive

Note: Always forms peering on the Primary IP address


as source

Parameters to match (** MTU)


• Authentication
• Primary subnet
• Area
• No Duplicate Router ID
• OSPF Hello and Dead Interval
DBD Packet
• Contains the list of each LSAs which the sending router has in its Link State Database.
• Basically contains the list of LSA Headers which is just enough to uniquely identify the LSA and its revision number.
Link State Request (LSR)
• Neighbor uses this packet
to request for detailed LSA
information for the below
case

• Neighbor advertised
latest version of an
already existing LSA in
LSBD.

• Neighbor advertised
LSA which does not
exist in local LSDB.
Link State Update(LSU)
Link State Acknowledgement (LSAck)

• Implicit Ack
• Explicit Ack
OSPF Operation
OSPF Neighbor States

• Down
• Attempt* : Only for NBMA and point to multipoint N. Broadcast
• Init
• 2-Way
• Exstart
• Exchange
• Loading
• Full
Master/Slave Relationship – Exstart State

A DD Packet contains 3 flags

• Master Flag: (MS Flag)


• More Flag (M Flag)
• Init Flag (I Flag)

• Highest Router ID becomes master


• Each DD packet sent by Master must be replied by the slave
• Slave can send DD packet only in the response the receiving Master’s DD Packet
Sequence Number of LSA

LSA Sequence Number is a 32 Bit Signed Value.

LSA sequence numbers start with 0x80000001 (–231+1); increase through


0xFFFFFFFF (–1), 0x00000000 (0), and0x00000001 (1); and finish at
0x7FFFFFFF (231–1).
DR/BDR on a LAN Segment
• To represent the Multiaccess Network and its
attached routers to the rest of the internetwork

• To manage the flooding process on the


Multiaccess Network

Ospf priority
Wait Timer
DR/BDR Election on basis on Priority/RID
DR/BDR Election

• Any router with 0 priority is not eligible to become DR/BDR.

• When router comes up, it starts wait timer and collects the priority and RID of all the Helloes it received

• If any Hello is received with neighbor claiming itself as BDR or DR (only one), router goes for DR/BDR
election

• The election is performed only for those role which is not claimed.

• Highest Priority becomes DR and second Highest becomes BDR.

• RID is tie breaker in case priority is same

• Once the election is completed and all routers agree to same DR/BDR, new router with better priority
cannot preempt.

• Incase, different routers calculate different DR/BDR, election may again happen
OSPF Network Types
SPF Calculation

Uses the Dijkstra SPF


algorithm to examine
the LSAs in the LSDB
and derive the new
tree of shortest paths
to available
destinations.
Steady State Operation
OSPF Design – Routing Hierarchy

Problem with using Single Area


- Full SPF run if there is any change in
LSA1/LSA2 because it’s a topology change

- SPF run on huge LSDB would consume


memory and CPU

- If the area is very big, there is a chance


that some routes would be flapping all the
time resulting in frequent SPF run.

- Convergence would be drastically affected


because of resource consumption and SPF
would be running for longer time..
OSPF Routing Hierarchy
OSPF domain could be divided into multiple area.

- Full LSDB needs to be maintained for local area

- SPF runs only for the per area LSDB

- LSAs from one area LSDB to another is done in a


controlled manner

- Result of the run of each SPF run per area is


combined in a single routing table.

- Failure in one area will trigger to run SPF in that


area, other area would only run Partial SPF

- Route summarization and filtering further


shortens LSDB and improves SPF performance
Types of OSPF Routers
LSA Types
LSA Type 1: Router LSA

• Each router creates and floods a


type 1 LSA for itself.

• These LSAs describe the router, its


interfaces (in that area), and a list of
neighbouring routers (in that area)
on each interface.

• The LSA itself is identified by a link-


state ID (LSID)equal to that router’s
RID.
LSA Type 2: Network LSA

• One network (type 2) LSA for each transit


broadcast or NBMA network in
an area

• Includes list of attached routers on the


transit link

• Includes subnet mask of link

• Advertised by the DR of the broadcast


network

• Floods within its area only; does not cross


ABR
LSA Type 3: Summary LSA
• Type 3 LSAs are used to flood network
information to areas outside the
originating area (interarea)
• Describes network number and mask
of link.

• Advertised by the ABR of originating area.

• Regenerated by subsequent ABRs to flood


throughout the autonomous system.

• By default, routes are not summarized,


and type 3 LSA is advertised for every
subnet.
LSA Type 4: ASBR Summary LSA
• Summary (type 4) LSAs are used to advertise
an ASBR to all other areas in the autonomous
system.

• They are generated by the ABR of the


originating area.

• They are regenerated by all subsequent ABRs


to flood throughout the autonomous system.

• Type 4 LSAs contain the router ID of the


ASBR.
LSA Type 5: External LSA
• External (type 5) LSAs are used to advertise
networks from other autonomous systems.

• Type 5 LSAs are advertised and owned by the


originating ASBR.

• Type 5 LSAs flood throughout the entire


autonomous system.

• The advertising router ID (ASBR) is unchanged


throughout the autonomous system.

• Type 4 LSA is needed to find the ASBR.

• By default, routes are not summarized.


OSPF Route Types
Calculating cost for E1 and E2 routes

• E2 routes: If more than 2


routes exist with same E2
metric, path through the
closest ASBR is used. Still same;
use all of them.

• Cost of the E1 route =


“Advertised cost” + “cost to
reach the ASBR”
Network Type

Stub:
• A subnet on which there is no OSPF
neighbors

Transit:
• A network over which two or more OSPF
routers are neighbors and DR is elected so
that traffic can transit each other.
• Exception is point to point link where it is
treated as combination of stub IP Network
and a point to point link.
Some Rules which OSPF follows

• Route Preference: Intra Area Route > Inter Area Route > E1 external route >
E2 external route

• ABR ignores LSA 3 learned from a “non backbone area” during SPF calculation.

• ABR would not flood LSA 3 received from a “Non Backbone area” in to “Backbone”
(only 1 and 2)

• Router which has originated a particular LSA is “only” allowed to modify It or withdraw
it.

• Other routers cannot ever change the content, block it or drop it before max lifetime
has expired.
Stub routing
Stub routing rules

An area can be stub or totally stub if:

• There is a single ABR, or if there is more than one ABR, suboptimal routing paths
to other areas or external autonomous systems are acceptable

• .All routers in the area are configured as stub routers.

• There is no ASBR in the area.

• The area is not area 0.

• No virtual links go through the area.


Using Stub Area

• External LSAsare stopped.

• Default route is advertised


into stub areaby the ABR.

• All routers inarea 50 must


be configured as stub.
Stub Configuration
OSPF Stub config example
Totally Stub

• External LSAs are stopped.

• Summary LSAsare stopped.

• Routing tableis reduced to a


minimum.

• All routers mustbe configured as


stub.

• ABR must be configured as totally


stubby.

• This is a Ciscoproprietary feature.


Totally Stub example
NSSA: Not so stubby Areas

• NSSA breaks stub area rules. • ABR (R2) converts LSA type 7 to LSA type 5.
• ASBR (R1) is allowed in NSSA. • ABR sends default route into NSSA instead of
• Special LSA type 7 defined, sent by ASBR. external routes from other ASBRs.
• NSSA is an RFC addendum.
LSA Type 7: NSSA
NSSA Configuration
Totally NSSA
OSPF Cost and clearing OSPF process

Clearing OSPF process would restart ospf causing all neighbors to


fail and restart

“log-adjacency-changes detail” under ospf would give a detailed


neighbor state change logs

OSPF reference BW is 100 Mbps but since in todays world we


have much higher BW links, we can change the reference BW to
higher value by using the command ”auto-cost reference-
Bandwidth <value in Mbps>

Interface cost: ”ip ospf cost <value>

Neighbor cost in NBMA: neighbor <> cost <>


OSPF Filtering

• Filtering routes, not LSA

• ABR Type LSA filtering

• Using the area range no-advertise option


Distribute-list
• The following rules govern the use of distribute
lists for OSPF:
• The distribute list in the inbound direction applies
to results of SPF—the routes to be installed into
the router’s routing table.
• The distribute list in the outbound direction applies
only to redistributed routes and only on an ASBR; it
selects which redistributed routes shall be
advertised.
• The inbound logic does not filter inbound LSAs; it
instead filters the routes that SPF chooses to add to
that one router’s routing table.
• If the distribute list includes the incoming interface
parameter, the incoming interface is checked as if it
were the outgoing interface of the route.
Summarization
• If configured, ABR performs summarization while flooding LSA type 3 to other area
ABR(conf-router)#area <area-id> range <summary address [not-advertise]

• ASBR performs summarization for the external routes redistributed into OSPF domain

BORDER(config)#ip route 10.0.0.0 255.255.255.0 loopback 0


BORDER(config)#ip route 10.0.1.0 255.255.255.0 loopback 0
BORDER(config)#ip route 10.0.2.0 255.255.255.0 loopback 0
BORDER(config)#ip route 10.0.3.0 255.255.255.0 loopback 0
BORDER(config)#router ospf 1
BORDER(config-router)#network 192.168.1.0 0.0.0.255 area 1
BORDER(config-router)#redistribute static subnets
BORDER(config-router)#summary-address 10.0.0.0 255.255.252.0
Virtual Links
Virtual Link Configuration
Authentication Techniques in OSPF

• Type 0: None
• Type 1: plain text
• Type 2: MD5

In MD5, Multiple keys with different key IDs


can be configured.

Different key IDs can help in “OSPF key


rollover”
Area and Virtual link Authentication

• Area Authentication command: tells router what auth to use on all


the interface of that area

• Authentication for virtual link


Extended Cryptographic OSPF Algorithm

• Highest Key ID is used in case of multiple Keys

• Area level auth is not supported

• Supported on Virtual link

• No key rollover procedure


Self Study Topics – Tuning OSPF Performance

• Tuning SPF scheduling with SPF Throttling.

• Tuning the LSA Origination with LSA Throttling.

• Incremental SPF ----- ispf

• OSPFv2 Prefix Suppression ------ ip ospf prefix-supression

• OSPF Stub Router Configuration ------ max-metric router-lsa

• OSPF Graceful Restart ----- ip ospf shutdown


Thank You

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy