Routing 4. Mar. 004 1 INF-3190: Switching and Routing
Routing: Foundations! Task! To define the route of packets through the network! From the source! To the destination system! Routing algorithm! Defines on which outgoing line an incoming packet will be transmitted! Route determination! Datagram! Routing algorithm makes individual decision for each packet! Virtual circuit! Routing algorithm runs only during connect (session routing) 4. Mar. 004 INF-3190: Switching and Routing
Routing: Routing and Forwarding! Distinction can be made! Routing: makes decision which route to use! Forwarding: what happens when a packet arrives Topology, link utilization, etc. information Router Routing Process Fills & Updates destination link A 0 B 3 Routing table C 1 Uses & Looks up D 4 Data packets Incoming lines Forwarding Process Outgoing lines 4. Mar. 004 3 INF-3190: Switching and Routing
Good Properties for Routing Algorithms! Correctness! Simplicity! Minimize load of routers! Robustness! Compensation for IS and link failures! Handling of topology and traffic changes! Stability! Consistent results! No volatile adaptations to new conditions! Fairness! Among different sources compared to each other! Optimality 4. Mar. 004 4 INF-3190: Switching and Routing
Routing Algorithms: Conflicting Properties! Often conflicting: fairness and optimization! Some different optimization criteria! Average packet delay! Total throughput! Individual delay! Conflict! Example: A B C X X A B C! Communication among A A, B B, C C uses full capacity of horizontal line! Optimized throughput, but! No fairness for X and X! Tradeoff between fairness and optimization! Therefore often! Hop minimization per packet! It tends to reduce delays and decreases required bandwidth! Also tends to increase throughput 4. Mar. 004 5 INF-3190: Switching and Routing
Classes of Routing Algorithms! Class Non-adaptive Algorithms! Current network state not taken into consideration! Assume average values! All routes are defined off-line before the network is put into operation! No change during operation (static routing)! With knowledge of the overall topology! Spanning tree! Flow-based routing! Without knowledge of the overall topology! Flooding! Class Adaptive Algorithms! Decisions are based on current network state! Measurements / estimates of the topology and the traffic volume! Further sub-classification into! Centralized algorithms! Isolated algorithms! Distributed algorithms 4. Mar. 004 6 INF-3190: Switching and Routing
Optimality Principle and Sink Tree! General statement about optimal routes! If router J is on optimal path from router I to router K! Then the optimal path from router J to router K uses the same route! Example:! r1: route from I to J! r: route from J to K! If better route r from J to K would exist! Then! Concatenation of r1 and r would improve route from I to K! Set of optimal routes! From all sources! To a given destination form a tree rooted at the destination: Sink Tree r1 r1 I J K r 4. Mar. 004 7 INF-3190: Switching and Routing
Sink Tree Subnet! Comments! Tree: no loops F A K G L D B M H E! Each optimal route is finite with bounded number of hops! Not necessarily unique! Other trees with same path lengths may exist! Goal of all routing algorithms! Discover and use the sink trees for all routers! Not realistic to use Sink Trees as real-life routing algorithm! Need complete information about topology! Sink Tree is only a benchmark for routing algorithms 4. Mar. 004 8 INF-3190: Switching and Routing I C J N O Sink Tree for Destination B
Methodology & Metrics! Networks represented as graphs:! Node represents a router! Edge represents a communication line (link)! Compute the shortest path between a given pair of routers! Different metrics for path lengths can be used! Can lead to different results! Sometime even combined (but this leads to computational problems)! Metrics for the "ideal" route, e.g., a "short" route! Number of hops! Geographical distance! Bandwidth! Average data volume! Cost of communication! Delay in queues!... 4. Mar. 004 9 INF-3190: Switching and Routing
Non- Adaptive Routing Shortest Path Routing 4. Mar. 004 10 INF-3190: Switching and Routing
Non-Adaptive Shortest Path Routing! Static Procedure! Network operator generates tables! Tables! Are loaded when IS operation is initiated and! Will not be changed any more! Characteristics! Simple! Good results with relatively consistent topology and traffic! But! Poor performance if traffic volume or topologies change over time 4. Mar. 004 11 INF-3190: Switching and Routing
Non-Adaptive Shortest Path Routing! Spanning Tree and Optimized Route! Information about the entire network has to be available! i. e. application actually as a benchmark comparison! Example! Link is labeled with distance / weight! Node is labeled with distance from source node along best known path (in parentheses)! Find the shortest path from A to D A 6 B (,-) 1 G (,-) 7 E (,-) 4 3 F (,-) C (,-) 3 H (,-) D (,-) 4. Mar. 004 1 INF-3190: Switching and Routing
Non-Adaptive Shortest Path Routing! Procedure: e. g. according to Dijkstra! Find the shortest path from A to D! Labels may be permanent or tentative! Initially, no paths are known! All nodes are labeled with infinity (tentative)! Discover the labels that represent shortest possible path from source to any node! Make those labels permanent 1. Node A labeled as permanent (filled-in circle). Relabel all directly adjacent nodes with the distance to A (path length, nodes adjacent to source) 3. Examine all tentatively labeled nodes, make the node with the smallest label permanent 4. This node will be the new working node for the iterative procedure (i.e., continue with step.) 4. Mar. 004 13 INF-3190: Switching and Routing
Non-Adaptive Shortest Path Routing B (,A) (,-) 7 C (,-) A 6 1 G (,-) (6,A) E (,-) 4 3 F (,-) 3 H (,-) D (,-)! Procedure: e. g. according to Dijkstra! Find the shortest path from A to D: 1. A flagged as permanent (filled-in circle). Relabel all directly adjacent nodes with the distance to A! (path length, IS adjacent to the source): 4. Mar. 004 14 INF-3190: Switching and Routing
Non-Adaptive Shortest Path Routing B (,A) 7 C (,-) A 6 1 G (6,A) E (,-) 4 3 F (,-) 3 H (,-) D (,-)! Procedure: e. g. according Dijkstra! Find the shortest path from A to D:!... 3. Compare all recent, not firmly flagged IS;! flag the one with the lowest number as fixed 4. This IS is the origin of the iterative procedure! (i. e. continue with item.) 4. Mar. 004 15 INF-3190: Switching and Routing
Non-Adaptive Shortest Path Routing B (,A) 7 C (,-) (9,B) A 6 1 G (6,A) E (,-) (4,B) 4 3 F (,-) 3 H (,-) D (,-)! Procedure: e.g., according to Dijkstra! Find the shortest path from A to D: 1. Node B has been labeled as permanent (filled-in circle). relabel all directly adjacent nodes with the distance to B (path length, nodes adjacent to source):! A (does not apply, because it is the origin), 4. Mar. 004 16 INF-3190: Switching and Routing
Non-Adaptive Shortest Path Routing A 6 B (,A) 1 G (5,E) (6,A) 7 E (4,B) 4 3 F (,-) (6,E) C (9,B) 3 H (,-) (8,F) (9,G) D (,-) (10,H)! Procedure: e.g., according to Dijkstra! find the shortest path from A to D: 1.. 3. examine all tentatively labeled nodes;! make the node with the smallest label permanent 4. this node will be the new working node for the iterative procedure... 4. Mar. 004 17 INF-3190: Switching and Routing
Non- Adaptive Routing Flooding 4. Mar. 004 18 INF-3190: Switching and Routing
Flooding! Principle! IS transmits the received packet to all adjacent IS! But generates "an infinite amount" of packets! Flood limitations! Hop counter in the packet header! Initialize to destination s distance, or subnet diameter is unknown! Decrement per hop, discard packet at 0! Keeping history of transferred packets in ISs, delete copies! Source router inserts sequence number into each packet! ISs keeps per-router history of sequence numbers! Old packets are dropped 4. Mar. 004 19 INF-3190: Switching and Routing
Selective Flooding! Approach! Do not send out on every line! IS transmits received packet to adjacent stations, located in the Direction of the Destination! With regular topologies this makes sense and is an optimization! But some topologies do not fit well to this approach! Comment! Geographically-oriented routing got recent interest for mobile scenarios 4. Mar. 004 0 INF-3190: Switching and Routing
Flooding! Evaluation and use! In most scenarios impractical because of overhead! Extremely robust! Reaches all ISs! Does not need topology information, no bootstrap! Always finds the shortest path 4. Mar. 004 1 INF-3190: Switching and Routing
Adaptive Routing 4. Mar. 004 INF-3190: Switching and Routing
Adaptive Routing! Class Adaptive Algorithms! Decisions are based on current network state! Measurements / estimates of the topology and the traffic volume! Further sub-classification into! Centralized algorithms! Isolated algorithms! Distributed algorithms 4. Mar. 004 3 INF-3190: Switching and Routing
Adaptive Routing Centralized Routing 4. Mar. 004 4 INF-3190: Switching and Routing
Adaptive Centralized Routing! Principle! One routing control center (RCC) exists in the network! Each IS sends periodically status updates to the RCC! Available neighbors! Current queue length! Line utilization!! RCC! Collects information! Computes the optimal path each IS pair! Forms routing tables! Distributes tables to ISs 4. Mar. 004 5 INF-3190: Switching and Routing
Adaptive Centralized Routing! Characteristics! RCC has complete information! IS is free of routing calculations! But! Re-calculations quite often necessary (approx. once/min or more often)! Low robustness! No correct decisions if network is partitioned! ISs receive tables at different times! Traffic concentration in RCC proximity RCC 4. Mar. 004 6 INF-3190: Switching and Routing
Adaptive Routing Isolated Routing 4. Mar. 004 7 INF-3190: Switching and Routing
Adaptive Isolated Routing through Backward Learning! Isolated routing! Every IS makes decision based on locally gathered information only! No exchange of routing information among nodes! Only limited adaptation possibility to changed traffic or topology! IS learns from received packets! Source IS! Distance estimate by hop count 4. Mar. 004 8 INF-3190: Switching and Routing
Adaptive Isolated Routing through Backward Learning! Packet! From source S! received on line L! after C hops S is reachable on L within C hops! Routing table in IS! L - table (destination - IS, outgoing line, C min )! Update of the routing table! IS receives packet (..., S, C,... ) on L if not (S in L-Table) then Add(S,L,C) else if C < C min then Update(S,L,C) 4. Mar. 004 9 INF-3190: Switching and Routing
Adaptive Isolated Routing through Backward Learning! Example: D learns about A! packet (..., source - IS, section counter,...)! P1 (..., A, 4,... ) Add ( A, l1, 4 )! P (..., A, 3,... ) Update ( A, l, 3 )?? I 1 A?? I D 4. Mar. 004 30 INF-3190: Switching and Routing
Adaptive Isolated Routing through Backward Learning! Problem! Packets use a different route, e. g. because of failures, high load! Algorithm retains only the old value (because it was "better"),! i. e. algorithm does not react to deteriorations! Solution! Periodic deletion of routing tables (new learning period)! Table deletion! Too often: mainly during the learning phase! Not often enough: reaction to deteriorations too slow 4. Mar. 004 31 INF-3190: Switching and Routing
Adaptive Routing Distributed Routing Distance Vector 4. Mar. 004 3 INF-3190: Switching and Routing
Distance Vector Routing! Distance-Vector Routing! Group of Distance Vector Routing Algorithms! Also known as! Distributed Bellman-Ford algorithm, Ford-Fulkerson algorithm! Use! Was the original ARPANET routing algorithm! Has been used in the Internet as RIP (Routing Information Protocol)! Basic principle! IS maintains table (i.e., vector) stating! Best known distance to destinations! And line to be used! ISs update tables! By exchanging routing information with their neighbors 4. Mar. 004 33 INF-3190: Switching and Routing
Distance Vector Routing! Each IS! maintains routing table with one entry per router in the subnet! is assumed to know the distances to each neighbor! IS sends list with estimated distances to each destination periodically to its neighbors! X receives list E(Z) from neighbor Y! Distance X to Y: e! Distance Y to Z: E(Z)! Distance X to Z via Y: E(Z)+e! IS computes new routing table from the received lists containing! Destination IS! Preferred outgoing path! Distance 4. Mar. 004 34 INF-3190: Switching and Routing
Distance Vector Routing A B C D G E H F I J K L A A 0 B 1 C 5 D 40 E 14 F 3 G 18 H 17 I 1 J 9 K 4 L 9 I 4 36 18 7 7 0 31 0 0 11 33 H 0 31 19 8 30 19 6 0 14 7 9 K 1 8 36 4 40 31 19 10 0 9 line 8 A 0 A 8 IH 0 17 I 30 I 18 H 1 H 10 I 0-6 K 15 K delay JA 8 JI 10 JH 1 JK 6! Previous routing table will not be taken into account! Reaction to deteriorations 4. Mar. 004 35 INF-3190: Switching and Routing
Distance Vector Routing! Fast route improvement! Fast distribution of information about new short paths (with few hops)! Example! initially A unknown! later: A connected with distance 1 to B, this will be announced! Distribution proportional to topological spread! Synchronous (stepwise) update is a simplification A B C D E 1 1 1 3 1 3 4 4. Mar. 004 36 INF-3190: Switching and Routing
Distance Vector Routing! Slow distribution of information about new long paths (with many hops)! Count to Infinity problem of DVR! Example: deterioration! Here: connection destroyed! A previously known, but now detached! The values are derived from (incorrect) connections of distant IS! Comment! Limit "infinite" to a finite value, depending on the metrics, e.g.! infinite = maximum path length+1 A B C D E 1 3 4 3 3 4 3 4 3 4 5 4 5 6 5 6 5 6 7 6 7 6 7 8 7 8 4. Mar. 004 37 INF-3190: Switching and Routing
Distance Vector Routing! Variant: Split Horizon Algorithm! Objective: improve the "count to infinity" problem! Principle! In general, to publicize the "distance" to each neighbour! If neighbor Y exists on the reported route, X reports the response "false" to Y! distance X (via Y) according to arbitrary i:! Example: deterioration (connection destroyed)! B to C: A = (real), C to B: A = (because A is on path),...! But: still poor, depending on topology, example! Connection CD is removed! A receives "false information" via B! B receives "false information" via A! Slow distribution (just as before) A B C D E 1 3 4 3 4 3 4 4 4. Mar. 004 38 INF-3190: Switching and Routing A B C D
Adaptive Routing Distributed Routing Link State Routing 4. Mar. 004 39 INF-3190: Switching and Routing
Link State Routing! Basic principle! IS measures the "distance" to the directly adjacent IS! Distributes information! Calculates the ideal route! Procedure 1. Determine the address of adjacent IS. Measure the "distance" (delay,...) to neighbouring IS 3. Organize the local link state information in a packet 4. Distribute the information to all IS 5. Calculate the route based on the information of all IS! Use! Introduced into the ARPANET in 1979, nowadays most prevalent! IS-IS (Intermediate System-Intermediate System)! developed by DECNET! also used as ISO CLNP in NSFNET! Novell Netware developed its own variation from this (NLSP)! OSPF (Open Shortest Path First)! since 1990 Internet RFC 147 4. Mar. 004 40 INF-3190: Switching and Routing
Link State Routing 1. Phase: gather information about the adjacent intermediate systems B D E G H I B D E G H I A C F A C LAN F 4. Mar. 004 41 INF-3190: Switching and Routing
Link State Routing 1. Phase: gather information about the adjacent intermediate systems B D E G H I B D E G H I A C F A C F LAN Initialization procedure! New IS! Sends a HELLO message over each L channel! Adjacent IS! Responds with its own address, unique within the network N 4. Mar. 004 4 INF-3190: Switching and Routing
Link State Routing. Phase: measure the "distance"! Definition of distance needed! Usually delay! Where to measure? Topology, link utilization, etc. information Router Routing Process Fills & Updates destination link A 0 B 3 Routing table When to start timer? C 1 Uses & Looks up D 4 Data packets ECHO Incoming lines Forwarding Process Queues HELLO Outgoing lines 4. Mar. 004 43 INF-3190: Switching and Routing
Link State Routing. Phase: measure the "distance! Queuing delay! Measuring without does not take load into account! Measuring with does usually better West East G B C F A H D E I J! But! Possibility for oscillations (route flapping)! Once per routing table update 4. Mar. 004 44 INF-3190: Switching and Routing
Link State Routing 3. Phase: organizing the information as link state packet! Including own address, sequence number, age, "distance"! Timing problems: validity and time of sending! Periodically! In case of major changes A B C 4 3 5 1 6 7 E 8 F D Link State Packets: A Seq. Age B 4 E 5 B C D E F Seq. Seq. Seq. Seq. Seq. Age Age Age Age Age A 4 B C3 A 5 B 6 C D 3 F 7 C 1 D 7 F 6 E 1 F 8 E 8 4. Mar. 004 45 INF-3190: Switching and Routing
Link State Routing 4. Distributing the local information to all IS! By applying the flooding procedure (very robust)! Therefore sequence number in packets! Problem: inconsistency! Varying states simultaneously available in the network! Indicate and limit the age of packet, i. e. IS removes packets that are too old 5. Computing new routes! Each IS for itself! Possibly larger amount of data available 4. Mar. 004 46 INF-3190: Switching and Routing