CS60002: Distributed Systems

Slides:



Advertisements
Similar presentations
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
Advertisements

Fundamentals of Computer Networks ECE 478/578 Lecture #13: Packet Switching (2) Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
13 –Routing Protocols Network Layer4-1. Network Layer4-2 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd.
Distance-Vector and Path-Vector Routing Sections , 4.3.2, COS 461: Computer Networks Spring 2011 Mike Freedman
Routing - I Important concepts: link state based routing, distance vector based routing.
Adaptive Routing Proshanto Mukherji CSC 457: Computer Networks University of Rochester.
Distance-Vector Routing COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Michael Freedman
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Link State and Distance Vector Routing Computer Science Division Department of Electrical.
Discrete Math for CS Chapter 8: Directed Graphs. Discrete Math for CS digraph: A digraph is a graph G = (V,E) where V is a finite set of vertices and.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 21 Introduction to Computer Networks.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.5 Routing algorithms m Link state m Distance.
Announcement r Project 2 due next week! r Homework 3 available soon, will put it online r Recitation tomorrow on Minet and project 2.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other.
Distributed Asynchronous Bellman-Ford Algorithm
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
WAN technologies and routing Packet switches and store and forward Hierarchical addresses, routing and routing tables Routing table computation Example.
10.- Graph Algorithms Centro de Investigación y Estudios Avanzados del Instituto Politécnico Nacional Introduction Routing Algorithms Computation of Shortest.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
13 – Routing Algorithms Network Layer.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 5 Network Layer.
The Destination Sequenced Distance Vector (DSDV) protocol
The Network Layer & Routing
Routing 2 CS457 Fall 2010.
Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor.
Quality of Service Routing Anunay Tiwari Anirudha Sahoo.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
CSE 461 University of Washington1 Topic How do we connect nodes with a switch instead of multiple access – Uses multiple links/wires – Basis of modern.
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 20 Omar Meqdadi Department of Computer Science and Software Engineering University.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley Chapter4_3.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Trees Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering, IIT
4: Network Layer4-1 Chapter 4: Network Layer Last time: r Chapter Goals m Understand network layer principles and Internet implementation r Started routing.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
Shortest Path -Prim’s -Djikstra’s. PRIM’s - Minimum Spanning Tree -A spanning tree of a graph is a tree that has all the vertices of the graph connected.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
Network Layer.
Routing Jennifer Rexford.
Routing: Link State Algorithm
Deadlock-free Packet Switching
CS60002: Distributed Systems
CS 457 – Lecture 12 Routing Spring 2012.
Network Layer Introduction Datagram networks IP: Internet Protocol
Routing: Distance Vector Algorithm
Chapter 5 Network Layer.
Wave and Traversal Algorithms
Road Map I. Introduction II. IP Protocols III. Transport Layer
Lecture 10 Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CS3516: These slides are generated from.
CS 4700 / CS 5700 Network Fundamentals
Distance and Routing Labeling Schemes in Graphs
CS 3700 Networks and Distributed Systems
Dijkstra’s Algorithm for the Shortest Path Problem
Logical Clocks and Casual Ordering
CS4470 Computer Networking Protocols
CS 3700 Networks and Distributed Systems
Shortest path algorithm
Non-Distributed Excercises
Advanced Computer Networks
Fundamental Data Structures and Algorithms
Routing.
Wide Area Networks (WANs), Routing, and Shortest Paths
Network Layer (contd.) Routing
Brad Karp UCL Computer Science
EE 122: Intra-domain routing: Distance Vector
Wide Area Networks (WANs), Routing, and Shortest Paths
Network Layer.
EE 122: Intra-domain routing: Link State
Presentation transcript:

