SlideShare a Scribd company logo
1 of 16
Dynamic Routing Protocols
OSPF
2
Link State Routing: Basic princples
1. Each router establishes a relationship (“adjacency”) with
its neighbors
2.Each router generates link state advertisements (LSAs)
which are distributed to all routers
LSA = (link id, state of the link, cost, neighbors of the link)
3. Each router maintains a database of all received LSAs
(topological database or link state database), which
describes the network has a graph with weighted edges
4. Each router uses its link state database to run a shortest
path algorithm (Dijikstra’s algorithm) to produce the
shortest path to each network
3
OSPF
• OSPF = Open Shortest Path First
• The OSPF routing protocol is the most important link state
routing protocol on the Internet
• History:
– 1989: RFC 1131 OSPF Version 1
– 1991: RFC1247 OSPF Version 2
– 1994: RFC 1583 OSPF Version 2 (revised)
– 1997: RFC 2178 OSPF Version 2 (revised)
– 1998: RFC 2328 OSPF Version 2 (current version)
4
Features of OSPF
• Provides authentication of routing messages
• Enables load balancing by allowing traffic to be split evenly
across routes with equal cost
• Type-of-Service routing allows to setup different routes
dependent on the TOS field
• Supports subnetting
• Supports multicasting
• Allows hierarchical routing
5
Example Network
10.1.1.0/24
.1 .2 .2
10.10.10.1
10.1.4.0/24
10.1.2.0/24
.1
.4
10.1.7.0/24
10.1.6.0/24
10.1.3.0/24
10.1.5.0/24
10.1.8.0/24
.3
.3 .5
.2
.3
.5
.5
.4
.4
.6
.6
10.10.10.2 10.10.10.4 10.10.10.6
10.10.10.2 10.10.10.5
Router IDs are
selected
independent of
interface addresses
3
4 2
5
1
1
32
•Link costs are called Metric
• Metric is in the range [0 , 216
]
• Metric can be asymmetric
6
10.1.1.0/24
.1 .2 .2
10.10.10.1
10.1.4.0/24
10.1.2.0/24
.1
10.1.3.0/24
10.1.5.0/24.3
.3
.2
.3
10.10.10.2
10.10.10.3
Link State Advertisement (LSA)
• The LSA of router 10.10.10.1 is as
follows:
• Link State ID: 10.10.10.1 = Router ID
• Advertising Router: 10.10.10.1 = Router ID
• Number of links: 3 = 2 links plus router itself
• Description of Link 1: Link ID = 10.1.1.1, Metric = 4
• Description of Link 2: Link ID = 10.1.2.1, Metric = 3
• Description of Link 3: Link ID = 10.10.10.1, Metric = 0
3
4
2
Each router sends its LSA to all routers in the network
(using a method called reliable flooding)
7
Network and Link State Database
10.1.1.0/24
.1 .2 .2
10.10.10.1
10.1.4.0/24
10.1.2.0/24
.1
.4
10.1.7.0/24
10.1.6.0/24
10.1.3.0/24
10.1.5.0/24
10.1.8.0/24
.3
.3 .5
.2
.3
.5
.5
.4
.4
.6
.6
10.10.10.2 10.10.10.4 10.10.10.6
10.10.10.2 10.10.10.5
LS Type Link StateID Adv. Router Checksum LS SeqNo LS Age
Router-LSA 10.1.10.1 10.1.10.1 0x9b47 0x80000006 0
Router-LSA 10.1.10.2 10.1.10.2 0x219e 0x80000007 1618
Router-LSA 10.1.10.3 10.1.10.3 0x6b53 0x80000003 1712
Router-LSA 10.1.10.4 10.1.10.4 0xe39a 0x8000003a 20
Router-LSA 10.1.10.5 10.1.10.5 0xd2a6 0x80000038 18
Router-LSA 10.1.10.6 10.1.10.6 0x05c3 0x80000005 1680
Each router has a
database which
contains the LSAs
from all other routers
8
Link State Database
• The collection of all LSAs is called the link-state database
• Each router has and identical link-state database
– Useful for debugging: Each router has a complete description of
the network
• If neighboring routers discover each other for the first time,
they will exchange their link-state databases
• The link-state databases are synchronized using reliable
flooding
9
OSPF Packet Format
OSPFMessageIPheader
BodyofOSPFMessage
OSPFMessage
Header
MessageType
SpecificData
LSA LSALSA ...
LSA
Header
LSA
Data
...
Destination IP: neighbor’s IP address or 224.0.0.5
(ALLSPFRouters) or 224.0.0.6 (AllDRouters)
OSPF packets are not
carried as UDP payload!
OSPF has its own IP
protocol number: 89
10
OSPF Packet Format
sourcerouterIPaddress
authentication
authentication
32bits
version type messagelength
AreaID
checksum authenticationtype
BodyofOSPFMessage
OSPFMessage
Header
2: current version
is OSPF V2
Message types:
1: Hello (tests reachability)
2: Database description
3: Link Status request
4: Link state update
5: Link state acknowledgement
ID of the Area
from which the
packet originated
Standard IP checksum taken
over entire packet
0: no authentication
1: Cleartext
password
2: MD5 checksum
(added to end
packet)
Authentication passwd = 1: 64 cleartext password
Authentication passwd = 2: 0x0000 (16 bits)
KeyID (8 bits)
Length of MD5 checksum (8 bits)
Nondecreasing sequence number (32 bits)
Prevents replay
attacks
11
OSPF LSA Format
LinkStateID
linksequencenumber
advertisingrouter
LinkAge LinkType
checksum length
LinkID
LinkData
LinkType Metric#TOSmetrics
LSA
LSA
Header
LSA
Data
LinkID
LinkData
LinkType Metric#TOSmetrics
LSA
Header
Link 1
Link 2
12
Discovery of Neighbors
• Routers multicasts OSPF Hello packets on all OSPF-enabled
interfaces.
• If two routers share a link, they can become neighbors, and
establish an adjacency
• After becoming a neighbor, routers exchange their link state
databases
OSPFHello
OSPFHello:Iheard10.1.10.2
10.1.10.1 10.1.10.2
Scenario:
Router 10.1.10.2 restarts
13
Neighbor discovery and
database synchronization
OSPFHello
OSPFHello:Iheard10.1.10.2
DatabaseDescription:Sequence=X
10.1.10.1 10.1.10.2
DatabaseDescription:Sequence=X, 5LSAheaders=
Router-LSA,10.1.10.1,0x80000006
Router-LSA, 10.1.10.2,0x80000007
Router-LSA, 10.1.10.3,0x80000003
Router-LSA, 10.1.10.4,0x8000003a
Router-LSA, 10.1.10.5,0x80000038
Router-LSA, 10.1.10.6,0x80000005
DatabaseDescription:Sequence=X+1,1 LSAheader=
Router-LSA, 10.1.10.2,0x80000005
DatabaseDescription:Sequence=X+1
Sends empty
database
description
Scenario:
Router 10.1.10.2 restarts
Discovery of
adjacency
Sends database
description.
(description only
contains LSA
headers)
Database
description of
10.1.10.2
Acknowledges
receipt of
description
After neighbors are discovered the nodes exchange their databases
14
Regular LSA exchanges
10.1.10.1 10.1.10.2
LinkStateRequestpackets, LSAs=
Router-LSA, 10.1.10.1,
Router-LSA, 10.1.10.2,
Router-LSA, 10.1.10.3,
Router-LSA, 10.1.10.4,
Router-LSA, 10.1.10.5,
Router-LSA, 10.1.10.6,
LinkStateUpdatePacket, LSA =
Router-LSA, 10.1.1.6,0x80000006
LinkStateUpdatePacket, LSAs =
Router-LSA,10.1.10.1, 0x80000006
Router-LSA,10.1.10.2,0x80000007
Router-LSA,10.1.10.3,0x80000003
Router-LSA,10.1.10.4,0x8000003a
Router-LSA,10.1.10.5,0x80000038
Router-LSA,10.1.10.6,0x80000005
10.1.10.2 explicitly
requests each LSA
from 10.1.10.1
10.1.10.1 sends
requested LSAs 10.1.10.2 has more
recent value for
10.0.1.6 and sends it
to 10.1.10.1
(with higher sequence
number)
15
Routing Data Distribution
• LSA-Updates are distributed to all other routers via Reliable
Flooding
• Example: Flooding of LSA from 10.10.10.1
10.10.10.1 10.10.10.2 10.10.10.4 10.10.10.6
10.10.10.2 10.10.10.5
LSA
LSA
Update
database
Update
database
ACK
ACK
LSA
LSA
LSA
LSA
ACK
ACK
ACK
ACK
LSA
LSA
LSA
LSA
Update
database
Update
database
ACK
ACK
ACK
ACK
Update
database
16
Dissemination of LSA-Update
• A router sends and refloods LSA-Updates, whenever the
topology or link cost changes. (If a received LSA does not
contain new information, the router will not flood the packet)
• Exception: Infrequently (every 30 minutes), a router will flood
LSAs even if there are not new changes.
• Acknowledgements of LSA-updates:
• explicit ACK, or
• implicit via reception of an LSA-Update

