SlideShare a Scribd company logo
1 of 26
1
Relates to Lab 4. This module covers link state
routing and the Open Shortest Path First (OSPF)
routing protocol.
Dynamic Routing Protocols II
OSPF
2
Distance Vector vs. Link State Routing
• With distance vector routing, each node has information only
about the next hop:
• Node A: to reach F go to B
• Node B: to reach F go to D
• Node D: to reach F go to E
• Node E: go directly to F
• Distance vector routing makes
poor routing decisions if
directions are not completely
correct
(e.g., because a node is down).
• If parts of the directions incorrect, the routing may be incorrect until the
routing algorithms has re-converged.
A B C
D E F
3
Distance Vector vs. Link State Routing
• In link state routing, each node has a complete map of the
topology
• If a node fails, each
node can calculate
the new route
• Difficulty: All nodes need to
have a consistent view of the
network
A B C
D E F
A B C
D E F
A B C
D E F
A B C
D E F
A B C
D E F
A B C
D E F
A B C
D E F
4
Link State Routing: Properties
• Each node requires complete topology information
• Link state information must be flooded to all nodes
• Guaranteed to converge
5
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 as 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
6
Operation of a Link State Routing protocol
Received
LSAs
IP Routing
Table
Dijkstra’s
Algorithm
Link State
Database
LSAs are flooded
to other interfaces
7
Dijkstra’s Shortest Path Algorithm for a Graph
Input: Graph (N,E) with
N the set of nodes and E the set of edges
dvw link cost (dvw = infinity if (v,w)  E, dvv = 0)
s source node.
Output: Dn cost of the least-cost path from node s to node n
M = {s};
for each n  M
Dn = dsn;
while (M  all nodes) do
Find w  M for which Dw = min{Dj ; j  M};
Add w to M;
for each n  M
Dn = minw [ Dn, Dw + dwn ];
Update route;
enddo
8
OSPF
• OSPF = Open Shortest Path First
• The OSPF routing protocol is the most important link state
routing protocol on the Internet
• The complexity of OSPF is significant
• 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)
9
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
10
Example Network
10.1.1.0 / 24
.1 .2 .2
10.10.10.1
10.1.4.0 / 24
1
0
.
1
.
2
.
0
/
2
4
.1
.4
10.1.7.0 / 24
10.1.6.0
/
24
10.1.3.0
/
24
10.1.5.0/24
1
0
.
1
.
8
.
0
/
2
4
.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
3
2
•Link costs are called Metric
• Metric is in the range [0 , 216]
• Metric can be asymmetric
11
10.1.1.0 / 24
.1 .2 .2
10.10.10.1
10.1.4.0 / 24
1
0
.
1
.
2
.
0
/
2
4
.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 = can be 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)
12
Network and Link State Database
10.1.1.0 / 24
.1 .2 .2
10.10.10.1
10.1.4.0 / 24
1
0
.
1
.
2
.
0
/
2
4
.1
.4
10.1.7.0 / 24
10.1.6.0
/
24
10.1.3.0
/
24
10.1.5.0/24
1
0
.
1
.
8
.
0
/
2
4
.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
Each router has a
database which
contains the LSAs
from all other routers
13
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
14
OSPF Packet Format
OSPF Message
IP header
Body of OSPF Message
OSPF Message
Header
Message Type
Specific Data
LSA LSA
LSA ...
LSA
Header
LSA
Data
...
Destination IP: neighbor’s IP address or 224.0.0.5
(ALLSPFRouters) or 224.0.0.6 (AllDRouters)
TTL: set to 1 (in most cases)
OSPF packets are not
carried as UDP payload!
OSPF has its own IP
protocol number: 89
15
OSPF Packet Format
source router IP address
authentication
authentication
32 bits
version type message length
Area ID
checksum authentication type
Body of OSPF Message
OSPF Message
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
16
OSPF LSA Format
Link State ID
link sequence number
advertising router
Link Age Link Type
checksum length
Link ID
Link Data
Link Type Metric
#TOS metrics
LSA
LSA
Header
LSA
Data
Link ID
Link Data
Link Type Metric
#TOS metrics
LSA
Header
Link 1
Link 2
17
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
OSPF Hello
OSPF Hello: Iheard 10.1.10.2
10.1.10.1 10.1.10.2
Scenario:
Router 10.1.10.2 restarts
18
Neighbor discovery and
database synchronization
OSPF Hello
OSPF Hello: I heard 10.1.10.2
Database Description: Sequence = X
10.1.10.1 10.1.10.2
Database Description: Sequence = X, 5 LSA headers =
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
Database Description: Sequence = X+1, 1 LSA header=
Router-LSA, 10.1.10.2, 0x80000005
Database Description: 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
19
Regular LSA exchanges
10.1.10.1 10.1.10.2
Link State Request packets, 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,
Link State Update Packet, LSA =
Router-LSA, 10.1.1.6, 0x80000006
Link State Update Packet, 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)
20
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
Update
database
Update
database
ACK
LSA
LSA LSA
Update
database
Update
database
ACK
Update
database
21
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 no new changes.
• Acknowledgements of LSA-updates:
• explicit ACK, or
• implicit via reception of an LSA-Update
22
Autonomous Systems
• An autonomous system is a region of the Internet that is
administered by a single entity.
• Examples of autonomous regions are:
• UVA’s campus network
• MCI’s backbone network
• Regional Internet Service Provider
• Routing is done differently within an autonomous system
(intradomain routing) and between autonomous system
(interdomain routing).
23
Autonomous Systems (AS)
Ethernet
Router
Ethernet
Ethernet
Router
Router
Ethernet
Ethernet
Ethernet
Router
Router
Router
Autonomous
System 2
Autonomous
System 1
24
BGP
• BGP = Border Gateway Protocol
• Currently in version 4
• Note: In the context of BGP, a gateway is nothing else but an
IP router that connects autonomous systems.
• Interdomain routing protocol for routing between autonomous
systems
• Uses TCP to send routing messages
• BGP is neither a link state, nor a distance vector protocol.
Routing messages in BGP contain complete routes.
• Network administrators can specify routing policies
25
BGP
• BGP’s goal is to find any path (not an optimal one). Since the
internals of the AS are never revealed, finding an optimal path
is not feasible.
• For each autonomous system (AS), BGP distinguishes:
• local traffic = traffic with source or destination in AS
• transit traffic = traffic that passes through the AS
• Stub AS = has connection to only one AS, only
carry local traffic
• Multihomed AS = has connection to >1 AS, but does
not carry transit traffic
• Transit AS = has connection to >1 AS and carries
transit traffic
26
BGP
AS 1 AS 2
AS 3
Router
AS 4
Router
Router Router
Router
Router
Router