CS60002: Distributed Systems Routing Algorithms CS60002: Distributed Systems Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Main Features Table Computation The routing tables must be computed when the network is initialized and must be brought up-to-date if the topology of the network changes Packet Forwarding When a packet is to be sent through the network, it must be forwarded using the routing tables INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Performance Issues Correctness : The algorithm must deliver every packet to its ultimate destination Complexity : The algorithm for the computation of the tables must use as few messages, time, and storage as possible Efficiency : The algorithm must send packets through good paths Robustness : In the case of a topological change, the algorithm updates the routing tables appropriately Fairness : The algorithm must provide service to every user in the same degree INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Good paths … Minimum hop: The cost of a path is the number of hops Shortest path: Each channel has a non-negative cost – the path cost is the sum of the cost of the edges. Packets are routed along shortest paths. Minimum delay/congestion: The bandwidth of a path is the minimum among the bandwidths of the channels on that path. Most robust path: Given the probability of packet drops in each channel, packets are to be routed along the most reliable paths. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Destination-based Forwarding // A packet with destination d was received or generated at node u if d = u then deliver the packet locally else send the packet to table_lookupu(d) INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Floyd-Warshall Algorithm begin S = ; forall u, v do if u = v then D[u, v] = 0 else if uv  E then D[u, v] = wu,v else D[u, v] =  ; while S  V do // Loop invariant: u, v: D[u, v] = dS(u, v) begin pick w from V \ S; forall u  V do forall v  V do D[u, v] = min{ D[u, v], D[u, w] + D[w, v] } S = S U { w } end INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

The simple distributed algorithm // For node u … var Su : set of nodes; Du : array of weights; Nbu : array of nodes; begin Su = ; forall v  V do if v = u then begin Du[v] = 0; Nbu[v] = udef end else if v  Neighu then begin Du[v] = wu,v; Nbu[v] = v end else begin Du[v] =  ; Nbu[v] = udef end; INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

The simple distributed algorithm contd… while Su  V do begin pick w from V \ Su; // All nodes must pick the same w if u = w then broadcast the table Dw else receive the table Dw forall v  V do if Du[w] + Dw[v] < Du[v] then begin Du[v] = Du[w] + Dw[v] ; Nbu[v] = Nbu[w] end ; Su = Su U { w } end INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Important property of the simple algorithm Let S and w be given and suppose that (1) for all u, Du[w] = dS(u, w) and (2) if dS(u, w) <  and u  w, then Nbu[w] is the first channel of a shortest S-path to w Then the directed graph Tw = (Vw, Ew), where (u  Vw  Du[w] < ) and (ux  Ew  ( u  w  Nbu[w] = x )) is a tree rooted towards w. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Toueg’s improvement Toueg’s observation: A node u for which Du[w] =  at the start of the w-pivot round does not change its tables during the w-pivot round. If Du[w] =  then Du[w] + Dw[v] < Du[v] is false for every v. Consequently, only the nodes that belong to Tw need to receive w’s table, and the broadcast operation can be done efficiently by sending the table Dw only via the channels that belong to the tree Tw INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

The Chandy-Misra Algorithm var Du[v0] : weight init  ; Nbu[v0] : node init udef ; For node v0 only: begin Dv0[v0] = 0 ; forall w  Neighv0 do send mydist, v0, 0 to w end Processing a mydist, v0, d message from neighbor w by u: { mydist, v0, d  Mwu } begin receive mydist, v0, d from w ; if d + uw < Du[v0] then begin Du[v0] = d + uw ; Nbu[v0] = w ; forall x  Neighu do send mydist, v0, Du[v0]  to x INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

The Netchange Algorithm Computes routing tables according to minimum-hop measure Assumptions: N1: The nodes know the size of the network (N) N2: The channels satisfy the FIFO assumption N3: Nodes are notified of failures and repairs of their adjacent channels N4: The cost of a path equals the number of channels in the path Requirements: R1. If the topology of the network remains constant after a finite number of topological changes, then the algorithm terminates after a finite number of steps. R2. When the algorithm terminates, the tables Nbu[v] satisfy (a) if v = u then Nbu[v] = local ; (b) if a path from u to v  u exists then Nbu[v] = w, where w is the first neighbor of u on a shortest path from u to v ; (c) if no path from u to v exists then Nbu[v] = udef. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

The Netchange Algorithm var Neighu : set of nodes ; // The neighbors of u Du : array of 0 .. N ; // Du[v] estimates d(u,v) Nbu : array of nodes ; // Nbu[v] is preferred neighbor for v ndisu : array of 0 .. N ; // ndisu[w, v] estimates d(w,v) Initialization: begin forall w  Neighu, v  V do ndisu[w, v] = N ; forall v  V do begin Du[v] = N ; Nbu[v] = udef end ; Du[u] = 0 ; Nbu[u] = local ; forall w  Neighu do send mydist, u, 0 to w end INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

The Netchange Algorithm contd. Procedure Recompute( v ): begin if v = u then begin Du[v] = 0 ; Nbu[v] = local end else begin // estimate distance to v d = 1 + min{ ndisu[w,v] : w  Neighu } ; if d < N then begin Du[v] = d ; Nbu[v] = w with 1 + ndisu[w,v] = d end else begin Du[v] = N ; Nbu[v] = udef end end ; if Du[v] has changed then forall x  Neighu do send mydist, v, Du[v]  to x INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

