comp 431 the network layer routing addressing internet
play

COMP 431 The Network Layer: Routing & Addressing Internet - PowerPoint PPT Presentation

COMP 431 The Network Layer: Routing & Addressing Internet Services & Protocols Outline application Network layer services transport network network network network link network network Routing algorithms link physical


  1. COMP 431 The Network Layer: Routing & Addressing Internet Services & Protocols Outline application ◆ Network layer services transport network network network network link network network ◆ Routing algorithms link physical link Distance Vector & Hierarchical physical physical » Least cost path computation network network algorithms link Routing physical ◆ Hierarchical routing » Connecting networks of networks network network link ◆ IP Internet Protocol physical » Addressing network network Jasleen Kaur » IPv6 link physical ◆ Routing on the Internet » Intra-domain routing » Inter-domain routing April 2, 2020 application transport network network link physical 1 2

  2. Routing Algorithms Decentralized Routing Algorithms Taxonomy Distance Vector Routing 5 5 ◆ Iterative: ◆ Global or decentralized 3 3 C C B B » Nodes exchange cost information 5 5 information? 2 2 until each node has the current A A F F 2 route costs 2 1 1 3 3 » The algorithm is self-terminating 1 1 2 2 ◆ Global — all routers D E D E — there’s no explicit stopping point 1 1 maintain the complete graph of the network (topology, costs) ◆ Asynchronous: » “ Link state ” algorithms » Nodes need not exchange information and iterate in lock step » Intermediate results may be inconsistent across nodes ◆ Decentralized — router knows link costs to physically connected ◆ Distributed: adjacent nodes » Each node communicates only with directly-attached adjacent nodes » Run iterative algorithm to exchange information with adjacent nodes » (But there is no flooding of cost information) » “ Distance vector ” algorithms 3 4

  3. Distance Vector Routing Distance Vector Routing Cost to Distance table data structure Distance table example Destination via Cost to Destination via D E () A B D ◆ Each node has its own table with a... D E () A B D 1 C B » Row for each possible destination 7 A 1 14 5 A » Column for each directly-attached adjacent 8 2 A 1 14 5 node (neighbor) 1 B 7 8 5 E D 2 B 7 8 5 ◆ Each table entry gives cost to reach C 6 9 4 destination via that adjacent node C 6 D E ( C , D ) = c( E , D ) + min w { D D ( C,w )} 9 4 » Distance = Cost D 4 11 2 = 2 + 2 = 4 D 4 11 2 D E ( A , D ) = c( E , D ) + min w { D D ( A,w )} = 2 + 3 = 5 A loop?! D X ( Y , Z ) = distance from X to Y via Z as first hop = c ( X , Z ) + min w { D Z ( Y , w )} D E ( A , B ) = c( E , B ) + min w { D B ( A,w )} w = { neighbors of Z } = 8 + 6 = 14 Loop! 5 6

  4. Distance Vector Routing Distance Vector Routing Distance table example Algorithm ◆ Iterative, asynchronous: Distance Table Routing Table Each node: 1 each local iteration caused by: C B 7 D E () D E () A B D » Local link cost change, or wait for change in local A 8 2 » Message from adjacent node that its link cost or message from 1 least cost path to some destination has A 1 14 A A , 1 5 adjacent node E D changed 2 ◆ Distributed: B 7 8 B 5 D , 5 recompute distance table » Each node notifies adjacent nodes only when its least cost path to some D , 4 C 6 9 C 4 ◆ The distance table destination changes if least cost path to any gives the routing » Adjacent nodes then notify their destination has changed, D , 2 D 4 11 D adjacent nodes if this update changes a table 2 notify adjacent nodes least cost path » Just take the minimum cost per destination Adjacent Node to Use, Cost 7 8

  5. Distance Vector Routing Distance Vector Routing Algorithm Algorithm main loop (at node X ) loop wait until ( receive link cost change to adjacent node v ◆ Initialization phase: At all nodes X : or receive new_val == min w D v (Y,w)) from v) if (c(X,v) changes by d) { /* d could be + or - */ /* change cost to all destinations via v by d */ for all adjacent nodes V { for all destinations y /* includes v */ D X ( * ,V) = “ ∞ ” /* the cost to reach all destinations through D X (y,v) = D X (y,v) + d } any neighbor is infinite */ else { if (received new_val for y from v) /* the “ * ” operator means “for all rows” */ /* shortest path from v to some y has changed */ D X (V,V) = c(X,V) /* record the cost to reach each adjacent node /* change the distance to y through v */ } (cost from X to each V) */ D X (y,v) = c(X,v) + new_val } for all destinations Y & adjacent nodes V { for all destinations y { send min w D X (Y,w) to V /* send current minimum costs for all find min_cost(y) = min w D X (y,w) /* w is all X's neighbors */ destinations to all neighbors */ if ( new min_cost (y)) { /* new minimum cost to y found */ } /* w taken over all X's neighbors */ for all adjacent nodes v send new_val = min_cost(y) to v } } forever 9 10

  6. Distance Vector Algorithm Distance Vector Algorithm Example Example Cost via Cost via Cost via Cost via Cost via D X Y Z D X Y Z D X Y Z D X Y Z D X Y Z Dest. Y 2 ∞ Dest. Y 2 8 Dest. Y 2 ∞ Dest. Y 2 8 Dest. Y Y Y Z ∞ 7 Z 3 7 Z ∞ 7 Z 3 7 Z 2 2 Cost via Cost via Cost via Cost via D Y X Z D Y X Z D Y X Z D Y X Z 1 1 X X Dest. X 2 ∞ Dest. X 2 ∞ Dest. X 2 8 Dest. X D X ( Y , Z ) = c ( X , Z ) + min w { D Z ( Y , w )} Z ∞ 1 Z ∞ 1 Z 9 1 Z 7 7 = 7 + 1 = 8 Z Cost via Z Cost via Cost via Cost via D Z X Y D X ( Z , Y ) = c ( X , Y ) + min w { D Y ( Z , w )} D Z X Y D Z X Y D Z X Y = 2 + 1 = 3 Dest. X 7 ∞ Dest. X 7 ∞ Dest. X 7 3 Dest. X Y ∞ 1 Y ∞ 1 Y 9 1 Y Time Time 11 12

  7. Distance Vector Algorithm Distance Vector Algorithm Example Link cost changes 1 Y 4 Cost via Cost via Cost via ◆ When a node detects a local link cost change: D X Y Z D X Y Z D X Y Z X 1 » The nodes updates its distance table » If the least cost path changes, the node notifies its 50 Dest. Y 2 ∞ Dest. Y 2 8 Dest. Y 2 8 Y Z neighbors Z ∞ 7 Z 3 7 Z 3 7 2 Cost via Cost via Cost via via via via via D Y X Z D Y X Z D Y X Z 1 D Y X Z D Y X Z D Y X Z D Y X Z X Dest. X 2 ∞ Dest. X 2 8 Dest. X 2 4 “ Good X 4 6 X 1 6 X 1 6 X 1 3 news Z ∞ 1 Z 9 1 Z 5 1 7 travels via via via via fast ” Z Cost via Cost via Cost via D Z X Y D Z X Y D Z X Y D Z X Y D Z X Y D Z X Y D Z X Y X 50 2 X 50 5 X 50 5 X 50 2 Dest. X 7 ∞ Dest. X 7 3 Dest. X 7 3 Y ∞ 1 Y 9 1 Y 9 1 c ( X , Y ) t 0 t 1 t 2 Algorithm t 3 changes terminates Time 13 14

  8. Distance Vector Algorithm The Count to Infinity Problem Routing Loop! The “ poisoned reverse ” technique Link cost changes Does it T erminate? Y 60 4 Y ◆ Good news travels fast, but… ◆ If Z routes through Y to get to X : X 1 4 ◆ “ Bad news ” travels slow! » Then Z tells Y that Z ’ s distance to X is infinite X 50 1 Z » The “ count to infinity ” problem 50 Z Initialization… via via via via via via via via D Y X Z D Y X Z D Y X Z D Y X Z D Y X Z D Y X Z D Y X Z D Y X Z X 4 6 X 60 6 X 60 6 X 60 8 X 60 8 X 4 ∞ X 4 51 X 4 ∞ via via via via via via via via D Z X Y D Z X Y D Z X Y D Z X Y D Z X Y D Z X Y D Z X Y D Z X Y X 50 7 X 50 9 X 50 5 X 50 5 X 50 7 X 50 ∞ X 50 5 X 50 5 c ( X , Y ) t 0 t 1 t 2 t 3 Algorithm t 4 t -3 t -2 t -1 changes continues on… 15 16

  9. The Count to Infinity Problem Least Cost Path Computations The “ poisoned reverse ” technique Comparison of the link-state & distance vector algorithms 60 Y 4 ◆ Message complexity: ◆ Robustness: what happens if ◆ If Z routes through Y to get to X : X 1 there are failures? » LS: With N nodes, E links, O ( N x E ) » Then Z tells Y that Z ’ s distance to X is infinite 50 messages sent for flooding » LS: Node can advertise incorrect Z link cost ◆ (Will this completely solve the problem?) » DV: Exchange between neighbors only (may trigger further Each node computes only its own exchanges) table via via via via via » DV: Node can advertise incorrect D Y X Z D Y X Z D Y X Z D Y X Z D Y X Z ◆ Speed of Convergence: path cost » LS: O (N 2 ) algorithm and O ( N x E ) Each node’s table used by others X 4 ∞ X 60 ∞ X 60 ∞ X 60 51 X 60 51 messages ❖ Errors propagate through network ❖ May have oscillations » DV: Convergence time varies via via via via via D Z X Y D Z X Y ❖ Routing loops possible D Z X Y D Z X Y D Z X Y ❖ Count-to-infinity problem X 50 61 X 50 ∞ X 50 5 X 50 5 X 50 61 c ( X , Y ) t 0 t 1 t 2 t 3 Algorithm t 4 changes terminates 17 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend