SlideShare a Scribd company logo
Guest Lecture
On
Routing Algorithms
Nilesh U. Sambhe
Assistant Professor, Department Of Computer Technology,
Yeshwantrao Chavan College Of Engineering, Nagpur
1
Outline
• Routing Algorithm
• Shortest Path Routing
• Flow Based Routing
• Flooding
• Distance Vector Routing
• Link State Routing
• Hierarchical Routing
2
Routing is the process of forwarding of a packet in a network so that it
reaches its intended destination.
•Correctness: The routing should be done properly and correctly so that the packets may reach
their proper destination.
•Simplicity: The routing should be done in a simple manner so that the overhead is as
low as possible. With increasing complexity of the routing algorithms the overhead also
increases.
•Robustness: Once a major network becomes operative, it may be expected to run continuously
for years without any failures. The algorithms designed for routing should be robust enough to
handle hardware and software failures and should be able to cope with changes in the topology
and traffic without requiring all jobs in all hosts to be aborted and the network rebooted every
time some router goes down.
Properties Of Routing Algorithm
3
• Stability: The routing algorithms should be stable under all possible circumstances.
• Fairness: Every node connected to the network should get a fair chance of
transmitting their packets. this is generally done on a first come first serve basis.
• Optimality: The routing algorithms should be optimal in terms of throughput and
minimizing mean packet delays. here there is a trade-off and one has to choose
depending on his suitability.
4
Types Of Routing Algorithms
• Nonadaptive (Static)
• Do not use measurements of current conditions
• Static routes are downloaded at boot time
• Adaptive Algorithms
• Change routes dynamically
• Gather information at runtime
• locally
• from adjacent routers
• from all other routers
• Change routes
• Every delta T seconds
• When load changes
• When topology changes
5
d3 > d2
as
d1 + d3 > d1 + d2
I  
K
J
Optimal path from I to K over J
d1
d2
distance
d1 + d2 is minimal
d3
Other path from J to K
Set of all optimal routes
• from all sources
• to a given destination
is a tree: sink tree
Optimality Principle
6
(A) A SUBNET. (B) A SINK TREE FOR ROUTER B. 7
• The set of optimal routes to a particular node forms a sink tree.
• Sink trees are not necessarily unique.
• Goal of all routing algorithms
• Discover sink trees for all destinations
Dijkstra’s Algorithm
A
B C
E F
D
G H
1
2
2
6 4
2
7
3
3
2
2
Each node is labeled (in parentheses) with its distance from the source
node along the best known path.
(Cont’d)
• We want to find the shortest path from A to D.
• Initially, no paths are known, so all nodes are labeled with infinity.
A
B(∞,−) C(∞,−)
E(∞,−) F(∞,−)
D(∞,−)
G(∞,−) H(∞,−)
(Cont’d)
• We start out by marking node A (the working node) as permanent.
• We examine each of the nodes adjacent a, relabeling each one
with the distance to a.
A
B(2, A) C(∞,−)
E(∞,−) F(∞,−)
D(∞,−)
G(6, A) H(∞,−)
2
6
(Cont’d)
A
B(2, A) C(∞,−)
E(∞,−) F(∞,−)
D(∞,−)
G(6, A) H(∞,−)
We make B with the smallest label permanent.
B becomes the new working node.
(Cont’d)
A
B(2, A) C(9, Β)
E(4, B) F(∞,−)
D(∞,−)
G(6, A) H(∞,−)
2
7
We examine each of the nodes adjacent B, relabeling each one with the
distance to B.
(Cont’d)
A
B(2, A) C(9, B)
E(4, B) F(∞,−)
D(∞,−)
G(6, A) H(∞,−)
We make E with the smallest label permanent.
E becomes the new working node.
E(4, B)
(Cont’d)
1 2
A
B(2, A) C(9, B)
F(6, Ε)
D(∞,−)
G(5, E) H(∞,−)
We examine each of the nodes adjacent E, relabeling each one with the distance
to E.
(Cont’d)
A
B(2, A) C(9, B)
E(4, B) F(6, E)
D(∞,−)
G(5, E) H(∞,−)
We make G with the smallest label permanent.
G becomes the new working node.
E(4, B)
(Cont’d)
4
A
B(2, A) C(9, B)
F(6, E)
D(∞,−)
G(5, E) H(9, G)
We examine each of the nodes adjacent G, relabeling each one with the
distance to G.
(Cont’d)
A
B(2, A) C(9, B)
E(4, B) F(6, E)
D(∞,−)
G(5, E) H(9, G)
We make F with the smallest label permanent.
F becomes the new working node.
E(4, B)
(Cont’d)
2
A
B(2, A) C(9, B)
F(6, E)
D(∞,−)
G(5, E) H(8, F)
3
We examine each of the nodes adjacent F, relabeling each one with the
distance to F.
(Cont’d)
A
B(2, A) C(9, B)
E(4, B) F(6, E)
D(∞,−)
G(5, E) H(8, F)
We make H with the smallest label permanent.
H becomes the new working node.
E(4, B)
(Cont’d)
2
A
B(2, A) C(9, B)
F(6, E)
D(10, F)
G(5, E) H(8, F)
We examine each of the nodes adjacent H, relabeling each one with the distance to H.
(Cont’d)
E(4, B)
A
B(2, A) C(9, B)
F(6, E)
D(10, F)
G(5, E) H(8, F)
We make C with the smallest label permanent. C becomes the new working
node.
(Cont’d)
E(4, B)
A
B(2, A) C(9, B)
F(6, E)
D(10, F)
G(5, E) H(8, F)
3
We examine each of the nodes adjacent C, relabeling each one with the distance
to C.
(Cont’d)
E(4, B)
A
B(2, A) C(9, B)
F(6, E)
D(10, F)
G(5, E) H(8, F)
We make D with the smallest label permanent. D becomes the new working
node.
(Cont’d)
E(4, B)
A
B(2, A) C(9, B)
F(6, E)
D(10, H)
G(5, E) H(8, F)
The shortest path from A to D follows.
Flow Based Routing Algorithm
25
•It is a non-adaptive routing algorithm.
•It takes into account both the topology and the load in this routing algorithm;
•We can estimate the flow between all pairs of routers.
•From the known average amount of traffic and the average length of a packet
you can compute the mean packet delays using queuing theory.
•Flow-based routing then seeks to find a routing table to minimize the average
packet delay through the subnet.
•Given the line capacity and the flow, we can determine the delay. It needs to
use the formula for delay time T.
Where, μ = Mean number of arrivals in packet/sec, 1/μ = The mean packet size
in the bits, and c = Line capacity (bits/s).
Routing: Flooding
• Every packet is sent out on every outgoing line except the one it
arrived at
• It is non adaptive algorithm.
26
27
28
29
• Every packet is sent out on every outgoing line except the one it arrived at
• Duplicates!! How to limit?
• Hop counter
• Decrement in each router
• Discard packet if counter is 0
• Sequence number in packet
• Avoid sending the same packet a second time
• Keep in each router per source a list of packets already seen
• Selective flooding
• Use only those lines that are going approximately in right direction
30
Routing: Flooding
Routing: Distance Vector
• Adaptive algorithm
• Exchange of info only with neighbours
• Data to be available in each router
• Routing table: per destination
• Distance
• Outgoing line
• Distance to all neighbours
31
ROUTING: DISTANCE VECTORRouting table for A
To cost via
A 0 -
B 12 B
C 25 B
D 40 B
E 14 E
F 23 E
G 18 B
H 17 J
I 21 E
J 9 J
K 24 J
L 29 J 32
• Algorithm
• At each step within a router:
• Get routing tables from neighbours
• Compute distance to neighbours
• Compute new routing table
33
ROUTING: DISTANCE VECTORRouting tables from
34
Better?
• Keep 4 tables (one for each neighbour)
• Use shortest path
35
Count To Infinity Problem
Good news:
• A comes up again
Only distances to A
Faster not possible!!!
36
Bad news:
• A goes down
B receives:
• Distance ∞ from A
• Distance 2 from C
New distance from B to A: 3 via C
37
Bad news:
• A goes down
C still
• believes its distance to A is 2
• routes via B
B routes its packets for A via C
38
Bad news:
• A goes down
39
Routing: Link State
• Each router must
• Discover its neighbours and learn their network addresses
• Measure the delay or cost to each of its neighbours
• Construct a packet with these distances
• Send this packet to all other routers
• Compute the shortest path to every other router
40
41
Discovering your neighbors
• Send “hello” packet on each point-to-point line. Destination node
replies with its address.
42
Measuring line cost
• Send an “ECHO” packet over the line.
• Destination is required to respond to “echo” packet immediately.
• Measure the time required for this operation.
Building link state packets
• Packet containing:
• Identity of sender
• Sequence number + age
• For each neighbour: name + distance
43
Age in each packet:
• Decremented during flooding,
while used in router
• Age 0  info discarded
44
• Flooding
• Each router records the (source, seq. No.)
• Only flood and record packets from a source with higher seq.No. Than
previously recorded.
• Sequence numbers or router records of them can get corrupt.
• Include age after seq. No. And decrement it per second. Discard
packets with age zero.
Distributing the link state packets
Computing new routes
• With a full set of link state packets, a router can:
• Construct the entire subnet graph
• Run Dijkstra's algorithm to compute the shortest path to each
destination
• Problems for large subnets
• Memory to store data
• Compute time
45
Hierarchical Routing
• When network size increases…
• Larger stables
• More CPU time needed to compute …
• More bandwidth needed.
46
The Solution is to
•Routers grouped in regions
•Each routers knows how to reach:
• Other routers in its own group
• Other regions
47
Thank you
48