The Netchange Algorithm contd. Processing a mydist, v, d message from neighbor w: { A mydist, v, d is at the head of Qwv } begin receive mydist, v, d from w ; ndisu[w,v] = d ; Recompute( v ) end Upon failure of channel uw: begin receive fail, w ; Neighu = Neighu \ {w} ; forall v  V do Recompute( v ) Upon repair of channel uw: begin receive repair, w ; Neighu = Neighu U {w} ; forall v  V do begin ndisu[w,v] = N ; send mydist, v, Du[v]  to w INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Example Let us observe how this network comes up. Node Initialization: NeighA = {B,D} NeighD = {A,E} NeighB = {A,E} NeighE = {B,D,F} NeighC = {F} NeighF = {C,E} A B D E F C ndisu [w,v] = N for all w in Neighu V = {A, B, C, D, E, F} Du [v] = N (shown as - ), Nbu [v] = udef , for all v in V DA [A] = DB [B] = DC [C] = DD [D] = DE [E] = DF [F] = 0 NbA [A] = NbB [B] = NbC [C] = NbD [D] = NbE [E] = NbF [F]= local Every node u sends <mydist, u, 0> to all its neighbors. <mydist, A, 0> <mydist, B, 0> A B E <mydist, B, 0> <mydist, E, 0>

Recomputing for each message Example After first exchange of messages- ROUND-1 A B C D E F - Recomputing for each message DA 1 DB DC DD DE DF NA l u NB I NC ND NE NF A B C D E F 1 -

Recomputing for each message Example ROUND 2: A B C D E F 1 - Recomputing for each message DA 2 DB DC DD DE DF NA l u NB I NC ND NE NF A B C D E F 1 - 2

Recomputing for each message Example ROUND 3: A B C D E F 1 - 2 Recomputing for each message DA 3 DB DC DD DE DF NA l u NB I NC ND NE NF A B C D E F 1 3 2 -

Recomputing for each message Example ROUND 4: A B C D E F 1 3 2 - Recomputing for each message DA 4 DB DC DD DE DF NA l NB I NC ND NE NF A B C D E F 1 3 2 -

Example ROUND 5: A B C D E F 1 3 2 4

Routing with Compact Routing Tables The algorithms studied require each node to maintain a routing table with an entry for each possible destination. How many destinations can there be? Is there a way to reorganize the routing tables and still remember which channel caters to which destinations? Indexing the routing table by channel. Each channel of the node has an entry informing which destinations must be routed via that channel. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Tree-Labeling Scheme ZN = { 0, 1, …, N-1 } Cyclic Intervals The cyclic interval [a,b) in ZN is the set of integers defined by: [a,a) = ZN The compliment of [a,b) is [b,a) when a ≠ b The cyclic interval [a,b) is called linear if a < b. {a,a+1,…, b-1} if a<b {0,…,b-1,a,…, N-1} if a ≥ b [a, b) = INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Tree-Labeling Scheme The nodes of a tree T can be numbered such that For each outgoing channel of each node, the set of destinations that must be routed via that channel is a cyclic interval. v0 lvo = 0 w w' lw lw’ = lw + |T[w]| T[w] lx = lw + |T[w]| - 1 x Let v0 be the root of the tree. For each node w let T[w] denote the subtree of T rooted at w Number the nodes in the tree such that for each w the numbers assigned to the nodes in T[w] form a linear interval. Let [aw, bw) denote the interval assigned to nodes in T[w]. Node w forwards to a son u packets with destinations in T[u], with labels in [au, bu) Node w forwards to a father packets with destinations not in T[u], with labels in ZN\ [aw, bw) = [bw, aw) INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Tree-Labeling Scheme αuw = lw if w is a son of u Procedure for Interval Forwarding (for node u) : if d = lu then deliver the packet locally else begin select αi s.t d  [αi , αi+1 ]; send packet via the channel labeled with αi end ; Representing a single interval requires 2 log N bits A node u has many intervals at the node. Only the start point of the interval for a channel is stored; the end point being the next begin point of an interval at the same node. At node u, the begin point of the interval for channel uw is given by: lw if w is a son of u lu + |T[u]| if w is the father of u αuw = INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR