SlideShare a Scribd company logo
1 of 18
Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet ,  2 nd  edition.  Jim Kurose, Keith Ross Addison-Wesley, July 2002.  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Distance Vector Routing Algorithm (Bellman Ford) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],D (Y,Z) X distance  from  X  to Y,  via  Z as next hop c(X,Z) + min  {D  (Y,w)} Z w = =
Distance Table: example 7 8 1 2 1 2 loop! loop! A E D C B D  () A B C D A 1 7 6 4 B 14 8 9 11 D 5 5 4 2 E cost to destination via destination D (C,D) E c(E,D) + min  {D  (C,w)} D w = = 2+2  = 4 D (A,D) E c(E,D) + min  {D  (A,w)} D w = = 2+3  = 5 D (A,B) E c(E,B) + min  {D  (A,w)} B w = = 8+6  = 14
Distance table gives routing table A B C D A,1 D,5 D,4 D,4 Outgoing link  to use, cost destination Distance table Routing table D  () A B C D A 1 7 6 4 B 14 8 9 11 D 5 5 4 2 E cost to destination via destination
Distance Vector Routing: overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Each node: wait  for (change in local link cost of msg from neighbor) recompute  distance table if least cost path to any dest has changed,  notify  neighbors
Distance Vector Algorithm: 1  Initialization:  2  for all adjacent nodes v:  3  D  (*,v) = infinity  /* the * operator means "for all rows" */  4  D  (v,v) = c(X,v)  5  for all destinations, y  6  send min  D  (y,w) to each neighbor  /* w over all X's neighbors */   X X X w At all nodes, X:
Distance Vector Algorithm (cont.): 8  loop   9  wait  (until I see a link cost change to neighbor V  10  or until I receive update from neighbor V)  11  12  if  (c(X,V) changes by d)  13  /* change cost to all dest's via neighbor v by d */   14  /* note: d could be positive or negative */  15  for all destinations y:  D  (y,V) =  D  (y,V) + d  16  17  else if  (update received from V wrt destination Y)  18  /* shortest path from V to some Y has changed  */   19  /* V has sent a new value for its  min  DV(Y,w) */  20  /* call this received new value is "newval"  */  21  for the single destination y: D  (Y,V) = c(X,V) + newval  22  23  if  we have a new min  D  (Y,w)for any destination Y  24  send new value of min  D  (Y,w) to all neighbors  25  26  forever   w X X X X X w w
Distance Vector Algorithm: example X Z 1 2 7 Y
Distance Vector Algorithm: example X Z 1 2 7 Y D  (Y,Z) X c(X,Z) + min  {D  (Y,w)} w = = 7+1 = 8 Z D  (Z,Y) X c(X,Y) + min  {D  (Z,w)} w = = 2+1 = 3 Y
Distance Vector: link cost changes ,[object Object],[object Object],[object Object],[object Object],1 4 50 1 algorithm terminates “ good news  travels fast” X Z Y
Distance Vector: link cost changes ,[object Object],[object Object],[object Object],1 4 50 60 algorithm continues on! X Z Y
Distance Vector: poisoned reverse ,[object Object],[object Object],[object Object],1 4 50 60 algorithm terminates X Z Y
Comparison of LS and DV algorithms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Chapter 4 roadmap ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hierarchical Routing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hierarchical Routing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],gateway routers
Intra-AS and Inter-AS routing ,[object Object],[object Object],[object Object],inter-AS, intra-AS routing in  gateway A.c network layer link layer physical layer a b a C A B d b a A.a A.c C.b B.a c b c
Intra-AS and Inter-AS routing Host  h2 Intra-AS routing within AS A Intra-AS routing within AS B ,[object Object],a b b a a C A B d c A.a A.c C.b B.a c b Host h1 Inter-AS routing between  A and B

More Related Content

What's hot

Dijkstra's algorithm
Dijkstra's algorithmDijkstra's algorithm
Dijkstra's algorithm
gsp1294
 