More Related Content

Similar to module11-ospf.ppt

OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)Ann Joseph
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint onepqatester
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint onepqatester
 
Dynamic Routing All Algorithms, Working And Basics
Dynamic Routing All Algorithms, Working And BasicsDynamic Routing All Algorithms, Working And Basics
Dynamic Routing All Algorithms, Working And BasicsHarsh Mehta
 
Introduction to Computer Networks
Introduction to Computer NetworksIntroduction to Computer Networks
Introduction to Computer NetworksVenkatesh Iyer
 
Intro 2 Computer Networks
Intro 2 Computer NetworksIntro 2 Computer Networks
Intro 2 Computer Networksrakeshgoswami
 
ospf.ppt
ospf.pptospf.ppt
ospf.pptSolWeje
 
Module_3_Part_3.pptx
Module_3_Part_3.pptxModule_3_Part_3.pptx
Module_3_Part_3.pptxKPDDRAVIDIAN
 
Ars msr 1-intradomain
Ars msr 1-intradomainArs msr 1-intradomain
Ars msr 1-intradomainNarcisIlie1
 
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.pptRochmadGSaputra
 
Ccna 2 chapter 10 v4.0 answers 2011
Ccna 2 chapter 10 v4.0 answers 2011Ccna 2 chapter 10 v4.0 answers 2011
Ccna 2 chapter 10 v4.0 answers 2011Dân Chơi
 
Lecture 25 Link Layer - Error detection and Multiple Access.pptx
Lecture 25 Link Layer - Error detection and Multiple Access.pptxLecture 25 Link Layer - Error detection and Multiple Access.pptx
Lecture 25 Link Layer - Error detection and Multiple Access.pptxHanzlaNaveed1
 

