1 / 33

CMPT 371

CMPT 371. Data Communications and Networking Routing 2. Distance Vector Routing. Each station (router) maintains a global routing table Routing table contains one entry for each station (router) in the network Each entry includes a measure of the ‘distance’ to a particular station (router)

conway
Download Presentation

CMPT 371

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CMPT 371 Data Communications and Networking Routing 2

  2. Distance Vector Routing Each station (router) maintains a global routing table • Routing table contains one entry for each station (router) in the network • Each entry includes a measure of the ‘distance’ to a particular station (router) • Periodically (or when its routing table changes) each router sends a copy of its routing table to its neighbors • When updates (of neighbors routing tables) are received a routing algorithm is used to update the local routing table incorporating any changes from the recently received update

  3. Bellman Ford Algorithm • Initialization • Update for each successive h≥0. For each v≠u compute • where

  4. Bellman-Ford Algorithm: • Find the minimum cost paths from station A to every other station in the network below 6 4 5 A B C D 6 2 4 4 1 4 E 2 8 F H G 4 3 5 4 2 2 4 3 2 K I J L I

  5. Initialization • Set all paths from A to be ∞ (0,∞) (0,∞) (0,∞) 6 4 5 A B C D 6 2 4 4 1 4 (0,∞) (0,∞) E 2 8 F H (0,∞) G (0,∞) 4 3 5 4 2 2 4 3 2 K I (0,∞) J L (0,∞) I (0,∞) (0,∞)

  6. Iteration 1 • Find all minimum cost paths of length 1 hop from the station A (A,5) (0,∞) (0,∞) (0,∞) 6 4 5 A B C D { } B , E , F 6 2 4 4 1 4 (0,∞) (0,∞) (A,2) (0,∞) E 2 8 (A,1) F H (0,∞) G (0,∞) 4 3 5 4 2 2 4 3 2 K I (0,∞) J L (0,∞) I (0,∞) (0,∞)

  7. Iteration 2 • Find all minimum cost paths of length 2 hops from the station A (F,6) (A,5) (B,11) (0,∞) (0,∞) 6 4 5 A B C D 6 2 4 4 1 { } 4 B , E , F G I, J, K C, (B,9) (A,2) (A,1) E 2 8 F H (0,∞) G (0,∞) (F,4) 4 3 5 4 2 2 (F,5) 4 3 2 K I (E,3) J L (0,∞) I (0,∞) (0,∞) (0,∞) (F,6) (F,7)

  8. Iteration 3 • Find all minimum cost paths of length 3 hops from the station A (B,11) (0,∞) (A,5) (G,8) (G,10) 6 4 5 A B C D (C,15) 6 2 4 4 1 { } 4 C, D G, H I, J, K, L (I,6) (A,2) (A,1) E 2 8 F H G (0,∞) (K,11) (C,12) (G,12) (F,4) 4 3 5 4 2 2 4 3 2 K I (E,3) J L I (0,∞) (K,9) (K,10) (J,10) (F,6) (i,7) (J,9) (F,7)

  9. Iteration 4 • Find all minimum cost paths of length 4 hops from the station A (D,12) (A,5) (G,10) (H,15) 6 4 5 A B C D (G,8) 6 2 4 4 1 { } 4 D, H, L C, (D,12) (A,2) (A,1) E 2 8 F H G (K,11) (L,11) (H,19) (C,12) (F,4) 4 3 5 4 2 2 (H,13) 4 3 2 K I (E,3) J L I (K,9) (F,6) (F,7)

  10. Distance Vector Routing • Distributed Bellman-Ford algorithm • Each station (router) maintains a routing table • Routing table contains one entry for each station (router) in the network • Each entry includes a measure of the ‘distance’ to a particular station (router) • ‘distance’ metric may be one of, or a combination of measures including the following • number of hops • number of packets queued for transmission • delay between stations ( measured using and ECHO packet which directly measures the transmission time)

  11. Distance Vector Routing • Once every T seconds each station i, (router) sends each of its neighbors (station one hop distant) a list, of estimated delays from itself to every station j. • Similarly each station will receive routing information from each of its neighbors every T sec. • The routing data received are used to update the routing table of the station • Note: the existing routing table for station i at time t is not used directly to compute the routing table for station i at time t+T, the ‘distance’ to each neighbor station k, lki, and the delay vectors from each neighbor station j, dijare used

  12. First Generation Internet • Distance Vector Routing (ARPANET) • Used the distributed version of the Bellman-Ford algorithm. Network data updated every 128ms Di delay vector from node i Si successor node vector sij next node in minimum delay route from i to j N # of nodes in network lki current estimate of delay k to I A set of neighbor nodes

  13. 6 4 5 A B C D 6 2 4 4 1 4 E 2 8 F H G 4 3 5 4 2 2 4 K I J L I Distance Vector Routing : from node J Original network 3 2 lJK 3 lJI 4 lJF 4 Delay lJi

  14. Calculate new routes at node J Later time, some routes weights have changed Delay vectors received lJK 3 Measured Delay lJi lJF 4 lJI 4 New table for node J DK+IJK DK+3 DF+IJF DF+4 DI+IJI DI+4 SJ DJ SK DK SF DF SI DI

  15. First Generation Internet • The first generation internet routing algorithm was a distributed version of the Bellman Ford algorithm • The distance metric used was queue length on each outgoing node. This is a local measure and does not require information from neighbor nodes • Routing data exchanges occurred every 128ms

  16. Problems with first generation • Algorithm considered only queue length as a measure of link delay to nearest neighbors, capacity of the link was not considered. This worked reasonably when all links had the same capacity, but as the network grew higher capacity links were introduced. • Processing time was not considered • The algorithm responded slowly to congestion and failure (Count-to-infinity problem) • Thrashing occurred when packets followed minimal congestion route rather than aiming for the destination

  17. Count to Infinity problem • The example of the distributed Bellman Ford algorithm we considered assumed that all stations in the network already knew of the changes in costs. • In practice when conditions in a network change, the change will take time to propagate across the network. • Good news propagates quickly across a network • Bad news propagates slowly across the network

  18. Count to Infinity problem: • Consider a linear network with 6 stations • A is down initially and all other stations know this • A comes up, at the time of the first exchange of routing information after A comes up B learns that A is alive • At the time of the second exchange of routing information after A comes up C learns that A is alive • This pattern continues till the time of the sixth data exchange after A comes up, when F learns that A is alive. At this point all stations in the network have learned the good news F A E D B C

  19. Count to Infinity problem: • Linear network with 6 stations (all single hop costs 1) • A is up initially and all other stations know this • A goes down, at the time of the first exchange of routing information after A goes down B hears nothing from A. Since there is no direct path to A, B chooses an indirect path to A through C (which actually goes through B itself, but B doesn’t know this) • The first eight exchanges are illustrated on the next slide. F A E D B C

  20. Count to Infinity problem: • Linear network with 6 stations, single hop costs 1) 1 2 3 45 3 2 3 4 5 3 4 3 4 5 5 4 5 4 5 5 6 5 6 5 7 6 7 6 7 7 8 7 8 7 9 8 9 8 9 9 10 9 10 9 F A E D B C INITIALLY AFTER 1 EXCHANGE AFTER 2 EXCHANGES AFTER 3 EXCHANGES AFTER 4 EXCHANGES AFTER 5 EXCHANGES AFTER 6 EXCHANGES AFTER 7 EXCHANGES AFTER 8 EXCHANGES

  21. Count to Infinity problem: • Linear network with 6 stations (all single hop costs 1) • The number of iterations necessary to indicate that the link to 1 is down (cost infinite) is in fact infinite. It is clear that the delay increases as the number of iterations increase, but it is still necessary to ‘count to infinity’ to reach the correct link costs for link A-B down. F A E D B C

  22. Poison Reverse • Consider router A in a network • Router A’s neighbors are routers B, and C • Any entry in A’s routing table will be either • learned from B’s routing table distance to B + the distance from B to the destination • Learned from C’s routing table distance to C + the distance from C to the destination • Poison reverse means the routing table that A sends to its neighbors will be different for each neighbor • Routes learned from B’s routing table will have costs set to ∞ when A’s table is sent back to B • Routes learned from C’s routing table will have costs set to ∞ when A’s table is sent back to C

  23. Why Poison Reverse • Removes the possibility of loops between two neighboring nodes • Does not remove the possibility of longer loops Example: loop between neighboring nodes Router B determines the cost to destination X should pass through router C This information is sent to router C (poison reverse means that the path to X has cost ∞) The connection between router C and X has failed, so C is looking for an alternate route to X Without poison reverse C could choose to route to X through B not knowing B’s path through X included C With poison reverse the cost of the link through B is ∞ so C will choose any other path in preference and avoid the count to infinity problem

  24. Second generation internet • Distributed Dijkstra (Link State Routing) • Developed to correct the problems of the first generation algorithms. • Followed these steps: • Find neighbors (addresses) and measure delay to neighbors • Send a packet containing addresses and delays to neighbors information to all other routers • Receive similar packets from other routers and use the information to construct shortest path to every other router using Dijkstra’s algorithm

  25. Second generation internet • Developed to correct the problems of the first generation algorithms. • Followed these steps: • Find neighbors (addresses) using a HELLO packet • Measure delay to neighbors using an ECHO packet to measure round trip time ( may include queuing time) • Send a packet containing addresses and delays to neighbors information to all other routers every ten seconds using flooding • Receive similar packets from other routers and use the information to construct shortest path to every other router using Dijkstra’s algorithm

  26. Problems: second generation • Flooding caused significant overhead • The assumption that the measured packet delay was a good predictor of future link delay sometimes lead to oscillations. • When two paths connect two subnets oscillation may occur: • One path between subnets become congested • The second path is chosen for subsequent traffic. • All traffic is then routed through the second path causing congestion on that path and low use on the original path. • The original path is chosen for subsequent traffic • The original path again becomes congested and the cycle repeats • At any time only one of the two paths is being fully utilized

  27. Third generation internet • To correct the shortcomings of the second generation internet a new distance metric was devised. • The measured delay, T, is converted to a utilization (cost), ρ, using a single server queuing model. The service time, Ts, for a standard is the network wide average packet size divided by the data rate. • The result is smoothed by averaging it with the previous estimate, to give an average utilization at step n U(n) • The link cost is set as a function of the average utilization that is designed to provide a reasonable estimate of cost while avoiding oscillations

  28. Random Routing • Simple and robust. Similar to flooding but reduces the traffic load created by flooding. • Each station randomly chooses one of its neighbors to send the packet to rather than sending it to all neighbors. • For an intermediate station, the station is selected from nearest neighbors excluding the station the packet originated from • Each nearest neighbor is assigned a probability. The sum of the probabilities for all nearest neighbors is 1. • The probability for the ith nearest neighbor is based on some cost measure, for example data rates Pi= (Data rate of Link i)/( data rates for all nearest neighbors)

More Related