More Related Content

What's hot

CCNA ppt Day 1
CCNA ppt Day 1CCNA ppt Day 1
CCNA ppt Day 1VISHNU N
 
MPLS L3 VPN Deployment
MPLS L3 VPN DeploymentMPLS L3 VPN Deployment
MPLS L3 VPN DeploymentAPNIC
 
EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)NetProtocol Xpert
 
OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)Ann Joseph
 
Dynamic Routing IGRP
Dynamic Routing IGRPDynamic Routing IGRP
Dynamic Routing IGRPKishore Kumar
 
Day 3 ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)
Day 3 ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)Day 3 ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)
Day 3 ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)anilinvns
 
BGP (border gateway routing protocol)
BGP (border gateway routing protocol)BGP (border gateway routing protocol)
BGP (border gateway routing protocol)Netwax Lab
 
Open shortest path first (ospf)
Open shortest path first (ospf)Open shortest path first (ospf)
Open shortest path first (ospf)Respa Peter
 
MPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - BasicMPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - BasicEricsson
 
Segment Routing Lab
Segment Routing Lab Segment Routing Lab
Segment Routing Lab Cisco Canada
 
Routing Information Protocol (RIP)
Routing Information Protocol (RIP)Routing Information Protocol (RIP)
Routing Information Protocol (RIP)Tharindu Sankalpa
 
