SlideShare a Scribd company logo
Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet ,  2 nd  edition.  Jim Kurose, Keith Ross Addison-Wesley, July 2002.  A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in powerpoint form so you can add, modify, and delete slides  (including this one) and slide content to suit your needs. They obviously represent a  lot  of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy!  JFK/KWR All material copyright 1996-2002 J.F Kurose and K.W. Ross, All Rights Reserved
Distance Vector Routing Algorithm (Bellman Ford) iterative: continues until no nodes exchange info. self-terminating : no “signal” to stop asynchronous: nodes need  not  exchange info/iterate in lock step! distributed: each node communicates  only  with directly-attached neighbors Distance Table data structure   each node has its own row for each possible destination column for each directly-attached neighbor to node example: in node X, for dest. Y via neighbor Z: 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 Iterative, asynchronous:  each local iteration caused by:  local link cost change  message from neighbor: its least cost path change from neighbor Distributed: each node notifies neighbors  only  when its least cost path to any destination changes neighbors then notify their neighbors if necessary 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 Link cost changes: node detects local link cost change  updates distance table (line 15) if cost change in least cost path, notify neighbors (lines 23,24) 1 4 50 1 algorithm terminates “ good news  travels fast” X Z Y
Distance Vector: link cost changes Link cost changes: good news travels fast  bad news travels slow - “count to infinity” problem! 1 4 50 60 algorithm continues on! X Z Y
Distance Vector: poisoned reverse If Z routes through Y to get to X : Z tells Y its (Z’s) distance to X is infinite (so Y won’t route to X via Z) will this completely solve count to infinity problem?  1 4 50 60 algorithm terminates X Z Y
Comparison of LS and DV algorithms Message complexity LS:  with n nodes, E links, O(nE) msgs sent each  DV:  exchange between neighbors only convergence time varies Speed of Convergence LS:  O(n 2 ) algorithm requires O(nE) msgs may have oscillations DV : convergence time varies may be routing loops count-to-infinity problem Robustness:  what happens if router malfunctions? LS:   node can advertise incorrect  link  cost each node computes only its  own  table DV: DV node can advertise incorrect  path  cost each node’s table used by others  error propagate thru network
Chapter 4 roadmap 4.1  Introduction and Network Service Models 4.2  Routing Principles 4.3 Hierarchical Routing 4.4  The Internet (IP) Protocol 4.5  Routing in the Internet 4.6  What’s Inside a Router 4.7  IPv6 4.8  Multicast Routing 4.9  Mobility
Hierarchical Routing scale:  with 200 million destinations: can’t store all dest’s in routing tables! routing table exchange would swamp links!   administrative autonomy internet = network of networks each network admin may want to control routing in its own network Our routing study thus far - idealization  all routers identical network “flat” …  not  true in practice
Hierarchical Routing aggregate routers into regions,  “autonomous systems” (AS) routers in same AS run same routing protocol “ intra-AS” routing  protocol routers in different AS can run different intra-AS routing protocol special routers in AS run intra-AS routing protocol with all other routers in AS also  responsible for routing to destinations outside AS run  inter-AS routing  protocol with other gateway routers gateway routers
Intra-AS and Inter-AS routing Gateways: perform inter-AS routing amongst themselves perform intra-AS routers with other routers in their AS 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 We’ll examine specific inter-AS and intra-AS Internet routing protocols shortly 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

PPT
Bellman Ford's Algorithm
PPTX
Bellmanford . montaser hamza.iraq
PPTX
Bellman ford Algorithm
PPT
Single source stortest path bellman ford and dijkstra
PPT
The Floyd–Warshall algorithm
PPTX
Bellman Ford Routing Algorithm-Computer Networks
PPT
Dijksatra
PPT
Routing algorithm
Bellman Ford's Algorithm
Bellmanford . montaser hamza.iraq
Bellman ford Algorithm
Single source stortest path bellman ford and dijkstra
The Floyd–Warshall algorithm
Bellman Ford Routing Algorithm-Computer Networks
Dijksatra
Routing algorithm

What's hot (20)

