SlideShare uma empresa Scribd logo
1 de 11
Chapter 4
Network Layer
Computer Networking: A
Top Down Approach
4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2007.
Routing Protocols

• Define how routers exchange network information
– What type of information
– The format of information exchange
– When to exchange
– Which router to exchange information with
• Examples
– Routing Information Protocol (RIP)
– Enhanced Interior Gateway Routing Protocol
(EIGRP)
– CISCO Proprietary

– Open Shortest Path First (OSPF)
– Border Gateway Protocol (BGP)
Routing Algorithms
Given a set of routers a
routing algorithm finds a
“Good” path from source
router to destination router
Least cost path

routing algorithm

local forwarding table
header value output link
0100
0101
0111
1001

A graph is used to
formulate routing problems
A Graph G=(N,E) is a

Set of N nodes and a
collection E of edges
Nodes in the graph
represent Routers
Edges represent physical
links

3
2
2
1

packet’s header
0111

1
3 2
Graph Abstraction
5
2

u

v
2

1

x

3

w
3

1

5

z

1

y

2

Graph: G = (N,E)

N = set of routers = { u, v, w, x, y, z }
E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
Graph Abstraction: costs
5
2

u

v
2

1

x

• c(x,x‟) = cost of link (x,x‟)

3

w
3

1

5

z

1

y

2

- e.g., c(w,z) = 5
• Cost can be
•Physical length of the link
•Delay etc.

Cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp)
Question: What‟s the least-cost path between u and z ?

Routing algorithm: Algorithm that finds least-cost path
Routing Algorithm Classification
Global Routing Algorithm

Decentralized Routing
Algorithm

 Computes least cost path

 No node has complete








using complete global
knowledge about the
network.
Takes connectivity between
all nodes and all link costs
as input.
All routers have complete
topology, link cost
information
Also called “Link State”
Algorithms
Used by Open Shortest
Path First Protocol (OSPF)








information about the cost
of all links.
In the beginning knowledge
of its own directly attached
links.
Computes least cost path by
an iterative process of
calculation and exchange of
information.
Also called Distance Vector
(DV) Algorithm
Used by Routing Information
Protocol (RIP)
Link-State Routing Algorithm
 Network topology and link

costs are known to all
nodes
 Each node broadcast
link state packets to all
other nodes in the
network
 Each link state packet
contains the identities
and cost of its attached
links
Dijkstra‟s Algorithm
 Computes least cost paths
from one node („source”) to
all other nodes
 Iterative: After k
iterations, least cost paths
to k destinations are known

Notation:
 D(v): Current value of least
cost path from source to
destination (v).

 p(v): Predecessor node along
path from source to v
 N': Subset of nodes whose
least cost path is definitively
known
Dijkstra‟s Algorithm: Example
Step
0
1
2
3
4
5

N'
u
ux
uxy
uxyv
uxyvw
uxyvwz

D(v),p(v) D(w),p(w)
2,u
5,u
2,u
4,x
2,u
3,y
3,y

5
2

u

v
2

1

x

D(x),p(x)
1,u

D(y),p(y)
∞
2,x

D(z),p(z)
∞
∞

4,y
4,y
4,y

Resulting forwarding table in u:
3

w
3

1

5

z

1

y

destination

2

link

x

(u,x)

y

(u,x)

v
w
z

(u,v)
(u,x)
(u,x)
Dijkstra‟s Algorithm
5

1 Initialization:
3
v
w
2 N' = {u}
2
3 for all nodes v
u
2
1
4
if v is a neighbor of u
3
1
5
then D(v) = c(u,v)
x
y
1
6
else D(v) = ∞
7
8 Loop
9 find w not in N' such that D(w) is a minimum
10 add w to N'
11 update D(v) for each neighbor v of w and not in N' :
12
D(v) = min( D(v), D(w) + c(w,v) )
13 /* new cost to v is either old cost to v or known
14 shortest path cost to w plus cost from w to v */
15 until all nodes in N'

5

z
2
Dijkstra‟s Algorithm-Example