More Related Content

What's hot

Network layer - design Issues
Network layer - design IssuesNetwork layer - design Issues
Network layer - design Issues
قصي نسور
 
Network Layer design Issues.pptx
Network Layer design Issues.pptxNetwork Layer design Issues.pptx
Network Layer design Issues.pptx
Acad
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
Siddique Ibrahim
 
Network Layer
Network LayerNetwork Layer
Network Layer
Dr Shashikant Athawale
 
Presentation Routing algorithm
Presentation Routing algorithmPresentation Routing algorithm
Presentation Routing algorithm
Basit Hussain
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
Manoj Kumar
 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
guesta81d4b
 
Network Layer
Network LayerNetwork Layer
Network Layer
reshmadayma
 
Congestion control
Congestion controlCongestion control
Congestion control
Aman Jaiswal
 
Transport layer
Transport layer Transport layer
Transport layer
Mukesh Chinta
 
Selective repeat protocol
Selective repeat protocolSelective repeat protocol
Selective repeat protocol
Manusha Dilan
 
Sliding window protocol(ARQ technique)
Sliding window protocol(ARQ technique)Sliding window protocol(ARQ technique)
Sliding window protocol(ARQ technique)
shilpa patel
 
Application Layer
Application Layer Application Layer
Application Layer
Dr Shashikant Athawale
 
