Distributed Algorithms in Networks EECS 122: Lecture 17

Similar documents
Distributed Routing. EECS 228 Abhay Parekh

What is Routing? EE 122: Shortest Path Routing. Example. Internet Routing. Ion Stoica TAs: Junda Liu, DK Moon, David Zats

Review: Routing in Packet Networks Shortest Path Algorithms: Dijkstra s & Bellman-Ford. Routing: Issues

IP Forwarding Computer Networking. Graph Model. Routes from Node A. Lecture 11: Intra-Domain Routing

EE 122: Intra-domain routing

Final Overview EECS 122

Discussion 8: Link State Routing. CSE 123: Computer Networks Marti Motoyama & Chris Kanich

Distance Vector Routing

ECE 333: Introduction to Communication Networks Fall 2001

Advanced Computer Networks

CS 43: Computer Networks. 23: Routing Algorithms November 14, 2018

IP Forwarding Computer Networking. Routes from Node A. Graph Model. Lecture 10: Intra-Domain Routing

Distance-Vector Routing: Distributed B-F (cont.)

Let s focus on clarifying questions. More Routing. Logic Refresher. Warning. Short Summary of Course. 10 Years from Now.

CEN445 Network Protocols and Algorithms. Chapter 2. Routing Algorithms. Dr. Ridha Ouni

WAN Technology and Routing

Lecture 13: Routing in multihop wireless networks. Mythili Vutukuru CS 653 Spring 2014 March 3, Monday

Internet Architecture I EECS 122: Lecture 2

More on Network Routing and Internet Protocol

Routing. Effect of Routing in Flow Control. Relevant Graph Terms. Effect of Routing Path on Flow Control. Effect of Routing Path on Flow Control

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

Routing Metric. ARPANET Routing Algorithms. Problem with D-SPF. Advanced Computer Networks

Routers & Routing : Computer Networking. Binary Search on Ranges. Speeding up Prefix Match - Alternatives

COMP 3331/9331: Computer Networks and Applications

Announcements. Ethernet. Goals of Today s Lecture. Three Ways to Share the Media. Random Access Protocols. Key Ideas of Random Access

We will discuss about three different static routing algorithms 1. Shortest Path Routing 2. Flooding 3. Flow Based Routing

COMP/ELEC 429/556 Introduction to Computer Networks

Fairness Example: high priority for nearby stations Optimality Efficiency overhead

(Refer Slide Time: 01:08 to 01:25min)

CS4450. Computer Networks: Architecture and Protocols. Lecture 11 Rou+ng: Deep Dive. Spring 2018 Rachit Agarwal

Routing in Ad-hoc Networks

Routing, Routing Algorithms & Protocols

Routing Outline. EECS 122, Lecture 15

0!1. Overlaying mechanism is called tunneling. Overlay Network Nodes. ATM links can be the physical layer for IP

6.033 Spring 2015 Lecture #11: Transport Layer Congestion Control Hari Balakrishnan Scribed by Qian Long

Youki Kadobayashi NAIST

Deployment of IGRP/EIGRP

Missing Pieces of the Puzzle

Chapter 22 Network Layer: Delivery, Forwarding, and Routing 22.1

Youki Kadobayashi NAIST

Introduction to Communication Networks Spring Unit 15 Internetworking (cont) Routing

4/25/12. The Problem: Distributed Methods for Finding Paths in Networks Spring 2012 Lecture #20. Forwarding. Shortest Path Routing

Unicast Routing in Mobile Ad Hoc Networks

Network service model. Network service model. Network Layer (part 1) Virtual circuits. By the end of this lecture, you should be able to.

Routing in a network

Chapter 5 (Week 9) The Network Layer ANDREW S. TANENBAUM COMPUTER NETWORKS FOURTH EDITION PP BLM431 Computer Networks Dr.

Third Generation Routers

Youki Kadobayashi NAIST

CS 457 Networking and the Internet. Shortest-Path Problem. Dijkstra s Shortest-Path Algorithm 9/29/16. Fall 2016

4.5.2 The Distance-Vector (DV) Routing Algorithm

Computer Networks. Routing

Network Layer: Routing

Module 8. Routing. Version 2 ECE, IIT Kharagpur

CSCE 463/612 Networks and Distributed Processing Spring 2018

Routing. Information Networks p.1/35