OSPF- Multi area
OSPF- Multi area OSPF- Multi area
OSPF- Multi area Ahmed Ali
 

What's hot (20)

CCNA ppt Day 1
CCNA ppt Day 1CCNA ppt Day 1
CCNA ppt Day 1
 
Dynamic routing
Dynamic routingDynamic routing
Dynamic routing
 
MPLS L3 VPN Deployment
MPLS L3 VPN DeploymentMPLS L3 VPN Deployment
MPLS L3 VPN Deployment
 
Eigrp.ppt
Eigrp.pptEigrp.ppt
Eigrp.ppt
 
EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)
 
OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)
 
Dynamic Routing IGRP
Dynamic Routing IGRPDynamic Routing IGRP
Dynamic Routing IGRP
 
Eigrp new
Eigrp newEigrp new
Eigrp new
 
Day 3 ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)
Day 3 ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)Day 3 ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)
Day 3 ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)
 
BGP (border gateway routing protocol)
BGP (border gateway routing protocol)BGP (border gateway routing protocol)
BGP (border gateway routing protocol)
 
Open shortest path first (ospf)
Open shortest path first (ospf)Open shortest path first (ospf)
Open shortest path first (ospf)
 
BGP
BGP BGP
BGP
 
MPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - BasicMPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - Basic
 
Segment Routing Lab
Segment Routing Lab Segment Routing Lab
Segment Routing Lab
 
OSPF Overview
OSPF OverviewOSPF Overview
OSPF Overview
 
Routing Information Protocol (RIP)
Routing Information Protocol (RIP)Routing Information Protocol (RIP)
Routing Information Protocol (RIP)
 
OSPF Fundamental
OSPF FundamentalOSPF Fundamental
OSPF Fundamental
 
OSPF Basics
OSPF BasicsOSPF Basics
OSPF Basics
 
IS-IS Protocol
IS-IS ProtocolIS-IS Protocol
IS-IS Protocol
 
OSPF- Multi area
OSPF- Multi area OSPF- Multi area
OSPF- Multi area
 

Viewers also liked

Viewers also liked (20)

Multi-Area OSPF on IOS XR
Multi-Area OSPF on IOS XRMulti-Area OSPF on IOS XR
Multi-Area OSPF on IOS XR
 
Multi-area ospf adjacency on ios-xr
Multi-area ospf adjacency on ios-xrMulti-area ospf adjacency on ios-xr
Multi-area ospf adjacency on ios-xr
 
OSPF - Routing Protocol
OSPF - Routing ProtocolOSPF - Routing Protocol
OSPF - Routing Protocol
 
Auto summarization in EIGRP
Auto summarization in EIGRPAuto summarization in EIGRP
Auto summarization in EIGRP
 
