Lecture 16 Distributed Graph (Routing) Algorithms Source: (1) Book “Distributed Systems: an Algorithmic Approach”, S. Gosh, Chapter 10.1-10.2.3 “Graph.

Slides:



Advertisements
Similar presentations
Network Layer – Routing 2 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Advertisements

Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 22 Omar Meqdadi Department of Computer Science and Software Engineering University.
Courtesy: Nick McKeown, Stanford
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization –All routers are identical –Network is flat. Not true in Practice Hierarchical.
CSE331: Introduction to Networks and Security Lecture 9 Fall 2002.
Routing So how does the network layer do its business?
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 22 Introduction to Computer Networks.
Chapter 4 Distance Vector Problems, and Link-State Routing Professor Rick Han University of Colorado at Boulder
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
Unicast Routing Protocols: RIP, OSPF, and BGP
Chapter 10 Introduction to Wide Area Networks Data Communications and Computer Networks: A Business User’s Approach.
Intradomain Routing EECS 122: Lecture 10 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
Routing.
CS335 Networking & Network Administration Tuesday, April 20, 2010.
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.
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
ROUTING ON THE INTERNET COSC Aug-15. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
Delivery, Forwarding and
Each computer and router interface maintains an ARP table for Layer 2 communication The ARP table is only effective for the broadcast domain (or LAN)
The Routing & the IP network data link physical network data link physical network data link physical network data link physical network data link physical.
CS 453 Computer Networks Lecture 24 IP Routing. See…
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012  CPSC.
Routing Algorithms (Ch5 of Computer Network by A. Tanenbaum)
1 CS 4396 Computer Networks Lab Dynamic Routing Protocols - II OSPF.
SAvPS – úvod Genči 2009 (bsaed on Tanenbaum’s slides.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
Dynamic Routing Protocols  Function(s) of Dynamic Routing Protocols: – Dynamically share information between routers (Discover remote networks). – Automatically.
1 Introducing Routing 1. Dynamic routing - information is learned from other routers, and routing protocols adjust routes automatically. 2. Static routing.
Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.
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.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 5 Network Layer.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
1 Week 5 Lecture 2 IP Layer. 2 Network layer functions transport packet from sending to receiving hosts transport packet from sending to receiving hosts.
Lecture 14-1 Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013 Indranil Gupta (Indy) October 10, 2013 Lecture 14 Networking Reading:
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
Routing and Routing Protocols
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
Routing Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific Institute of Information.
Hwajung Lee. Why graph algorithms ? It is not a “graph theory” course! Many problems in networks can be modeled as graph problems. Note that -The topology.
ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine.
Internet Protocols. ICMP ICMP – Internet Control Message Protocol Each ICMP message is encapsulated in an IP packet – Treated like any other datagram,
Stainov - DataComMET CS TC5353 THE NETWORK LAYER 5.2 ROUTING ALGORITHMS - adaptive Distance Vector Routing (Bellman-Ford, Ford-Fulkenson). It was used.
Dynamic Routing Protocols II OSPF
4: Network Layer4b-1 OSPF (Open Shortest Path First) r “open”: publicly available r Uses Link State algorithm m LS packet dissemination m Topology map.
Transport Layer3-1 Network Layer Every man dies. Not every man really lives.
Routing Algorithms and IP Addressing Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality.
Routing Protocols Brandon Wagner.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 1 Module 10 Routing Fundamentals and Subnets.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
Graph Algorithms Why graph algorithms ? It is not a “graph theory” course! Many problems in networks can be modeled as graph problems. Note that -The topology.
18-WAN Technologies and Dynamic routing Dr. John P. Abraham Professor UTPA.
Lecture 14-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2010 Indranil Gupta (Indy) October 7, 2010 Lecture 14 Networking.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
Distance Vector and Link State Routing Pragyaditya Das.
Distributed Systems Lecture 10 Networking and routing 1.
ROUTING ON THE INTERNET COSC Jun-16. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Routing Jennifer Rexford.
THE NETWORK LAYER.
18-WAN Technologies and Dynamic routing
Intra-Domain Routing Jacob Strauss September 14, 2006.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Routing in Packet Networks Shortest Path Routing
ECE453 – Introduction to Computer Networks
Delivery, Forwarding, and Routing
EE 122: Intra-domain routing: Distance Vector
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Presentation transcript:

Lecture 16 Distributed Graph (Routing) Algorithms Source: (1) Book “Distributed Systems: an Algorithmic Approach”, S. Gosh, Chapter “Graph Algorithms” and (2) Chapter 3 in our textbook Klara Nahrstedt CS 425/ECE 428/CSE 424 Distributed Systems (Fall 2009) CS 425/ECE 428/CSE 424 Distributed Systems (Fall 2009)

Acknowledgement The slides during this semester are based on ideas and material from the following sources: –Slides prepared by Professors M. Harandi, J. Hou, I. Gupta, N. Vaidya, Y-Ch. Hu, S. Mitra. –Slides from Professor S. Gosh’s course at University o Iowa.

Administrative Homework 2 is graded and solutions are posted Homework 3 is posted –Deadline: October 29, Thursday, 2 pm in class Midterm is graded and solutions are posted Midterm Re-grading Period by Instructor –October 27, 3:15-4pm –October 29, 3:15-4pm No instructor office hours during the week of October –(Instructor is at ACM International Conference on Multimedia 2009 in Beijing, China)

Administrative MP2 posted October 5, 2009, on the course website, –Deadline November 6 (Friday) –Demonstrations, 4-6pm, 11/6/2009 –You will need to lease one Android/Google Developers Phone per person from the CS department (see lease instructions)!! –Start early on this MP2 –Update groups as soon as possible and let TA know by so that she can work with TSG to update group svn –Tutorial for MP2 planned for October 28 evening if students send questions to TA by October 25. Send requests what you would like to hear in the tutorial. –During October 15-25, Thadpong Pongthawornkamol will held office hours and respond to MP2 questions for Ying Huang (Ying is going to the IEEE MASS 2009 conference in

Administrative MP3 proposal instructions –MP3 proposal is posted –You will need to submit a proposal for MP3 on top of your MP2 before you start MP3 on November 9, 2009 –Deadline for Proposal: October 25, 2009, proposal to TA –At least one representative of each group meets with instructor or TA during October during their office hours ) watch for extended office hours during these days. Instructor office hours: October 28 times 8:30-10am

Administrative To get Google Developers Phone, you need a Lease Form –Fill out the lease form; bring the lease form to Rick van Hook/Paula Welch and pick up the phone from 1330 SC Lease Phones: phones will be ready to pick up starting October 20, 9-4pm from room 1330 SC (purchasing, receiving and inventory control office) Return Phones: phones need to be returned during December 14-18, 9-4pm in 1330 SC

Distributed Graph Algorithms why graph algorithms ? It is not a “graph theory” course! many problems in networks can be modeled as graph problems –the topology of a distributed system is a graph –routing table computation uses the shortest path algorithm –efficient broadcasting uses a spanning tree –Max flow algorithm determines the maximum flow between a pair of nodes in a graph.

Routing Shortest path routing Distance vector routing Link state routing Routing in sensor networks Routing in peer-to-peer networks Geographic routing

Plan for Today Routing algorithms –Chandy-Misra (distributed Bellman-Ford) –Distance vector –Link state –Interval routing

The Internet (Internet Mapping Project, color coded by ISPs) PCs,routers, switches… =nodes links= edges

Internet 5-Layer Model Internet Routing Algorithms Messages (UDP) or Streams (TCP) Application Transport Internet UDP or TCP packets IP datagrams Network-specific frames Message Layers Underlying network Network interface

Internet Routing

Intra-AS Routing Revisited Source:

Internet Routing intra-AS routing –Open Shortest Path First(OSPF) –a link state protocol –(RFC 2328(1998) forIPv4, updated in RFC 5340(2008) inter-AS routing –Border Gateway Protocol (BGP) –path vector protocol –makes routing decisions based on path, network policies and/or rule sets

Routing: shortest path most shortest path algorithms are adaptations of the classic Bellman- Ford algorithm. Computes shortest path if there are no cycle of negative weight Let D(j) = shortest distance of j from initiator 0. Thus D(0) = 0 The edge weights w(j,k) can represent latency or distance or some other appropriate parameter

Shortest path revisiting Bellman Ford : basic idea Consider a static topology process 0 sends w(0,i), 0 to neighbor i {program for pi} upon receiving message (dist, k) if dist < D i then if parent ≠ k then parent := k fi; D i := dist; send (D i + w(i,j), i) to each neighbor j ≠ parent; if dist ≥ D i then do nothing Current distance Compute the shortest Distance to all nodes From an initiator node

Chandy&Misra’s Shortest Path (assumes static topology) /* D initialized to ∞, parent = i; deficit = 0, each message has format (distance, sender) */ {for process 0} Process 0 sends w(0,i), 0 to neighbor i, deficit=|N(0)| ; /*N(0) set of successors of node 0; N(i) set of neighbors of node i */ do deficit > 0 & ack,  deficit:= deficit – 1 od; (deficit = 0 signals termination) {for process i>0} do message(S,k) & S<D /* S value of distance received through message, D shortest distance between node 0 and i */  if parent ≠ k & deficit > 0  send ack to parent fi; parent:= k; D:=S; send(D + w(i,j),i) to each neighbor j ≠ parent; deficit:=deficit+|N(i)|; message(S,k) & S≥D  send ack to sender; ack  deficit:=deficit–1; deficit=0 & parent ≠ I  send ack to parent; od

Execution of Chandy-Misra

Shortest Path an important issue is: how well do such algorithms perform when the topology changes? No real network is static! let us examine distance vector routing and link state routing - adaptations of the shortest path algorithm

Internet Routing Algorithms  Programmed in the network layer  determine the “next hop”, given the destination IP address,  thus determine the route for each packet as it travels through the net,  dynamically update routing information to reflect failures, changes and congestion.  Two approaches:  link-state (e.g., OSPF)  Every node knows status of each “link” in the network  distance-vector (e.g., RIP)  Every node knows the next-hop for each possible destination LAN Information maintained as a table Tables updated either  Proactively – periodically, or  Reactively – when a neighbor/some link status changes

Distance Vector Routing Distance Vector D for each node i contains N elements D j [0], D j [1], D j [2]… Initialize to ∞ {Dj[i] is distance from node j to node i.} - Each node j periodically sends its distance vector to its immediate neighbors. - Every neighbor i of j, after receiving the broadcasts from its neighbors, updates its distance vector as follows: For all k≠i: D i [k]=min j (w[i,j] + D j [k]) Used in IGRP etc D j [k]=3 means j thinks k is 3 hops away

Execution of DVR

Distance Vector Routing Protocol Also termed as distributed Bellman-Ford algorithm or Ford-Fulkerson algorithm, included in RIP (routing information protocol), AppleTalk, and Cisco routers. –Each node/router maintains a table indexed by each destination node. Entry gives the best known distance to destination and which link to use for forwarding. –Once every T seconds each router sends to each neighbor its own entire table (proactive)

Distance Vector Routing A B D E C Hosts or LANs Routers To Link Cost B 1 1 C 1 2 D 3 1 E 1 2 Alocal To Link Cost A 2 2 B 2 1 D 5 2 E 5 1 C local Routing Table for A Routing Table for C To Link Cost A 1 1 C 2 1 D 4 2 E 4 1 B local Routing Table for B Link number (all links have cost=1)

DVR What may go wrong? What if links fail?

Counting to Infinity node 1 thinks D 1 [3] = 2 node 2 thinks D 2 [3] = D 1 [3]+1 = 3 node 1 thinks D 1 [3] = D 2 [3]+1 = 4 and so on; it will take forever for the distances to stabilize one remedy is the split horizon method that prevents 1 from sending the advertisement about D 1 [3] to 2 since its first hop is node 2 Observe what can happen when the link (2,3) fails. For all k≠ i: D i [k] = min k (w[i,j] + D j [k] ) Suitable for smaller networks. Larger volume of data is disseminated, but to its immediate neighbors only Poor convergence property

Link State Routing Each node i periodically broadcasts the weights of all edges (i,j) incident on it (this is the link state) to all its neighbors. The mechanism for dissemination is flooding This helps each node eventually compute the topology of the network, and independently determine the shortest path to any destination node using some standard graph algorithm like Dijkstra’s Smaller volume data disseminated over the entire network - Used in OSPF

Link State Execution Link state (list of neighbor nodes, and their weights)

Link State Routing each link state packet has a sequence number seq that determines the order in which the packets were generated what’s the problem ? –need unbounded counters –when a node crashes, all packets stored in it are lost –after it is repaired, new packets start with seq= 0, so these new packets may be discarded in favor of the old packets! – problem resolved using TTL

Link State Routing Protocol Each router must 1.Discover its neighbors and learn their network addresses –When a router is booted, it learns who its neighbors are by sending a special Hello packet on each point-to-point link. –The router on the other end sends back a reply. 2.Measure the delay or cost to each of its neighbors –A router sends a special Echo packet over the link that the other end sends back immediately. By measuring the round- trip time, the sending router gets a reasonable delay estimate. 3.Construct a packet telling all it has just learned. –Broadcast this packet

Link State Routing (Example) A router broadcasts a link-state-advertisement (LSA) packet after booting, as well as periodically (or upon topology change). Packet forwarded only once, TTL-restricted Initial TTL is very high.

Link State Routing Protocol 4.Broadcast the LSA packet to all other routers in the subnet. Each packet contains a sequence number that is incremented for each new LSA packet sent. Each router keeps track of all the (source router, sequence) pairs it sees. When a new LSA packet comes in, it is checked against the pairs. If the received packet is new, it is forwarded on all the links except the one it arrived on. The age of each packet is included and is decremented once per time unit. When the age hits zero, the information is discarded. Initial age = very high 5.For routing a packet, since the source knows the entire network graph, it simply computes the shortest path (actual sequence of nodes) locally using the Dijkstra’s algorithm.

Summary Graph algorithms –Standard routing algorithms like shortest path, distance vector –The final outcome of these protocols is set of routing tables (on for each node) –Conventional routing tables have space complexity of O(N) –Need for adaptability to changing topologies