QoS in Frame relay networks

Network Routing. Packet Routing, Routing Algorithms, Routers, Router Architecture

QoS in Frame relay networks

CCNA IP ROUTING. Revision no.: PPT/2K605/03

Lecture 4 Wide Area Networks - Routing

DSDV: Proactive. Distance Vector (Basic idea) Distance Vector. Distance Vector Algorithm: Tables 12/13/2016

Internet Architecture. Network Layer Overview. Fundamental Network Layer Function. Protocol Layering and Data. Computer Networks 9/23/2009

06/02/ Local & Metropolitan Area Networks. Overview. Routing algorithm ACOE322. Lecture 6 Routing

CHAPTER 9: PACKET SWITCHING N/W & CONGESTION CONTROL

Computer Science 425 Distributed Systems CS 425 / ECE 428. Fall 2013

Chapter 12. Routing and Routing Protocols 12-1

Recap. Requirements of Networks. Overview of the lecture LAN. Types of Networks. Lecture 03: Networking

More Routing. EE122 Fall 2012 Scott Shenker

Redes de Computadores. Shortest Paths in Networks

Initial Assumptions. Modern Distributed Computing. Network Topology. Initial Input

ECE 158A: Lecture 13. Fall 2015

Distance vector and RIP

Destination Sequenced Distance. [Perkins94] CSE 6811 : Lecture 6

Chapter 4 Network Layer. Network Layer 4-1

Lecture 4. The Network Layer (cont d)

Research paper Measured Capacity of an Ethernet: Myths and Reality

ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE! 1. Link state flooding topology information finding the shortest paths (Dijkstra)

ECE 158A: Lecture 5. Fall 2015

ICS 451: Today's plan. Network Layer Protocols: virtual circuits Static Routing Distance-Vector Routing

Lecture 6: Bridging & Switching. Last time. Today. CSE 123: Computer Networks Chris Kanich. How do multiple hosts share a single channel?

Network Control and Signalling

From Routing to Traffic Engineering

Computer Networking. Intra-Domain Routing. RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)

2/16/2008. Outline Computer Networking Lecture 11 Routing. Sending Link States by Flooding. Link State Protocol Concept

Routing. 9: Intro to Routing Algorithms. Routing. Roadmap. Routing Algorithm classification: Static or Dynamic?

CSE/EE 461 Lecture 7 Bridging LANs. Last Two Times. This Time -- Switching (a.k.a. Bridging)

Chapter 4: Network Layer

Routing Algorithms. CS158a Chris Pollett Apr 4, 2007.

Chapter 4: Network Layer

CS 457 Networking and the Internet. What is Routing. Forwarding versus Routing 9/27/16. Fall 2016 Indrajit Ray. A famous quotation from RFC 791

Switching and Forwarding

Congestion control in TCP

Main Challenge. Other Challenges. How Did it Start? Napster. Model. EE 122: Peer-to-Peer Networks. Find where a particular file is stored

Interplay between routing, forwarding

Wireless Sensor Networks: Clustering, Routing, Localization, Time Synchronization

Lecture 9. Network Layer (cont d) Network Layer 1-1

CS 5114 Network Programming Languages Control Plane. Nate Foster Cornell University Spring 2013

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

GIAN Course on Distributed Network Algorithms. Spanning Tree Constructions

GIAN Course on Distributed Network Algorithms. Spanning Tree Constructions

Transcription:

istributed lgorithms in Networks EES : Lecture 7 epartment of Electrical Engineering and omputer Sciences University of alifornia erkeley Network Protocols often have unintended effects TP Eample TP connections detect congestion after it has happened May cause packet drops from uncongested well behaved flows Non congested flows back off Eample Two TP flows sharing the same router get uneven bandwidths because one has a much smaller RTT than the other Routing Oscillation and countless other pathologies It is very difficult to avoid these unintended effects March, 00 KP: EES Lecture 7 The Internet is a HUGE istributed System Nodes are local processors Messages are echanged over various kinds of links Nodes contain sensors which sense local changes Nodes control the network jointly Method for doing this is a distributed algorithm Eample: Routing Time taken to solve the problem has two components: omputation time taken for local processing ommunication time for messages to be received over the links Today Focus on protocol design issues How to move from entralized to istributed lg. Synchronous and synchronous computation Why does the synchronous ellman Ford converge? Selfish behavior distributed systems March, 00 KP: EES Lecture 7 March, 00 KP: EES Lecture 7 Solving Global Problems in a istributed Setting Eamples: Minimum Spanning Tree Shortest Path Leader Election Topology roadcast Much easier to think in terms of centralized algorithms reativity needed to convert to the distributed case The Network is Heterogeneous Speed ialup to terabit fiber Reliability Hosts: istributed Server farms to 8 P Links: Noisy wireless to virtually error free fiber ongestion Trustworthiness What is a general enough model to cover all of this? March, 00 KP: EES Lecture 7 March, 00 KP: EES Lecture 7