OSPF
OSPFOSPF
OSPF
 
Routing Information Protocol
Routing Information ProtocolRouting Information Protocol
Routing Information Protocol
 
CCNA/Networking
CCNA/NetworkingCCNA/Networking
CCNA/Networking
 
Eigrp
EigrpEigrp
Eigrp
 
Eigrp
EigrpEigrp
Eigrp
 
Routing Information Protocol
Routing Information ProtocolRouting Information Protocol
Routing Information Protocol
 
Routing Protocols and Concepts: Ch5 - Routing Information Protocol (RIP v1)
Routing Protocols and Concepts: Ch5 - Routing Information Protocol (RIP v1)Routing Protocols and Concepts: Ch5 - Routing Information Protocol (RIP v1)
Routing Protocols and Concepts: Ch5 - Routing Information Protocol (RIP v1)
 
Ch13
Ch13Ch13
Ch13
 
Introduction to Business Management
Introduction to Business Management Introduction to Business Management
Introduction to Business Management
 
Chapter 06 - Routing
Chapter 06 - RoutingChapter 06 - Routing
Chapter 06 - Routing
 
Border Gateway Protocol
Border Gateway ProtocolBorder Gateway Protocol
Border Gateway Protocol
 
Routing Protocols and Concepts: Ch9 - EIGRP
Routing Protocols and Concepts: Ch9 - EIGRPRouting Protocols and Concepts: Ch9 - EIGRP
Routing Protocols and Concepts: Ch9 - EIGRP
 
Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1Routing Protocols and Concepts - Chapter 1
Routing Protocols and Concepts - Chapter 1
 
1.1 introduction to business management
1.1 introduction to business management1.1 introduction to business management
1.1 introduction to business management
 
Routing Information Protocol (RIP)
Routing Information Protocol(RIP)Routing Information Protocol(RIP)
Routing Information Protocol (RIP)
 
EIGRP
EIGRPEIGRP
EIGRP
 

Similar to ospf routing protocol

Similar to ospf routing protocol (20)

module11-ospf.ppt
module11-ospf.pptmodule11-ospf.ppt
module11-ospf.ppt
 
module11-ospf(Open Shortest Path First).ppt
module11-ospf(Open Shortest Path First).pptmodule11-ospf(Open Shortest Path First).ppt
module11-ospf(Open Shortest Path First).ppt
 
Ospf
OspfOspf
Ospf
 
Dynamic Routing Protocol OSPF
Dynamic Routing Protocol OSPFDynamic Routing Protocol OSPF
Dynamic Routing Protocol OSPF
 
An intoroduction to the IS-IS IGP routing protocol
An intoroduction to the IS-IS IGP routing protocolAn intoroduction to the IS-IS IGP routing protocol
An intoroduction to the IS-IS IGP routing protocol
 
ch2_p3_ospf.pptx
ch2_p3_ospf.pptxch2_p3_ospf.pptx
ch2_p3_ospf.pptx
 
CSC427_Week_11.pdf
CSC427_Week_11.pdfCSC427_Week_11.pdf
CSC427_Week_11.pdf
 
Cisco ospf
Cisco ospf Cisco ospf
Cisco ospf
 
OSPF.pptx
OSPF.pptxOSPF.pptx
OSPF.pptx
 
Dynamic routing
Dynamic routingDynamic routing
Dynamic routing
 
Link state routing protocol
Link state routing protocolLink state routing protocol
Link state routing protocol
 
OSPF v3
OSPF v3OSPF v3
OSPF v3
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
 
ospf.ppt
ospf.pptospf.ppt
ospf.ppt
 
Menggali Lebih Dalam tentang OSPF: Protokol Routing Dinamis yang Efisien.ppt
Menggali Lebih Dalam tentang OSPF: Protokol Routing Dinamis yang Efisien.pptMenggali Lebih Dalam tentang OSPF: Protokol Routing Dinamis yang Efisien.ppt
Menggali Lebih Dalam tentang OSPF: Protokol Routing Dinamis yang Efisien.ppt
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
 
Ccna day3-140715152337-phpapp01
Ccna day3-140715152337-phpapp01Ccna day3-140715152337-phpapp01
Ccna day3-140715152337-phpapp01
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
 
Ospfv3 primer
Ospfv3 primerOspfv3 primer
Ospfv3 primer
 

Recently uploaded

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 

Recently uploaded (20)

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