Osi reference model
Osi reference modelOsi reference model
Osi reference model
vasanthimuniasamy
 
Routing ppt
Routing pptRouting ppt
Routing ppt
ArpiSaxena1
 
Token ring
Token ringToken ring
Token ring
selvakumar_b1985
 
Computer network switching
Computer network switchingComputer network switching
Computer network switching
Shivani Godha
 
Link state routing protocol
Link state routing protocolLink state routing protocol
Link state routing protocol
Aung Thu Rha Hein
 
Recognition-of-tokens
Recognition-of-tokensRecognition-of-tokens
Recognition-of-tokens
Dattatray Gandhmal
 

What's hot (20)

Network layer - design Issues
Network layer - design IssuesNetwork layer - design Issues
Network layer - design Issues
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
Network Layer design Issues.pptx
Network Layer design Issues.pptxNetwork Layer design Issues.pptx
Network Layer design Issues.pptx
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Presentation Routing algorithm
Presentation Routing algorithmPresentation Routing algorithm
Presentation Routing algorithm
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Congestion control
Congestion controlCongestion control
Congestion control
 
Transport layer
Transport layer Transport layer
Transport layer
 
Selective repeat protocol
Selective repeat protocolSelective repeat protocol
Selective repeat protocol
 
Sliding window protocol(ARQ technique)
Sliding window protocol(ARQ technique)Sliding window protocol(ARQ technique)
Sliding window protocol(ARQ technique)
 
Application Layer
Application Layer Application Layer
Application Layer
 
Osi reference model
Osi reference modelOsi reference model
Osi reference model
 
Routing ppt
Routing pptRouting ppt
Routing ppt
 
Token ring
Token ringToken ring
Token ring
 
Computer network switching
Computer network switchingComputer network switching
Computer network switching
 
Link state routing protocol
Link state routing protocolLink state routing protocol
Link state routing protocol
 
Recognition-of-tokens
Recognition-of-tokensRecognition-of-tokens
Recognition-of-tokens
 

Similar to Routing algorithm network layer

Shortest path algorithm
Shortest  path algorithmShortest  path algorithm
Shortest path algorithm
Subrata Kumer Paul
 
NetworkAlgorithms.ppt
NetworkAlgorithms.pptNetworkAlgorithms.ppt
NetworkAlgorithms.ppt
21121A0594
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint onepqatester
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint onepqatester
 
