Download presentation
Presentation is loading. Please wait.
Published byAlban McDaniel Modified over 8 years ago
1
Data and Computer Communications Ninth Edition by William Stallings Unit 12 – Routing in Switched Data Networks Data and Computer Communications, Ninth Edition by William Stallings, (c) Pearson Education - Prentice Hall, 2011
2
Routing in Packet Switching Networks key design issue for (packet) switched networks select route across network between end nodes characteristics required: correctness correctness simplicity simplicity robustness (delivery in face of failures and overloads) robustness (delivery in face of failures and overloads) stability (dynamic state of links) stability (dynamic state of links) fairness (nearby versus faraway nodes) fairness (nearby versus faraway nodes) optimality (maximize average throughput) optimality (maximize average throughput) efficiency (processing overhead) efficiency (processing overhead)
3
Performance Criteria used for selection of route simplest is to choose “minimum hop” can be generalized as “least cost” routing because actual “least cost” is more flexible (with similar computational effort) it is more common than “minimum hop”
4
Elements of Routing Techniques for Packet- Switching Networks
5
Example of Packet Switched Network The shortest path (fewest hops) from node 1 to node 6 is 1-3-6 (cost is 5 + 5 = 10), but least-cost path is 1-4-5-6 (cost is 1 + 1 + 2 = 4). Costs are assigned to links to support one or more design objectives. For example, cost could be inversely related to data rate (higher data rate on a link, lower assigned cost of link) or current queuing delay on link.
6
Decision Time and Place decision time packet or virtual circuit basis fixed or dynamically changing decision place distributed - made by each node more complex, but also more robust centralized – made by a designated node source – made by source station and communicated to network
7
Network Information Source and Update Timing routing decisions usually based on (static or dynamic) knowledge of network, traffic load, and link cost distributed routing distributed routing using local knowledge, information from adjacent nodes, information from all nodes on a potential routeusing local knowledge, information from adjacent nodes, information from all nodes on a potential route central routing central routing collect information from all nodescollect information from all nodes issue of update timing depends on routing strategy fixed - never updated adaptive - regular updates to adapt to changing conditions
8
Routing Strategies - Fixed Routing use a single permanent route for each source to destination pair of nodes determined using a least cost algorithm route is fixed until a change in network topology until a change in network topology based on expected traffic or capacity based on expected traffic or capacity cannot be based on dynamic variable (traffic) cannot be based on dynamic variable (traffic) advantage is simplicity disadvantage is lack of flexibility does not react to network failure or congestion does not react to network failure or congestion
9
Fixed Routing Tables Central routing matrix (perhaps stored at network control center) – for each source- destination pair, identity of next node on the route – complete routes not stored, only first node on route From matrix, routing tables developed and stored at each node No difference between datagram and virtual circuit No flexibility unless refined via alternate next nodes provided
10
Routing Strategies - Flooding no network information required packet sent by node to every neighbor eventually multiple copies arrive at destination each packet is uniquely numbered so duplicates can be discarded need to limit incessant retransmission of packets nodes can remember identity of packets retransmitted nodes can remember identity of packets retransmitted can include a hop count, such as the diameter (length of the longest minimum-hop path through the network) of the network, in packets can include a hop count, such as the diameter (length of the longest minimum-hop path through the network) of the network, in packets decrement at each node; discard packet when count reaches zero decrement at each node; discard packet when count reaches zero
11
Properties of Flooding all possible routes are tried highly robust can be used to send emergency messages at least one packet will have taken minimum hop route nodes directly or indirectly connected to source are visited Disadvantages: high traffic load generated security concerns
12
Flooding Example 3 packets 9 packets 22 packets Packet to be sent from node 1 to node 6 Note: if hop count field used in each packet, such set as diameter (length of longest minimum-hop path through the network) of network - i.e. for each pair of end systems attached to network, there is a minimum hop path - length of longest such path is diameter of network
13
Routing Strategies - Random Routing simplicity of flooding with much less traffic load node selects one outgoing path for retransmission of incoming packet selection can be random or round robin a refinement is to select outgoing path based on probability calculation – based on data rate or fixed link costs ( e.g. R i / R j ) no network information (overhead) needed random route is typically neither least cost nor minimum hop – network must carry a higher than optimum traffic load (not as high as flooding)
14
Routing Strategies - Adaptive Routing used by almost all packet switching networks routing decisions change as conditions on the network change due to failure or congestion requires (dynamic) information about network Disadvantages: decisions more complex (node processing burden) decisions more complex (node processing burden) tradeoff between quality of network information and overhead (status info collected in one place, used in another) tradeoff between quality of network information and overhead (status info collected in one place, used in another) reacting too quickly can cause oscillation reacting too quickly can cause oscillation reacting too slowly means information may be irrelevant reacting too slowly means information may be irrelevant
15
Adaptive Routing Advantages improved performance aid in congestion control (we will see more later) *These benefits depend on the soundness of the design and nature of the load.
16
Classification of Adaptive Routing Strategies on the basis of information source
17
Isolated Adaptive Routing packet arrives at node 4 from node 1 with destination node 6 – min value is on link through node 3 since Q + B 6 is 4 (1 + 3) note: (outgoing) queue lengths of receiving node
18
Least Cost Algorithms for example: Dijkstra or Bellman-Ford algorithms (Floyd-Warshall all nodes) for each pair of nodes, find path with least cost link costs in different directions may be different defines cost of path between two nodes as sum of costs of links traversed network of nodes connected by bi- directional links link has a cost in each direction basis for routing decisions minimize hop with each link cost of 1 have link value inversely proportional to capacity
19
Least Cost Algorithms Basis for routing decisions Can minimize hop with each link cost 1 Can minimize hop with each link cost 1 Can have link value inversely proportional to capacity Can have link value inversely proportional to capacity Given network of nodes connected by bi-directional links Each link has a cost in each direction Define cost of path between two nodes as sum of costs of links traversed For each pair of nodes, find a path with the least cost Link costs in different directions may be different e.g. length of packet queue e.g. length of packet queue
20
Dijkstra’s Algorithm Find shortest paths from given source node to all other nodes, by developing paths in order of increasing path length N =set of nodes in the network s =source node T =set of nodes so far incorporated by the algorithm w(i, j) = link cost from node i to node j w(i, i) = 0 w(i, i) = 0 w(i, j) = if the two nodes are not directly connected w(i, j) = if the two nodes are not directly connected w(i, j) 0 if the two nodes are directly connected w(i, j) 0 if the two nodes are directly connected L(n) = cost of least-cost path from node s to node n currently known At termination, L(n) is cost of least-cost path from s to n At termination, L(n) is cost of least-cost path from s to n
21
Dijkstra’s Algorithm Method Step 1 [Initialization] T = {s} Set of nodes so far incorporated consists of only source node T = {s} Set of nodes so far incorporated consists of only source node L(n) = w(s, n) for n ≠ s L(n) = w(s, n) for n ≠ s Initial path costs to neighboring nodes are simply link costs Initial path costs to neighboring nodes are simply link costs Step 2 [Get Next Node] Find neighboring node not in T with least-cost path from s Find neighboring node not in T with least-cost path from s Incorporate node into T Incorporate node into T Also incorporate the edge that is incident on that node and a node in T that contributes to the path Also incorporate the edge that is incident on that node and a node in T that contributes to the path Step 3 [Update Least-Cost Paths] L(n) = min[L(n), L(x) + w(x, n)] for all n T L(n) = min[L(n), L(x) + w(x, n)] for all n T If latter term is minimum, path from s to n is path from s to x concatenated with edge from x to n If latter term is minimum, path from s to n is path from s to x concatenated with edge from x to n Algorithm terminates when all nodes have been added to T
22
Dijkstra’s Algorithm Notes At termination, value L(x) associated with each node x is cost (length) of least-cost path from s to x. In addition, T defines least-cost path from s to each other node One iteration of steps 2 and 3 adds one new node to T Defines least cost path from s to that node Defines least cost path from s to that node
23
Example of Dijkstra’s Algorithm 1 4 5 3 6 2
24
Ite rat ion TL(2)PathL(3)PathL(4)PathL(5)PathL(6)Path 1{1}21–251-311–4-- 2 {1,4} 21–241-4-311–421-4–5- 3 {1, 2, 4} 21–241-4-311–421-4–5- 4 {1, 2, 4, 5} 21–231-4-5-311–421-4–541-4-5–6 5 {1, 2, 3, 4, 5} 21–231-4-5-311–421-4–541-4-5–6 6 {1, 2, 3, 4, 5, 6} 21-231-4-5-311-421-4–541-4-5-6
25
25 Dijkstra’s Algorithm
26
Set value[0] to 0, the rest of the values to Place node 0 (the source) into class 1, the rest into class 2 while the sink node is not in class 1 do The last node put in class 1 is the pivotal node for all nodes j in class 2: if this node j is not connected to the pivotal node then do nothing else if the value of the pivotal node + edge value is less than value of node j then value of node j is assigned then value of node j is assigned the value of the pivotal node + edge value else do nothing end for Add the node in class 2 with minimum value to class 1 end while L(n) = min[L(n), L(x) + w(x, n)] for all n T
27
27 Dijkstra’s Algorithm PREDECESSORPIVOTAL NODEClass 1 = value[0] =Class 2 = value[1] = ∞ value[2] = ∞ value[3] = ∞ value[4] = ∞ value[5] = ∞ value[6] = ∞
28
28 Another Example a edc b 152 4 6 3 7 0 1 3 2 4
29
ARPANET Routing Strategies First Generation - 1969 ARPANET - foundation of present-day Internet ARPANET - foundation of present-day Internet Distributed adaptive routing Distributed adaptive routing Estimated delay as performance criterion (distance- vector routing – Delay and Successor vectors for each node) Estimated delay as performance criterion (distance- vector routing – Delay and Successor vectors for each node) Node exchanges delay vector with neighbors (every 128 milliseconds) Node exchanges delay vector with neighbors (every 128 milliseconds) Update routing table based on incoming info Update routing table based on incoming info Bellman-Ford algorithm (least-cost routing algorithm) Bellman-Ford algorithm (least-cost routing algorithm) Doesn't consider link speed; just uses queue length as estimator of node delay Doesn't consider link speed; just uses queue length as estimator of node delay Queue length not a good measurement of delay Queue length not a good measurement of delay Responds slowly to congestion Responds slowly to congestion
30
ARPANET Routing Strategies Second Generation - 1979 Addressed shortcomings of first generation (i.e. in which line speed not considered – only queue length … slow response to congestion) Addressed shortcomings of first generation (i.e. in which line speed not considered – only queue length … slow response to congestion) Used delay as performance criterion Used delay as performance criterion Delay measured directly (not just as the artificial measure of queue length - using packet time-stamping - departure time minus arrival time plus transmission and propagation times – thus includes link data rate) – every 10 seconds Delay measured directly (not just as the artificial measure of queue length - using packet time-stamping - departure time minus arrival time plus transmission and propagation times – thus includes link data rate) – every 10 seconds If significant delay changes, then flood this info out to all other nodes If significant delay changes, then flood this info out to all other nodes (re)computation using Dijkstra’s least-cost algorithm (re)computation using Dijkstra’s least-cost algorithm works good under light and medium loads works good under light and medium loads but under heavy loads, little correlation between reported delays and those experienced but under heavy loads, little correlation between reported delays and those experienced
31
ARPANET Routing Strategies Third Generation - 1987 as network load grew, new strategy needed as network load grew, new strategy needed Link cost calculations changed Link cost calculations changed Measure average delay over last 10 seconds – routing so that average path good instead of all routes Measure average delay over last 10 seconds – routing so that average path good instead of all routes Normalize to value achieved on idle line (just transmission and propagation times) and based on current value versus previous results Normalize to value achieved on idle line (just transmission and propagation times) and based on current value versus previous results Revised cost function keyed to utilization rather than delay Revised cost function keyed to utilization rather than delay Function acts similar to delay-based metric under light loads and to capacity-based metric under heavier loads Function acts similar to delay-based metric under light loads and to capacity-based metric under heavier loads
32
Summary routing in packet-switched networks routing techniques routing strategies fixed, flooding, random, adaptive fixed, flooding, random, adaptive least-cost algorithms Dijkstra, Bellman-Ford Dijkstra, Bellman-Ford evolution of ARPANET routing strategies
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.