PPTX
Shortest path algorithm
PPTX
(floyd's algm)
PPTX
Dijkstra's algorithm
PPTX
Dijkstra’s algorithm
PDF
Dijkstra's Algorithm
PDF
Bellman ford algorithm
PPTX
Shortest path algorithm
PDF
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
PPTX
Shortest path problem
PPTX
Optimisation random graph presentation
PPT
Unit26 shortest pathalgorithm
PDF
All pairs shortest path algorithm
PPTX
Networks dijkstra's algorithm- pgsr
PPT
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
PPT
Dijkstra c
PPTX
Bellman ford algorithm
PPTX
Dijkstra s algorithm
PPT
Prim's Algorithm on minimum spanning tree
Shortest path algorithm
(floyd's algm)
Dijkstra's algorithm
Dijkstra’s algorithm
Dijkstra's Algorithm
Bellman ford algorithm
Shortest path algorithm
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
Shortest path problem
Optimisation random graph presentation
Unit26 shortest pathalgorithm
All pairs shortest path algorithm
Networks dijkstra's algorithm- pgsr
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Dijkstra c
Bellman ford algorithm
Dijkstra s algorithm
Prim's Algorithm on minimum spanning tree
Ad

Similar to Bellmanford (20)

PPTX
Module 3- transport_layer .pptx
PPTX
numeric network in the world of heart then ay iks jsns
PPT
routing1 1X3 Router (capable of routing the data packets.ppt
PPT
Chapter 5 - Computer Networking a top-down Approach 7th
PDF
Cnetwork
PPT
Introduction to Computer Networks
PPT
Intro 2 Computer Networks
PDF
Lec12 on Computer Networks by Tarun Mangla.pdf
PPTX
Network Layer: Control Plane (Computer Network Course)
PDF
P5 - Routing Protocols
PDF
IT6601 MOBILE COMPUTING
PPTX
Routing Algorithm
PDF
Lecture set 5
PPTX
5.2_video_slides.pptx
PPTX
Week13 lec2
PPTX
Chapter_5_v8.0Routing Protocol for Computer network from kurose and ross
PPTX
Computer Networking Michaelmas/Lent Term M/W/F 11:00-12:00 LT1 in Gates Buil...
PPTX
Comparative Analysis of Distance Vector Routing & Link State Protocols
PPT
Data Communications and Networks Network Layer
PDF
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
Module 3- transport_layer .pptx
numeric network in the world of heart then ay iks jsns
routing1 1X3 Router (capable of routing the data packets.ppt
Chapter 5 - Computer Networking a top-down Approach 7th
Cnetwork
Introduction to Computer Networks
Intro 2 Computer Networks
Lec12 on Computer Networks by Tarun Mangla.pdf
Network Layer: Control Plane (Computer Network Course)
P5 - Routing Protocols
IT6601 MOBILE COMPUTING
Routing Algorithm
Lecture set 5
5.2_video_slides.pptx
Week13 lec2
Chapter_5_v8.0Routing Protocol for Computer network from kurose and ross
Computer Networking Michaelmas/Lent Term M/W/F 11:00-12:00 LT1 in Gates Buil...
Comparative Analysis of Distance Vector Routing & Link State Protocols
Data Communications and Networks Network Layer
PERFORMANCE ANALYSIS OF DISTANCE VECTOR AND LINKED STATE ROUTING PROTOCOL
Ad

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
master seminar digital applications in india
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Pre independence Education in Inndia.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
01-Introduction-to-Information-Management.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Cell Structure & Organelles in detailed.
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Cell Types and Its function , kingdom of life
Complications of Minimal Access Surgery at WLH
102 student loan defaulters named and shamed – Is someone you know on the list?
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Abdominal Access Techniques with Prof. Dr. R K Mishra
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
master seminar digital applications in india
O5-L3 Freight Transport Ops (International) V1.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Insiders guide to clinical Medicine.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Pre independence Education in Inndia.pdf
Renaissance Architecture: A Journey from Faith to Humanism
01-Introduction-to-Information-Management.pdf
PPH.pptx obstetrics and gynecology in nursing
Cell Structure & Organelles in detailed.
human mycosis Human fungal infections are called human mycosis..pptx
Microbial disease of the cardiovascular and lymphatic systems
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Cell Types and Its function , kingdom of life

Bellmanford

  • 1. Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet , 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2002. A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in powerpoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright 1996-2002 J.F Kurose and K.W. Ross, All Rights Reserved
  • 2. Distance Vector Routing Algorithm (Bellman Ford) iterative: continues until no nodes exchange info. self-terminating : no “signal” to stop asynchronous: nodes need not exchange info/iterate in lock step! distributed: each node communicates only with directly-attached neighbors Distance Table data structure each node has its own row for each possible destination column for each directly-attached neighbor to node example: in node X, for dest. Y via neighbor Z: D (Y,Z) X distance from X to Y, via Z as next hop c(X,Z) + min {D (Y,w)} Z w = =
  • 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. Distance Vector Routing: overview Iterative, asynchronous: each local iteration caused by: local link cost change message from neighbor: its least cost path change from neighbor Distributed: each node notifies neighbors only when its least cost path to any destination changes neighbors then notify their neighbors if necessary 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
  • 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. Distance Vector: link cost changes Link cost changes: node detects local link cost change updates distance table (line 15) if cost change in least cost path, notify neighbors (lines 23,24) 1 4 50 1 algorithm terminates “ good news travels fast” X Z Y
  • 11. Distance Vector: link cost changes Link cost changes: good news travels fast bad news travels slow - “count to infinity” problem! 1 4 50 60 algorithm continues on! X Z Y
  • 12. Distance Vector: poisoned reverse If Z routes through Y to get to X : Z tells Y its (Z’s) distance to X is infinite (so Y won’t route to X via Z) will this completely solve count to infinity problem? 1 4 50 60 algorithm terminates X Z Y
  • 13. Comparison of LS and DV algorithms Message complexity LS: with n nodes, E links, O(nE) msgs sent each DV: exchange between neighbors only convergence time varies Speed of Convergence LS: O(n 2 ) algorithm requires O(nE) msgs may have oscillations DV : convergence time varies may be routing loops count-to-infinity problem Robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: DV node can advertise incorrect path cost each node’s table used by others error propagate thru network
  • 14. Chapter 4 roadmap 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol 4.5 Routing in the Internet 4.6 What’s Inside a Router 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility
  • 15. Hierarchical Routing scale: with 200 million destinations: can’t store all dest’s in routing tables! routing table exchange would swamp links! administrative autonomy internet = network of networks each network admin may want to control routing in its own network Our routing study thus far - idealization all routers identical network “flat” … not true in practice
  • 16. Hierarchical Routing aggregate routers into regions, “autonomous systems” (AS) routers in same AS run same routing protocol “ intra-AS” routing protocol routers in different AS can run different intra-AS routing protocol special routers in AS run intra-AS routing protocol with all other routers in AS also responsible for routing to destinations outside AS run inter-AS routing protocol with other gateway routers gateway routers
  • 17. Intra-AS and Inter-AS routing Gateways: perform inter-AS routing amongst themselves perform intra-AS routers with other routers in their AS 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
  • 18. Intra-AS and Inter-AS routing Host h2 Intra-AS routing within AS A Intra-AS routing within AS B We’ll examine specific inter-AS and intra-AS Internet routing protocols shortly 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