ospf routing protocol

  • 2. 2 Link State Routing: Basic princples 1. Each router establishes a relationship (“adjacency”) with its neighbors 2.Each router generates link state advertisements (LSAs) which are distributed to all routers LSA = (link id, state of the link, cost, neighbors of the link) 3. Each router maintains a database of all received LSAs (topological database or link state database), which describes the network has a graph with weighted edges 4. Each router uses its link state database to run a shortest path algorithm (Dijikstra’s algorithm) to produce the shortest path to each network
  • 3. 3 OSPF • OSPF = Open Shortest Path First • The OSPF routing protocol is the most important link state routing protocol on the Internet • History: – 1989: RFC 1131 OSPF Version 1 – 1991: RFC1247 OSPF Version 2 – 1994: RFC 1583 OSPF Version 2 (revised) – 1997: RFC 2178 OSPF Version 2 (revised) – 1998: RFC 2328 OSPF Version 2 (current version)
  • 4. 4 Features of OSPF • Provides authentication of routing messages • Enables load balancing by allowing traffic to be split evenly across routes with equal cost • Type-of-Service routing allows to setup different routes dependent on the TOS field • Supports subnetting • Supports multicasting • Allows hierarchical routing
  • 5. 5 Example Network 10.1.1.0/24 .1 .2 .2 10.10.10.1 10.1.4.0/24 10.1.2.0/24 .1 .4 10.1.7.0/24 10.1.6.0/24 10.1.3.0/24 10.1.5.0/24 10.1.8.0/24 .3 .3 .5 .2 .3 .5 .5 .4 .4 .6 .6 10.10.10.2 10.10.10.4 10.10.10.6 10.10.10.2 10.10.10.5 Router IDs are selected independent of interface addresses 3 4 2 5 1 1 32 •Link costs are called Metric • Metric is in the range [0 , 216 ] • Metric can be asymmetric
  • 6. 6 10.1.1.0/24 .1 .2 .2 10.10.10.1 10.1.4.0/24 10.1.2.0/24 .1 10.1.3.0/24 10.1.5.0/24.3 .3 .2 .3 10.10.10.2 10.10.10.3 Link State Advertisement (LSA) • The LSA of router 10.10.10.1 is as follows: • Link State ID: 10.10.10.1 = Router ID • Advertising Router: 10.10.10.1 = Router ID • Number of links: 3 = 2 links plus router itself • Description of Link 1: Link ID = 10.1.1.1, Metric = 4 • Description of Link 2: Link ID = 10.1.2.1, Metric = 3 • Description of Link 3: Link ID = 10.10.10.1, Metric = 0 3 4 2 Each router sends its LSA to all routers in the network (using a method called reliable flooding)
  • 7. 7 Network and Link State Database 10.1.1.0/24 .1 .2 .2 10.10.10.1 10.1.4.0/24 10.1.2.0/24 .1 .4 10.1.7.0/24 10.1.6.0/24 10.1.3.0/24 10.1.5.0/24 10.1.8.0/24 .3 .3 .5 .2 .3 .5 .5 .4 .4 .6 .6 10.10.10.2 10.10.10.4 10.10.10.6 10.10.10.2 10.10.10.5 LS Type Link StateID Adv. Router Checksum LS SeqNo LS Age Router-LSA 10.1.10.1 10.1.10.1 0x9b47 0x80000006 0 Router-LSA 10.1.10.2 10.1.10.2 0x219e 0x80000007 1618 Router-LSA 10.1.10.3 10.1.10.3 0x6b53 0x80000003 1712 Router-LSA 10.1.10.4 10.1.10.4 0xe39a 0x8000003a 20 Router-LSA 10.1.10.5 10.1.10.5 0xd2a6 0x80000038 18 Router-LSA 10.1.10.6 10.1.10.6 0x05c3 0x80000005 1680 Each router has a database which contains the LSAs from all other routers
  • 8. 8 Link State Database • The collection of all LSAs is called the link-state database • Each router has and identical link-state database – Useful for debugging: Each router has a complete description of the network • If neighboring routers discover each other for the first time, they will exchange their link-state databases • The link-state databases are synchronized using reliable flooding
  • 9. 9 OSPF Packet Format OSPFMessageIPheader BodyofOSPFMessage OSPFMessage Header MessageType SpecificData LSA LSALSA ... LSA Header LSA Data ... Destination IP: neighbor’s IP address or 224.0.0.5 (ALLSPFRouters) or 224.0.0.6 (AllDRouters) OSPF packets are not carried as UDP payload! OSPF has its own IP protocol number: 89
  • 10. 10 OSPF Packet Format sourcerouterIPaddress authentication authentication 32bits version type messagelength AreaID checksum authenticationtype BodyofOSPFMessage OSPFMessage Header 2: current version is OSPF V2 Message types: 1: Hello (tests reachability) 2: Database description 3: Link Status request 4: Link state update 5: Link state acknowledgement ID of the Area from which the packet originated Standard IP checksum taken over entire packet 0: no authentication 1: Cleartext password 2: MD5 checksum (added to end packet) Authentication passwd = 1: 64 cleartext password Authentication passwd = 2: 0x0000 (16 bits) KeyID (8 bits) Length of MD5 checksum (8 bits) Nondecreasing sequence number (32 bits) Prevents replay attacks
  • 11. 11 OSPF LSA Format LinkStateID linksequencenumber advertisingrouter LinkAge LinkType checksum length LinkID LinkData LinkType Metric#TOSmetrics LSA LSA Header LSA Data LinkID LinkData LinkType Metric#TOSmetrics LSA Header Link 1 Link 2
  • 12. 12 Discovery of Neighbors • Routers multicasts OSPF Hello packets on all OSPF-enabled interfaces. • If two routers share a link, they can become neighbors, and establish an adjacency • After becoming a neighbor, routers exchange their link state databases OSPFHello OSPFHello:Iheard10.1.10.2 10.1.10.1 10.1.10.2 Scenario: Router 10.1.10.2 restarts
  • 13. 13 Neighbor discovery and database synchronization OSPFHello OSPFHello:Iheard10.1.10.2 DatabaseDescription:Sequence=X 10.1.10.1 10.1.10.2 DatabaseDescription:Sequence=X, 5LSAheaders= Router-LSA,10.1.10.1,0x80000006 Router-LSA, 10.1.10.2,0x80000007 Router-LSA, 10.1.10.3,0x80000003 Router-LSA, 10.1.10.4,0x8000003a Router-LSA, 10.1.10.5,0x80000038 Router-LSA, 10.1.10.6,0x80000005 DatabaseDescription:Sequence=X+1,1 LSAheader= Router-LSA, 10.1.10.2,0x80000005 DatabaseDescription:Sequence=X+1 Sends empty database description Scenario: Router 10.1.10.2 restarts Discovery of adjacency Sends database description. (description only contains LSA headers) Database description of 10.1.10.2 Acknowledges receipt of description After neighbors are discovered the nodes exchange their databases
  • 14. 14 Regular LSA exchanges 10.1.10.1 10.1.10.2 LinkStateRequestpackets, LSAs= Router-LSA, 10.1.10.1, Router-LSA, 10.1.10.2, Router-LSA, 10.1.10.3, Router-LSA, 10.1.10.4, Router-LSA, 10.1.10.5, Router-LSA, 10.1.10.6, LinkStateUpdatePacket, LSA = Router-LSA, 10.1.1.6,0x80000006 LinkStateUpdatePacket, LSAs = Router-LSA,10.1.10.1, 0x80000006 Router-LSA,10.1.10.2,0x80000007 Router-LSA,10.1.10.3,0x80000003 Router-LSA,10.1.10.4,0x8000003a Router-LSA,10.1.10.5,0x80000038 Router-LSA,10.1.10.6,0x80000005 10.1.10.2 explicitly requests each LSA from 10.1.10.1 10.1.10.1 sends requested LSAs 10.1.10.2 has more recent value for 10.0.1.6 and sends it to 10.1.10.1 (with higher sequence number)
  • 15. 15 Routing Data Distribution • LSA-Updates are distributed to all other routers via Reliable Flooding • Example: Flooding of LSA from 10.10.10.1 10.10.10.1 10.10.10.2 10.10.10.4 10.10.10.6 10.10.10.2 10.10.10.5 LSA LSA Update database Update database ACK ACK LSA LSA LSA LSA ACK ACK ACK ACK LSA LSA LSA LSA Update database Update database ACK ACK ACK ACK Update database
  • 16. 16 Dissemination of LSA-Update • A router sends and refloods LSA-Updates, whenever the topology or link cost changes. (If a received LSA does not contain new information, the router will not flood the packet) • Exception: Infrequently (every 30 minutes), a router will flood LSAs even if there are not new changes. • Acknowledgements of LSA-updates: • explicit ACK, or • implicit via reception of an LSA-Update