Find the shortest path from S to all nodes using Dijkstra‟s
Algorithm?
Solution
Step
0

N’
s

D(x), p(x)

D(t),p(t)

D(u),p(u)

D(v),p(v)

D(w),p(w)

D(y),p(y)

D(z),p(z)

∞

1,s

4,s

∞

∞

∞

∞

1

st

∞

3,t

5,t

∞

8,t

6,t

2

stu

∞

5,t

6,u

8,t

6,t

3

stuv

8,v

6,u

6,v

6,t

4

stuvy

8,v

6,u

5

stuvyz

8,v

6,u

6

stuvyzw

8,v

7

stuvyzwx

6,t

Mais conteúdo relacionado

Mais procurados

Routing algorithm network layer
Routing algorithm  network layerRouting algorithm  network layer
Routing algorithm network layersambhenilesh
 
Network layer
Network layerNetwork layer
Network layersbkbca
 
Routing Technique Table Type by Umar danjuma maiwada.ppt
Routing Technique Table Type by Umar danjuma maiwada.pptRouting Technique Table Type by Umar danjuma maiwada.ppt
Routing Technique Table Type by Umar danjuma maiwada.pptumardanjumamaiwada
 
Zaharaddeen karami lawal distance vector routing
Zaharaddeen karami lawal distance vector routingZaharaddeen karami lawal distance vector routing
Zaharaddeen karami lawal distance vector routingKlawal13
 
Routing protocols-network-layer
Routing protocols-network-layerRouting protocols-network-layer
Routing protocols-network-layerNitesh Singh
 
Lecture 3 network layer
Lecture 3 network layerLecture 3 network layer
Lecture 3 network layerRonoh Kennedy
 
Routing and routing algorithms
Routing and routing algorithmsRouting and routing algorithms
Routing and routing algorithmsBhatt Aadil
 
Routing table and routing algorithms
Routing table and routing algorithmsRouting table and routing algorithms
Routing table and routing algorithmslavanyapathy
 
Evolution of Routing Techniques
Evolution of  Routing TechniquesEvolution of  Routing Techniques
Evolution of Routing TechniquesTusharadri Sarkar
 
Pathlet routing_Demo2
Pathlet routing_Demo2Pathlet routing_Demo2
Pathlet routing_Demo2asrivas2
 
Network layer ip address assignment and routing
Network layer ip address assignment and routingNetwork layer ip address assignment and routing
Network layer ip address assignment and routingHamzahMohammed4
 

Mais procurados (19)

Routing
RoutingRouting
Routing
 
Routing
RoutingRouting
Routing
 
Routing algorithm network layer
Routing algorithm  network layerRouting algorithm  network layer
Routing algorithm network layer
 
Network layer
Network layerNetwork layer
Network layer
 
Routing Technique Table Type by Umar danjuma maiwada.ppt
Routing Technique Table Type by Umar danjuma maiwada.pptRouting Technique Table Type by Umar danjuma maiwada.ppt
Routing Technique Table Type by Umar danjuma maiwada.ppt
 
Ch22
Ch22Ch22
Ch22
 
Notes
NotesNotes
Notes
 
Zaharaddeen karami lawal distance vector routing
Zaharaddeen karami lawal distance vector routingZaharaddeen karami lawal distance vector routing
Zaharaddeen karami lawal distance vector routing
 
Routing protocols-network-layer
Routing protocols-network-layerRouting protocols-network-layer
Routing protocols-network-layer
 
Routing Algorithm
Routing AlgorithmRouting Algorithm
Routing Algorithm
 
Lecture 3 network layer
Lecture 3 network layerLecture 3 network layer
Lecture 3 network layer
 
Routing
RoutingRouting
Routing
 
OSPF - Routing Protocol
OSPF - Routing ProtocolOSPF - Routing Protocol
OSPF - Routing Protocol
 
Routing and routing algorithms
Routing and routing algorithmsRouting and routing algorithms
Routing and routing algorithms
 
Routing table and routing algorithms
Routing table and routing algorithmsRouting table and routing algorithms
Routing table and routing algorithms
 