routing algorithm
routing algorithmrouting algorithm
routing algorithm
AnusuaBasu
 
Part7-routing.pptx
Part7-routing.pptxPart7-routing.pptx
Part7-routing.pptx
Olivier Bonaventure
 
routing
routingrouting
routing
radhika477746
 
Routing
RoutingRouting
Routing
Saima Azam
 
UNIT2-nw layer autonomy.pptx
UNIT2-nw layer autonomy.pptxUNIT2-nw layer autonomy.pptx
UNIT2-nw layer autonomy.pptx
satvikpatil5
 
Network layer
Network layerNetwork layer
Network layer
TharuniDiddekunta
 
Dc ch11 : routing in switched networks
Dc ch11 : routing in switched networksDc ch11 : routing in switched networks
Dc ch11 : routing in switched networks
Syaiful Ahdan
 
Comparative Analysis of Distance Vector Routing & Link State Protocols
Comparative Analysis of Distance Vector Routing & Link State ProtocolsComparative Analysis of Distance Vector Routing & Link State Protocols
Comparative Analysis of Distance Vector Routing & Link State Protocols
East West University
 
Routing Presentation
Routing PresentationRouting Presentation
Routing Presentation
Mohsin Ali
 
NETWORK LAYER.ppt
NETWORK LAYER.pptNETWORK LAYER.ppt
NETWORK LAYER.ppt
DrTThendralCompSci
 
routing algo n
routing algo                                nrouting algo                                n
routing algo n
SwatiHans10
 
CPOSC Presentation 20091017
CPOSC Presentation 20091017CPOSC Presentation 20091017
CPOSC Presentation 20091017ericbeyeler
 
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
aishwaryaarrao3
 
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
mrcopyxerox
 

Similar to Routing algorithm network layer (20)

Shortest path algorithm
Shortest  path algorithmShortest  path algorithm
Shortest path algorithm
 
NetworkAlgorithms.ppt
NetworkAlgorithms.pptNetworkAlgorithms.ppt
NetworkAlgorithms.ppt
 
Lecture set 5
Lecture set 5Lecture set 5
Lecture set 5
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint one
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint one
 
routing algorithm
routing algorithmrouting algorithm
routing algorithm
 
12 routing
12 routing12 routing
12 routing
 
Part7-routing.pptx
Part7-routing.pptxPart7-routing.pptx
Part7-routing.pptx
 
routing
routingrouting
routing
 
Routing
RoutingRouting
Routing
 
UNIT2-nw layer autonomy.pptx
UNIT2-nw layer autonomy.pptxUNIT2-nw layer autonomy.pptx
UNIT2-nw layer autonomy.pptx
 
Network layer
Network layerNetwork layer
Network layer
 
Dc ch11 : routing in switched networks
Dc ch11 : routing in switched networksDc ch11 : routing in switched networks
Dc ch11 : routing in switched networks
 
Comparative Analysis of Distance Vector Routing & Link State Protocols
Comparative Analysis of Distance Vector Routing & Link State ProtocolsComparative Analysis of Distance Vector Routing & Link State Protocols
Comparative Analysis of Distance Vector Routing & Link State Protocols
 
Routing Presentation
Routing PresentationRouting Presentation
Routing Presentation
 
NETWORK LAYER.ppt
NETWORK LAYER.pptNETWORK LAYER.ppt
NETWORK LAYER.ppt
 
routing algo n
routing algo                                nrouting algo                                n
routing algo n
 
CPOSC Presentation 20091017
CPOSC Presentation 20091017CPOSC Presentation 20091017
CPOSC Presentation 20091017
 
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
 
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
 

Recently uploaded

Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
AkolbilaEmmanuel1
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 

Recently uploaded (20)

Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 