onsensus over an Unreliable Link and in a connection over an unreliable link They both want to terminate the connection only if they are certain that no more packets will arrive from the other user messages to all their neighbors who then flood. won t terminate unless it knows that knows it is about to terminate. won t terminate unless it knows that knows it is about to terminate slow link March, 00 KP: EES Lecture 7 7 March, 00 KP: EES Lecture 7 0 onsensus Problem Suppose tells it can terminate and receives this message, say M can terminate, but will never know if actually received M and so it can t terminate neighbors who then flood. fails sends K(M) to, but then needs to makes sure that received this message, so it must wait for K(K(M)) never terminates. In fact, NO protocol eists to solve this problem! Worth convincing yourself of this fact. March, 00 KP: EES Lecture 7 8 March, 00 KP: EES Lecture 7 Link model Error correction ssume that errors can eventually corrected Propagation elay Fied. fails marks the link down Variable but no more than d Variable with no upper bound Other components of delay Queueing elay Transmission elay Packet order FIFO an be delivered in arbitrary order March, 00 KP: EES Lecture 7 9 March, 00 KP: EES Lecture 7

. fails marks the link down. comes back up msg lost This can be fied with sequence numbers, but then other problems emerge. fails marks the link down. comes back up marks the link up. marks the link down. fails message lost thinks is down when it is actually up! March, 00 KP: EES Lecture 7 March, 00 KP: EES Lecture 7. fails marks the link down. comes back up Synchronous v/s synchronous lgorithms Synchronous algorithms can be described in terms of global iterations. The time taken for a given iteration is the time taken for the slowest processor to complete that iteration: time driven E.g. TM or SONET synchronous algorithms eecute at a processor based on received messages and internal state: event driven E.g. IP protocols which must run over heterogeneous systems March, 00 KP: EES Lecture 7 March, 00 KP: EES Lecture 7 7 Slotted Time. fails marks the link down. comes back up marks the link up. marks the link down Slotted system,,, ll nodes agree on slot boundaries Have access to a global clock Helps to co-ordinate the nodes Every node can run the same algorithm Proving correctness is generally tractable if the centralized algorithm is analyzable Easier to understand the sequence of communication between nodes March, 00 KP: EES Lecture 7 March, 00 KP: EES Lecture 7 8

Synchronous ellman-ford (SF) Every node runs the same algorithm Time is slotted and in every tick each node sends its distance vector. t time h, node i has as an estimate of the shortest path to node that has <= h+ hops h+ (I,j) = min kεn(i) { h (k,j) + c(i,k)} Synchronization Penalty Slow nodes can create a penalty as well Node Node Node Penalty can be huge! March, 00 KP: EES Lecture 7 9 March, 00 KP: EES Lecture 7 Synchronous Timing Great when links are reliable and similar Node Implementing a Synchronous lgorithm Suppose the slowest process can complete an iteration in time T p Node Link delay is always less than T l Then a slot size of T p +T l or more is sufficient ut most processors may be most of the time What if T p and or T l are not known? March, 00 KP: EES Lecture 7 0 March, 00 KP: EES Lecture 7 Synchronous Timing ut what when some links are much faster? Node Node Node Node suffers synchronization penalty Locally Synchronous omputation Forget about fied slots When a node has received all round k- messages from its neighbors, it computes and sends out its round k message Worst-case: s slow as synchronous computation Generally much faster ny synchronous algorithm that isn t using time as a part of the computation will also work when run in a locally synchronous manner. March, 00 KP: EES Lecture 7 March, 00 KP: EES Lecture 7