Similar to module11-ospf.ppt (20)

OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint one
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint one
 
Dynamic Routing All Algorithms, Working And Basics
Dynamic Routing All Algorithms, Working And BasicsDynamic Routing All Algorithms, Working And Basics
Dynamic Routing All Algorithms, Working And Basics
 
Chapter 4 v6.11
Chapter 4 v6.11Chapter 4 v6.11
Chapter 4 v6.11
 
Introduction to Computer Networks
Introduction to Computer NetworksIntroduction to Computer Networks
Introduction to Computer Networks
 
Intro 2 Computer Networks
Intro 2 Computer NetworksIntro 2 Computer Networks
Intro 2 Computer Networks
 
ospf.ppt
ospf.pptospf.ppt
ospf.ppt
 
Module_3_Part_3.pptx
Module_3_Part_3.pptxModule_3_Part_3.pptx
Module_3_Part_3.pptx
 
Ospf
OspfOspf
Ospf
 
Routing
RoutingRouting
Routing
 
Ars msr 1-intradomain
Ars msr 1-intradomainArs msr 1-intradomain
Ars msr 1-intradomain
 
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
 
ospf.ppt
ospf.pptospf.ppt
ospf.ppt
 
OSPF v3
OSPF v3OSPF v3
OSPF v3
 
Ccna 2 chapter 10 v4.0 answers 2011
Ccna 2 chapter 10 v4.0 answers 2011Ccna 2 chapter 10 v4.0 answers 2011
Ccna 2 chapter 10 v4.0 answers 2011
 
Link state routing protocol
Link state routing protocolLink state routing protocol
Link state routing protocol
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
 
Lecture 25 Link Layer - Error detection and Multiple Access.pptx
Lecture 25 Link Layer - Error detection and Multiple Access.pptxLecture 25 Link Layer - Error detection and Multiple Access.pptx
Lecture 25 Link Layer - Error detection and Multiple Access.pptx
 
Networking basics
Networking basicsNetworking basics
Networking basics
 

Recently uploaded

Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
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
 
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🔝
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 