Routing algorithm network layer

  • 1. Guest Lecture On Routing Algorithms Nilesh U. Sambhe Assistant Professor, Department Of Computer Technology, Yeshwantrao Chavan College Of Engineering, Nagpur 1
  • 2. Outline • Routing Algorithm • Shortest Path Routing • Flow Based Routing • Flooding • Distance Vector Routing • Link State Routing • Hierarchical Routing 2
  • 3. Routing is the process of forwarding of a packet in a network so that it reaches its intended destination. •Correctness: The routing should be done properly and correctly so that the packets may reach their proper destination. •Simplicity: The routing should be done in a simple manner so that the overhead is as low as possible. With increasing complexity of the routing algorithms the overhead also increases. •Robustness: Once a major network becomes operative, it may be expected to run continuously for years without any failures. The algorithms designed for routing should be robust enough to handle hardware and software failures and should be able to cope with changes in the topology and traffic without requiring all jobs in all hosts to be aborted and the network rebooted every time some router goes down. Properties Of Routing Algorithm 3
  • 4. • Stability: The routing algorithms should be stable under all possible circumstances. • Fairness: Every node connected to the network should get a fair chance of transmitting their packets. this is generally done on a first come first serve basis. • Optimality: The routing algorithms should be optimal in terms of throughput and minimizing mean packet delays. here there is a trade-off and one has to choose depending on his suitability. 4
  • 5. Types Of Routing Algorithms • Nonadaptive (Static) • Do not use measurements of current conditions • Static routes are downloaded at boot time • Adaptive Algorithms • Change routes dynamically • Gather information at runtime • locally • from adjacent routers • from all other routers • Change routes • Every delta T seconds • When load changes • When topology changes 5
  • 6. d3 > d2 as d1 + d3 > d1 + d2 I   K J Optimal path from I to K over J d1 d2 distance d1 + d2 is minimal d3 Other path from J to K Set of all optimal routes • from all sources • to a given destination is a tree: sink tree Optimality Principle 6
  • 7. (A) A SUBNET. (B) A SINK TREE FOR ROUTER B. 7 • The set of optimal routes to a particular node forms a sink tree. • Sink trees are not necessarily unique. • Goal of all routing algorithms • Discover sink trees for all destinations
  • 8. Dijkstra’s Algorithm A B C E F D G H 1 2 2 6 4 2 7 3 3 2 2 Each node is labeled (in parentheses) with its distance from the source node along the best known path.
  • 9. (Cont’d) • We want to find the shortest path from A to D. • Initially, no paths are known, so all nodes are labeled with infinity. A B(∞,−) C(∞,−) E(∞,−) F(∞,−) D(∞,−) G(∞,−) H(∞,−)
  • 10. (Cont’d) • We start out by marking node A (the working node) as permanent. • We examine each of the nodes adjacent a, relabeling each one with the distance to a. A B(2, A) C(∞,−) E(∞,−) F(∞,−) D(∞,−) G(6, A) H(∞,−) 2 6
  • 11. (Cont’d) A B(2, A) C(∞,−) E(∞,−) F(∞,−) D(∞,−) G(6, A) H(∞,−) We make B with the smallest label permanent. B becomes the new working node.
  • 12. (Cont’d) A B(2, A) C(9, Β) E(4, B) F(∞,−) D(∞,−) G(6, A) H(∞,−) 2 7 We examine each of the nodes adjacent B, relabeling each one with the distance to B.
  • 13. (Cont’d) A B(2, A) C(9, B) E(4, B) F(∞,−) D(∞,−) G(6, A) H(∞,−) We make E with the smallest label permanent. E becomes the new working node.
  • 14. E(4, B) (Cont’d) 1 2 A B(2, A) C(9, B) F(6, Ε) D(∞,−) G(5, E) H(∞,−) We examine each of the nodes adjacent E, relabeling each one with the distance to E.
  • 15. (Cont’d) A B(2, A) C(9, B) E(4, B) F(6, E) D(∞,−) G(5, E) H(∞,−) We make G with the smallest label permanent. G becomes the new working node.
  • 16. E(4, B) (Cont’d) 4 A B(2, A) C(9, B) F(6, E) D(∞,−) G(5, E) H(9, G) We examine each of the nodes adjacent G, relabeling each one with the distance to G.
  • 17. (Cont’d) A B(2, A) C(9, B) E(4, B) F(6, E) D(∞,−) G(5, E) H(9, G) We make F with the smallest label permanent. F becomes the new working node.
  • 18. E(4, B) (Cont’d) 2 A B(2, A) C(9, B) F(6, E) D(∞,−) G(5, E) H(8, F) 3 We examine each of the nodes adjacent F, relabeling each one with the distance to F.
  • 19. (Cont’d) A B(2, A) C(9, B) E(4, B) F(6, E) D(∞,−) G(5, E) H(8, F) We make H with the smallest label permanent. H becomes the new working node.
  • 20. E(4, B) (Cont’d) 2 A B(2, A) C(9, B) F(6, E) D(10, F) G(5, E) H(8, F) We examine each of the nodes adjacent H, relabeling each one with the distance to H.
  • 21. (Cont’d) E(4, B) A B(2, A) C(9, B) F(6, E) D(10, F) G(5, E) H(8, F) We make C with the smallest label permanent. C becomes the new working node.
  • 22. (Cont’d) E(4, B) A B(2, A) C(9, B) F(6, E) D(10, F) G(5, E) H(8, F) 3 We examine each of the nodes adjacent C, relabeling each one with the distance to C.
  • 23. (Cont’d) E(4, B) A B(2, A) C(9, B) F(6, E) D(10, F) G(5, E) H(8, F) We make D with the smallest label permanent. D becomes the new working node.
  • 24. (Cont’d) E(4, B) A B(2, A) C(9, B) F(6, E) D(10, H) G(5, E) H(8, F) The shortest path from A to D follows.
  • 25. Flow Based Routing Algorithm 25 •It is a non-adaptive routing algorithm. •It takes into account both the topology and the load in this routing algorithm; •We can estimate the flow between all pairs of routers. •From the known average amount of traffic and the average length of a packet you can compute the mean packet delays using queuing theory. •Flow-based routing then seeks to find a routing table to minimize the average packet delay through the subnet. •Given the line capacity and the flow, we can determine the delay. It needs to use the formula for delay time T. Where, μ = Mean number of arrivals in packet/sec, 1/μ = The mean packet size in the bits, and c = Line capacity (bits/s).
  • 26. Routing: Flooding • Every packet is sent out on every outgoing line except the one it arrived at • It is non adaptive algorithm. 26
  • 27. 27
  • 28. 28
  • 29. 29
  • 30. • Every packet is sent out on every outgoing line except the one it arrived at • Duplicates!! How to limit? • Hop counter • Decrement in each router • Discard packet if counter is 0 • Sequence number in packet • Avoid sending the same packet a second time • Keep in each router per source a list of packets already seen • Selective flooding • Use only those lines that are going approximately in right direction 30 Routing: Flooding
  • 31. Routing: Distance Vector • Adaptive algorithm • Exchange of info only with neighbours • Data to be available in each router • Routing table: per destination • Distance • Outgoing line • Distance to all neighbours 31
  • 32. ROUTING: DISTANCE VECTORRouting table for A To cost via A 0 - B 12 B C 25 B D 40 B E 14 E F 23 E G 18 B H 17 J I 21 E J 9 J K 24 J L 29 J 32
  • 33. • Algorithm • At each step within a router: • Get routing tables from neighbours • Compute distance to neighbours • Compute new routing table 33
  • 35. Better? • Keep 4 tables (one for each neighbour) • Use shortest path 35
  • 36. Count To Infinity Problem Good news: • A comes up again Only distances to A Faster not possible!!! 36
  • 37. Bad news: • A goes down B receives: • Distance ∞ from A • Distance 2 from C New distance from B to A: 3 via C 37
  • 38. Bad news: • A goes down C still • believes its distance to A is 2 • routes via B B routes its packets for A via C 38
  • 39. Bad news: • A goes down 39
  • 40. Routing: Link State • Each router must • Discover its neighbours and learn their network addresses • Measure the delay or cost to each of its neighbours • Construct a packet with these distances • Send this packet to all other routers • Compute the shortest path to every other router 40
  • 41. 41 Discovering your neighbors • Send “hello” packet on each point-to-point line. Destination node replies with its address.
  • 42. 42 Measuring line cost • Send an “ECHO” packet over the line. • Destination is required to respond to “echo” packet immediately. • Measure the time required for this operation.
  • 43. Building link state packets • Packet containing: • Identity of sender • Sequence number + age • For each neighbour: name + distance 43
  • 44. Age in each packet: • Decremented during flooding, while used in router • Age 0  info discarded 44 • Flooding • Each router records the (source, seq. No.) • Only flood and record packets from a source with higher seq.No. Than previously recorded. • Sequence numbers or router records of them can get corrupt. • Include age after seq. No. And decrement it per second. Discard packets with age zero. Distributing the link state packets
  • 45. Computing new routes • With a full set of link state packets, a router can: • Construct the entire subnet graph • Run Dijkstra's algorithm to compute the shortest path to each destination • Problems for large subnets • Memory to store data • Compute time 45
  • 46. Hierarchical Routing • When network size increases… • Larger stables • More CPU time needed to compute … • More bandwidth needed. 46 The Solution is to •Routers grouped in regions •Each routers knows how to reach: • Other routers in its own group • Other regions
  • 47. 47