Evolution of Routing Techniques
Evolution of  Routing TechniquesEvolution of  Routing Techniques
Evolution of Routing Techniques
 
Routing protocols
Routing protocolsRouting protocols
Routing protocols
 
Pathlet routing_Demo2
Pathlet routing_Demo2Pathlet routing_Demo2
Pathlet routing_Demo2
 
Network layer ip address assignment and routing
Network layer ip address assignment and routingNetwork layer ip address assignment and routing
Network layer ip address assignment and routing
 

Semelhante a Week13 lec1

International Journal of Computational Engineering Research(IJCER)
 International Journal of Computational Engineering Research(IJCER)  International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER) ijceronline
 
An Ant Algorithm for Solving QoS Multicast Routing Problem
An Ant Algorithm for Solving QoS Multicast Routing ProblemAn Ant Algorithm for Solving QoS Multicast Routing Problem
An Ant Algorithm for Solving QoS Multicast Routing ProblemCSCJournals
 
Module 3- transport_layer .pptx
Module 3- transport_layer           .pptxModule 3- transport_layer           .pptx
Module 3- transport_layer .pptxhariprasad279825
 
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
 
Chapter Four - Network Layer.pptx
Chapter Four - Network Layer.pptxChapter Four - Network Layer.pptx
Chapter Four - Network Layer.pptxGirT2
 
Link-and Node-Disjoint Evaluation of the Ad Hoc on Demand Multi-path Distance...
Link-and Node-Disjoint Evaluation of the Ad Hoc on Demand Multi-path Distance...Link-and Node-Disjoint Evaluation of the Ad Hoc on Demand Multi-path Distance...
Link-and Node-Disjoint Evaluation of the Ad Hoc on Demand Multi-path Distance...Eswar Publications
 
Network the 4th layer
Network the 4th layerNetwork the 4th layer
Network the 4th layerkachbourimed
 
IRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET Journal
 
Amtr the ant based qos aware multipath temporally ordered routing algorithm ...
Amtr  the ant based qos aware multipath temporally ordered routing algorithm ...Amtr  the ant based qos aware multipath temporally ordered routing algorithm ...
Amtr the ant based qos aware multipath temporally ordered routing algorithm ...csandit
 
AMTR: THE ANT BASED QOS AWARE MULTIPATH TEMPORALLY ORDERED ROUTING ALGORITHM ...
AMTR: THE ANT BASED QOS AWARE MULTIPATH TEMPORALLY ORDERED ROUTING ALGORITHM ...AMTR: THE ANT BASED QOS AWARE MULTIPATH TEMPORALLY ORDERED ROUTING ALGORITHM ...
AMTR: THE ANT BASED QOS AWARE MULTIPATH TEMPORALLY ORDERED ROUTING ALGORITHM ...cscpconf
 
Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Krishna Nanda
 
Chapter 5 - Computer Networking a top-down Approach 7th
Chapter 5 - Computer Networking a top-down Approach 7thChapter 5 - Computer Networking a top-down Approach 7th
Chapter 5 - Computer Networking a top-down Approach 7thAndy Juan Sarango Veliz
 
a-seminar-on-manet.pptx
a-seminar-on-manet.pptxa-seminar-on-manet.pptx
a-seminar-on-manet.pptxSujit833143
 
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 ProtocolsEast West University
 

Semelhante a Week13 lec1 (20)

Lecture set 5
Lecture set 5Lecture set 5
Lecture set 5
 
International Journal of Computational Engineering Research(IJCER)
 International Journal of Computational Engineering Research(IJCER)  International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
Week11 lec2
Week11 lec2Week11 lec2
Week11 lec2
 
Cnetwork
CnetworkCnetwork
Cnetwork
 
An Ant Algorithm for Solving QoS Multicast Routing Problem
An Ant Algorithm for Solving QoS Multicast Routing ProblemAn Ant Algorithm for Solving QoS Multicast Routing Problem
An Ant Algorithm for Solving QoS Multicast Routing Problem
 
IT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTINGIT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTING
 