module11-ospf.ppt

  • 1. 1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF
  • 2. 2 Distance Vector vs. Link State Routing • With distance vector routing, each node has information only about the next hop: • Node A: to reach F go to B • Node B: to reach F go to D • Node D: to reach F go to E • Node E: go directly to F • Distance vector routing makes poor routing decisions if directions are not completely correct (e.g., because a node is down). • If parts of the directions incorrect, the routing may be incorrect until the routing algorithms has re-converged. A B C D E F
  • 3. 3 Distance Vector vs. Link State Routing • In link state routing, each node has a complete map of the topology • If a node fails, each node can calculate the new route • Difficulty: All nodes need to have a consistent view of the network A B C D E F A B C D E F A B C D E F A B C D E F A B C D E F A B C D E F A B C D E F
  • 4. 4 Link State Routing: Properties • Each node requires complete topology information • Link state information must be flooded to all nodes • Guaranteed to converge
  • 5. 5 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 as 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
  • 6. 6 Operation of a Link State Routing protocol Received LSAs IP Routing Table Dijkstra’s Algorithm Link State Database LSAs are flooded to other interfaces
  • 7. 7 Dijkstra’s Shortest Path Algorithm for a Graph Input: Graph (N,E) with N the set of nodes and E the set of edges dvw link cost (dvw = infinity if (v,w)  E, dvv = 0) s source node. Output: Dn cost of the least-cost path from node s to node n M = {s}; for each n  M Dn = dsn; while (M  all nodes) do Find w  M for which Dw = min{Dj ; j  M}; Add w to M; for each n  M Dn = minw [ Dn, Dw + dwn ]; Update route; enddo
  • 8. 8 OSPF • OSPF = Open Shortest Path First • The OSPF routing protocol is the most important link state routing protocol on the Internet • The complexity of OSPF is significant • 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)
  • 9. 9 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
  • 10. 10 Example Network 10.1.1.0 / 24 .1 .2 .2 10.10.10.1 10.1.4.0 / 24 1 0 . 1 . 2 . 0 / 2 4 .1 .4 10.1.7.0 / 24 10.1.6.0 / 24 10.1.3.0 / 24 10.1.5.0/24 1 0 . 1 . 8 . 0 / 2 4 .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 3 2 •Link costs are called Metric • Metric is in the range [0 , 216] • Metric can be asymmetric
  • 11. 11 10.1.1.0 / 24 .1 .2 .2 10.10.10.1 10.1.4.0 / 24 1 0 . 1 . 2 . 0 / 2 4 .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 = can be 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)
  • 12. 12 Network and Link State Database 10.1.1.0 / 24 .1 .2 .2 10.10.10.1 10.1.4.0 / 24 1 0 . 1 . 2 . 0 / 2 4 .1 .4 10.1.7.0 / 24 10.1.6.0 / 24 10.1.3.0 / 24 10.1.5.0/24 1 0 . 1 . 8 . 0 / 2 4 .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 Each router has a database which contains the LSAs from all other routers
  • 13. 13 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
  • 14. 14 OSPF Packet Format OSPF Message IP header Body of OSPF Message OSPF Message Header Message Type Specific Data LSA LSA LSA ... LSA Header LSA Data ... Destination IP: neighbor’s IP address or 224.0.0.5 (ALLSPFRouters) or 224.0.0.6 (AllDRouters) TTL: set to 1 (in most cases) OSPF packets are not carried as UDP payload! OSPF has its own IP protocol number: 89
  • 15. 15 OSPF Packet Format source router IP address authentication authentication 32 bits version type message length Area ID checksum authentication type Body of OSPF Message OSPF Message 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
  • 16. 16 OSPF LSA Format Link State ID link sequence number advertising router Link Age Link Type checksum length Link ID Link Data Link Type Metric #TOS metrics LSA LSA Header LSA Data Link ID Link Data Link Type Metric #TOS metrics LSA Header Link 1 Link 2
  • 17. 17 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 OSPF Hello OSPF Hello: Iheard 10.1.10.2 10.1.10.1 10.1.10.2 Scenario: Router 10.1.10.2 restarts
  • 18. 18 Neighbor discovery and database synchronization OSPF Hello OSPF Hello: I heard 10.1.10.2 Database Description: Sequence = X 10.1.10.1 10.1.10.2 Database Description: Sequence = X, 5 LSA headers = 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 Database Description: Sequence = X+1, 1 LSA header= Router-LSA, 10.1.10.2, 0x80000005 Database Description: 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
  • 19. 19 Regular LSA exchanges 10.1.10.1 10.1.10.2 Link State Request packets, 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, Link State Update Packet, LSA = Router-LSA, 10.1.1.6, 0x80000006 Link State Update Packet, 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)
  • 20. 20 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 Update database Update database ACK LSA LSA LSA Update database Update database ACK Update database
  • 21. 21 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 no new changes. • Acknowledgements of LSA-updates: • explicit ACK, or • implicit via reception of an LSA-Update
  • 22. 22 Autonomous Systems • An autonomous system is a region of the Internet that is administered by a single entity. • Examples of autonomous regions are: • UVA’s campus network • MCI’s backbone network • Regional Internet Service Provider • Routing is done differently within an autonomous system (intradomain routing) and between autonomous system (interdomain routing).
  • 24. 24 BGP • BGP = Border Gateway Protocol • Currently in version 4 • Note: In the context of BGP, a gateway is nothing else but an IP router that connects autonomous systems. • Interdomain routing protocol for routing between autonomous systems • Uses TCP to send routing messages • BGP is neither a link state, nor a distance vector protocol. Routing messages in BGP contain complete routes. • Network administrators can specify routing policies
  • 25. 25 BGP • BGP’s goal is to find any path (not an optimal one). Since the internals of the AS are never revealed, finding an optimal path is not feasible. • For each autonomous system (AS), BGP distinguishes: • local traffic = traffic with source or destination in AS • transit traffic = traffic that passes through the AS • Stub AS = has connection to only one AS, only carry local traffic • Multihomed AS = has connection to >1 AS, but does not carry transit traffic • Transit AS = has connection to >1 AS and carries transit traffic
  • 26. 26 BGP AS 1 AS 2 AS 3 Router AS 4 Router Router Router Router Router Router