Dijkstra’s algorithm
Dijkstra’s algorithmDijkstra’s algorithm
Dijkstra’s algorithm
faisal2204
 
Dijkstra's Algorithm
Dijkstra's AlgorithmDijkstra's Algorithm
Dijkstra's Algorithm
guest862df4e
 
Unit26 shortest pathalgorithm
Unit26 shortest pathalgorithmUnit26 shortest pathalgorithm
Unit26 shortest pathalgorithm
meisamstar
 
All pairs shortest path algorithm
All pairs shortest path algorithmAll pairs shortest path algorithm
All pairs shortest path algorithm
Srikrishnan Suresh
 
Networks dijkstra's algorithm- pgsr
Networks  dijkstra's algorithm- pgsrNetworks  dijkstra's algorithm- pgsr
Networks dijkstra's algorithm- pgsr
Linawati Adiman
 

What's hot (20)

Shortest path algorithm
Shortest path algorithmShortest path algorithm
Shortest path algorithm
 
(floyd's algm)
(floyd's algm)(floyd's algm)
(floyd's algm)
 
Dijkstra's algorithm
Dijkstra's algorithmDijkstra's algorithm
Dijkstra's algorithm
 
Dijkstra’s algorithm
Dijkstra’s algorithmDijkstra’s algorithm
Dijkstra’s algorithm
 
Dijkstra's Algorithm
Dijkstra's AlgorithmDijkstra's Algorithm
Dijkstra's Algorithm
 
Bellman ford algorithm
Bellman ford algorithmBellman ford algorithm
Bellman ford algorithm
 
CSE633
CSE633CSE633
CSE633
 
Shortest path algorithm
Shortest  path algorithmShortest  path algorithm
Shortest path algorithm
 
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
 
d
dd
d
 
Shortest path problem
Shortest path problemShortest path problem
Shortest path problem
 
Optimisation random graph presentation
Optimisation random graph presentationOptimisation random graph presentation
Optimisation random graph presentation
 
Unit26 shortest pathalgorithm
Unit26 shortest pathalgorithmUnit26 shortest pathalgorithm
Unit26 shortest pathalgorithm
 
All pairs shortest path algorithm
All pairs shortest path algorithmAll pairs shortest path algorithm
All pairs shortest path algorithm
 
Networks dijkstra's algorithm- pgsr
Networks  dijkstra's algorithm- pgsrNetworks  dijkstra's algorithm- pgsr
Networks dijkstra's algorithm- pgsr
 
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
 
Dijkstra c
Dijkstra cDijkstra c
Dijkstra c
 
Bellman ford algorithm
Bellman ford algorithmBellman ford algorithm
Bellman ford algorithm
 
Dijkstra s algorithm
Dijkstra s algorithmDijkstra s algorithm
Dijkstra s algorithm
 
Prim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning treePrim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning tree
 

Similar to Bellmanford

Intro 2 Computer Networks
Intro 2 Computer NetworksIntro 2 Computer Networks
Intro 2 Computer Networks
rakeshgoswami
 

Similar to Bellmanford (20)

Module 3- transport_layer .pptx
Module 3- transport_layer           .pptxModule 3- transport_layer           .pptx
Module 3- transport_layer .pptx
 
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
 
Cnetwork
CnetworkCnetwork
Cnetwork
 
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
 
P5 - Routing Protocols
P5 - Routing ProtocolsP5 - Routing Protocols
P5 - Routing Protocols
 
IT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTINGIT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTING
 
Routing Algorithm
Routing AlgorithmRouting Algorithm
Routing Algorithm
 
Lecture set 5
Lecture set 5Lecture set 5
Lecture set 5
 
5.2_video_slides.pptx
5.2_video_slides.pptx5.2_video_slides.pptx
5.2_video_slides.pptx
 
Week13 lec2
Week13 lec2Week13 lec2
Week13 lec2
 
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
 
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOLPERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing Protocols
 
Distance Vector & Link state Routing Algorithm
Distance Vector & Link state Routing AlgorithmDistance Vector & Link state Routing Algorithm
Distance Vector & Link state 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
 
Scalable Online Betweenness Centrality in Evolving Graphs
Scalable Online Betweenness Centrality in Evolving GraphsScalable Online Betweenness Centrality in Evolving Graphs
Scalable Online Betweenness Centrality in Evolving Graphs
 
module10-rip (1).ppt
module10-rip (1).pptmodule10-rip (1).ppt
module10-rip (1).ppt
 
Introducing ATM Technology unicast.ppt
Introducing ATM Technology   unicast.pptIntroducing ATM Technology   unicast.ppt
Introducing ATM Technology unicast.ppt
 
Dijkstra
DijkstraDijkstra
Dijkstra
 

Recently uploaded

IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
17thcssbs2
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 

Recently uploaded (20)

BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptx
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdfPost Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
 
Essential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonEssential Safety precautions during monsoon season
Essential Safety precautions during monsoon season
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
The Ultimate Guide to Social Media Marketing in 2024.pdf
The Ultimate Guide to Social Media Marketing in 2024.pdfThe Ultimate Guide to Social Media Marketing in 2024.pdf
The Ultimate Guide to Social Media Marketing in 2024.pdf
 
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptxREPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptx
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Behavioral-sciences-dr-mowadat rana (1).pdf
Behavioral-sciences-dr-mowadat rana (1).pdfBehavioral-sciences-dr-mowadat rana (1).pdf
Behavioral-sciences-dr-mowadat rana (1).pdf
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the life
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
 

Bellmanford

  • 1.
  • 2.
  • 3. Distance Table: example 7 8 1 2 1 2 loop! loop! A E D C B D () A B C D A 1 7 6 4 B 14 8 9 11 D 5 5 4 2 E cost to destination via destination D (C,D) E c(E,D) + min {D (C,w)} D w = = 2+2 = 4 D (A,D) E c(E,D) + min {D (A,w)} D w = = 2+3 = 5 D (A,B) E c(E,B) + min {D (A,w)} B w = = 8+6 = 14
  • 4. Distance table gives routing table A B C D A,1 D,5 D,4 D,4 Outgoing link to use, cost destination Distance table Routing table D () A B C D A 1 7 6 4 B 14 8 9 11 D 5 5 4 2 E cost to destination via destination
  • 5.
  • 6. Distance Vector Algorithm: 1 Initialization: 2 for all adjacent nodes v: 3 D (*,v) = infinity /* the * operator means "for all rows" */ 4 D (v,v) = c(X,v) 5 for all destinations, y 6 send min D (y,w) to each neighbor /* w over all X's neighbors */ X X X w At all nodes, X:
  • 7. Distance Vector Algorithm (cont.): 8 loop 9 wait (until I see a link cost change to neighbor V 10 or until I receive update from neighbor V) 11 12 if (c(X,V) changes by d) 13 /* change cost to all dest's via neighbor v by d */ 14 /* note: d could be positive or negative */ 15 for all destinations y: D (y,V) = D (y,V) + d 16 17 else if (update received from V wrt destination Y) 18 /* shortest path from V to some Y has changed */ 19 /* V has sent a new value for its min DV(Y,w) */ 20 /* call this received new value is "newval" */ 21 for the single destination y: D (Y,V) = c(X,V) + newval 22 23 if we have a new min D (Y,w)for any destination Y 24 send new value of min D (Y,w) to all neighbors 25 26 forever w X X X X X w w
  • 8. Distance Vector Algorithm: example X Z 1 2 7 Y
  • 9. Distance Vector Algorithm: example X Z 1 2 7 Y D (Y,Z) X c(X,Z) + min {D (Y,w)} w = = 7+1 = 8 Z D (Z,Y) X c(X,Y) + min {D (Z,w)} w = = 2+1 = 3 Y
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.