Module 3- transport_layer .pptx
Module 3- transport_layer           .pptxModule 3- transport_layer           .pptx
Module 3- transport_layer .pptx
 
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
 
Chapter Four - Network Layer.pptx
Chapter Four - Network Layer.pptxChapter Four - Network Layer.pptx
Chapter Four - Network Layer.pptx
 
Link-and Node-Disjoint Evaluation of the Ad Hoc on Demand Multi-path Distance...
Link-and Node-Disjoint Evaluation of the Ad Hoc on Demand Multi-path Distance...Link-and Node-Disjoint Evaluation of the Ad Hoc on Demand Multi-path Distance...
Link-and Node-Disjoint Evaluation of the Ad Hoc on Demand Multi-path Distance...
 
5.2_video_slides.pptx
5.2_video_slides.pptx5.2_video_slides.pptx
5.2_video_slides.pptx
 
Network the 4th layer
Network the 4th layerNetwork the 4th layer
Network the 4th layer
 
IRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing Algorithms
 
Amtr the ant based qos aware multipath temporally ordered routing algorithm ...
Amtr  the ant based qos aware multipath temporally ordered routing algorithm ...Amtr  the ant based qos aware multipath temporally ordered routing algorithm ...
Amtr the ant based qos aware multipath temporally ordered routing algorithm ...
 
AMTR: THE ANT BASED QOS AWARE MULTIPATH TEMPORALLY ORDERED ROUTING ALGORITHM ...
AMTR: THE ANT BASED QOS AWARE MULTIPATH TEMPORALLY ORDERED ROUTING ALGORITHM ...AMTR: THE ANT BASED QOS AWARE MULTIPATH TEMPORALLY ORDERED ROUTING ALGORITHM ...
AMTR: THE ANT BASED QOS AWARE MULTIPATH TEMPORALLY ORDERED ROUTING ALGORITHM ...
 
Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1
 
Chapter 5 - Computer Networking a top-down Approach 7th
Chapter 5 - Computer Networking a top-down Approach 7thChapter 5 - Computer Networking a top-down Approach 7th
Chapter 5 - Computer Networking a top-down Approach 7th
 
a-seminar-on-manet.pptx
a-seminar-on-manet.pptxa-seminar-on-manet.pptx
a-seminar-on-manet.pptx
 
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
 

Mais de syedhaiderraza (20)

Week14 lec1
Week14 lec1Week14 lec1
Week14 lec1
 
Week11 lec1
Week11 lec1Week11 lec1
Week11 lec1
 
Week10 lec1
Week10 lec1Week10 lec1
Week10 lec1
 
Week9 lec1
Week9 lec1Week9 lec1
Week9 lec1
 
Week8 lec2-bscs1
Week8 lec2-bscs1Week8 lec2-bscs1
Week8 lec2-bscs1
 
Week8 lec1-bscs1
Week8 lec1-bscs1Week8 lec1-bscs1
Week8 lec1-bscs1
 
Week5 lec3-bscs1
Week5 lec3-bscs1Week5 lec3-bscs1
Week5 lec3-bscs1
 
Week5 lec2-bscs1
Week5 lec2-bscs1Week5 lec2-bscs1
Week5 lec2-bscs1
 
Week5 lec1-bscs1
Week5 lec1-bscs1Week5 lec1-bscs1
Week5 lec1-bscs1
 
Week4 lec2-bscs1
Week4 lec2-bscs1Week4 lec2-bscs1
Week4 lec2-bscs1
 
Week4 lec1-bscs1
Week4 lec1-bscs1Week4 lec1-bscs1
Week4 lec1-bscs1
 
Week3 lec3-bscs1
Week3 lec3-bscs1Week3 lec3-bscs1
Week3 lec3-bscs1
 
Week3 lec 2
Week3 lec 2Week3 lec 2
Week3 lec 2
 
Week3 lec 1
Week3 lec 1Week3 lec 1
Week3 lec 1
 
Week2 lec3-bscs1
Week2 lec3-bscs1Week2 lec3-bscs1
Week2 lec3-bscs1
 
Week2 lec2-bscs1
Week2 lec2-bscs1Week2 lec2-bscs1
Week2 lec2-bscs1
 