Local Synchronization Send update k after you ve heard update k- from all neighbors. Node Node Node Why bother with synchronous lgorithms To reduce the synchronization penalty ifficult to get the synchronous algorithm to start The network is dynamic Flows Topology Think of the algorithm having to restart with a new set of initial conditions, every time there is a failure hanges create events which may or may not have global impact Event-driven algorithms better suited March, 00 KP: EES Lecture 7 March, 00 KP: EES Lecture 7 8 ompare with Synchronous Slot size is affected by the slow node Node Node Node synchronous ellman Ford (F) on t even wait to hear from all neighbors! Use most recent information to compute new distance vectors i.e. use last received values of () and d Whenever ready, each node i computes (i) = min k ε N(i) [(k) + c(i,k)] Sends the result to each of its neighbors No notion of global iterations In general, nodes are using different and possibly inconsistent estimates March, 00 KP: EES Lecture 7 March, 00 KP: EES Lecture 7 9 synchronous computation No notion of slot size at all! 7 8 9 0 Node Node Node Why should this work? synchronous ellman Ford Regardless of how asynchronous the nodes are, the algorithm will eventually converge to the shortest path Links can go down and come up but as long as the topology is fied after some time t, the algorithm will eventually converge to the shortest path Why? There s some hope because the (j) can only go up if one of j s neighbors estimates has gone up. March, 00 KP: EES Lecture 7 7 March, 00 KP: EES Lecture 7 0

Idea Trustworthiness There are too many different runs of F, so lets try to bound the range of distance estimates of (j) over time o this by two different runs of Synchronous F Set different initial estimates One run U, uses the familiar ones, i.e. estimate is infinity if no edge The other, L, uses -if no edge! One bounds the estimates from above, one from below and both find the correct the shortest paths eventually For every iteration k of the two SF runs L k (j) L k+ (j) *(j) U k+ (j) U k (j) For any asynchronous run,, it is possible to show that for any k, there is a time t such that L k (j) L k+ (j) t (j) U k+ (j) U k (j) Since both lower and upper runs converge to the optimal, so will F eventually Three levels Honest: lways in conformance of the protocol Selfish: May lie to get better performance out of the protocol (GP) Malicious: Unpredictable Internet Protocols (for the most part) assume Honest protocol agents Unreliable infrastructure Infrastructure has gotten more reliable, and agents have gotten less honest raess s Parado: Eample of how Greediness and distributed algorithms can lead to suboptimality March, 00 KP: EES Lecture 7 March, 00 KP: EES Lecture 7 Soft State ongestion Sensitive Routing State with Time-Out Eample: host joins a group by sending a join message to a host manager. The manager adds the host to the group for the net T seconds. If the host wants to stay in the group it must send a refresh message within T seconds to the manager. Otherwise it is dropped. dvantage: Manager robust to host failure isadvantage: Too many messages Most internet protocols use this way of communicating Trades of simplicity of correctness with compleity of communication epends on traffic S R Q T Weights are delays/bit unit of traffic from s to t u bits on the upper path -u bits on the lower path March, 00 KP: EES Lecture 7 March, 00 KP: EES Lecture 7 The nature of asynchronous distributed protocols Generally non-intuitive Limited theory to work with orrectness etremely hard to prove Robustness hard to analyze Networking gurus have a vast knowledge of special cases that can lead to strange behaviors Misconfiguration is a big cause of errors Soft state helps a lot, but wastes many messages! What about just broadcasting topology information accurately so that these problems go away Each Node is Greedy epends on traffic S R Q T Weights are delays/bit unit of traffic from s to t u bits on the upper path -u bits on the lower path Node S minimizes Total delay = u(u+) + (-u)(-u) = (u^ u +) elay minimized at u=. So Total elay =. s March, 00 KP: EES Lecture 7 March, 00 KP: EES Lecture 7

Greediness leads to suboptimality S still sends. on each path. R Weights are delays/bit unit of traffic from s to t S 0 T u bits on the upper path -u bits on the lower path. Q RESS S PROX R is greedy R diverts all. units on to the new link Now total delay is! March, 00 KP: EES Lecture 7 7 onclusions istributed lgorithms are not intuitive There is no systematic way to design them ctive research area is making some progress Until then use Hacking bilities Simulation ontrol Theory Optimization Graph Theory Game Theory. Greedy and malicious users complicate the protocol design problem even more nother active research area making progress This is why it is hard to build networks March, 00 KP: EES Lecture 7 8 7