Week2 lec1-bscs1
Week2 lec1-bscs1Week2 lec1-bscs1
Week2 lec1-bscs1
 
Week1 lec2-bscs1
Week1 lec2-bscs1Week1 lec2-bscs1
Week1 lec2-bscs1
 
Week1 lec1-bscs1
Week1 lec1-bscs1Week1 lec1-bscs1
Week1 lec1-bscs1
 
Week16 lec2
Week16 lec2Week16 lec2
Week16 lec2
 

Último

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
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
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
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
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
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
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
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
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 

Último (20)

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
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Ă...
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
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
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
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...
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
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
 
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🔝
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 

Week13 lec1

  • 1. Chapter 4 Network Layer Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
  • 2. Routing Protocols • Define how routers exchange network information – What type of information – The format of information exchange – When to exchange – Which router to exchange information with • Examples – Routing Information Protocol (RIP) – Enhanced Interior Gateway Routing Protocol (EIGRP) – CISCO Proprietary – Open Shortest Path First (OSPF) – Border Gateway Protocol (BGP)
  • 3. Routing Algorithms Given a set of routers a routing algorithm finds a “Good” path from source router to destination router Least cost path routing algorithm local forwarding table header value output link 0100 0101 0111 1001 A graph is used to formulate routing problems A Graph G=(N,E) is a Set of N nodes and a collection E of edges Nodes in the graph represent Routers Edges represent physical links 3 2 2 1 packet’s header 0111 1 3 2
  • 4. Graph Abstraction 5 2 u v 2 1 x 3 w 3 1 5 z 1 y 2 Graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
  • 5. Graph Abstraction: costs 5 2 u v 2 1 x • c(x,x‟) = cost of link (x,x‟) 3 w 3 1 5 z 1 y 2 - e.g., c(w,z) = 5 • Cost can be •Physical length of the link •Delay etc. Cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp) Question: What‟s the least-cost path between u and z ? Routing algorithm: Algorithm that finds least-cost path
  • 6. Routing Algorithm Classification Global Routing Algorithm Decentralized Routing Algorithm  Computes least cost path  No node has complete     using complete global knowledge about the network. Takes connectivity between all nodes and all link costs as input. All routers have complete topology, link cost information Also called “Link State” Algorithms Used by Open Shortest Path First Protocol (OSPF)     information about the cost of all links. In the beginning knowledge of its own directly attached links. Computes least cost path by an iterative process of calculation and exchange of information. Also called Distance Vector (DV) Algorithm Used by Routing Information Protocol (RIP)
  • 7. Link-State Routing Algorithm  Network topology and link costs are known to all nodes  Each node broadcast link state packets to all other nodes in the network  Each link state packet contains the identities and cost of its attached links Dijkstra‟s Algorithm  Computes least cost paths from one node („source”) to all other nodes  Iterative: After k iterations, least cost paths to k destinations are known Notation:  D(v): Current value of least cost path from source to destination (v).  p(v): Predecessor node along path from source to v  N': Subset of nodes whose least cost path is definitively known
  • 8. Dijkstra‟s Algorithm: Example Step 0 1 2 3 4 5 N' u ux uxy uxyv uxyvw uxyvwz D(v),p(v) D(w),p(w) 2,u 5,u 2,u 4,x 2,u 3,y 3,y 5 2 u v 2 1 x D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ ∞ 4,y 4,y 4,y Resulting forwarding table in u: 3 w 3 1 5 z 1 y destination 2 link x (u,x) y (u,x) v w z (u,v) (u,x) (u,x)
  • 9. Dijkstra‟s Algorithm 5 1 Initialization: 3 v w 2 N' = {u} 2 3 for all nodes v u 2 1 4 if v is a neighbor of u 3 1 5 then D(v) = c(u,v) x y 1 6 else D(v) = ∞ 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for each neighbor v of w and not in N' : 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N' 5 z 2
  • 10. Dijkstra‟s Algorithm-Example Find the shortest path from S to all nodes using Dijkstra‟s Algorithm?