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.

Slides:



Advertisements
Similar presentations
CSCI-1680 Network Layer: Intra-domain Routing Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
4/12/2015© 2009 Raymond P. Jefferis IIILect Internet Protocol - Continued.
Network Layer – Routing 2 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 4 Distributed Bellman-Ford Routing
Routing Protocol.
Courtesy: Nick McKeown, Stanford
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.
Spring Routing & Switching Umar Kalim Dept. of Communication Systems Engineering 17/04/2007.
Intradomain Routing EECS 122: Lecture 10 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
TNMK09 Computer Networks Copyright © 2005 Di Yuan, ITN, LiTH 1  Non-hierarchical routing, static or dynamic, won’t work in the Internet  None of the.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
Routing Protocol Pertemuan 21 Matakuliah: H0484/Jaringan Komputer Tahun: 2007.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
Lecture 16 Distributed Graph (Routing) Algorithms Source: (1) Book “Distributed Systems: an Algorithmic Approach”, S. Gosh, Chapter “Graph.
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.
INTRA- AND INTERDOMAIN ROUTING Routing inside an autonomous system is referred to as intradomain routing. Routing between autonomous systems is.
Delivery, Forwarding and
CS 453 Computer Networks Lecture 24 IP Routing. See…
Routing Algorithms (Ch5 of Computer Network by A. Tanenbaum)
1 CS 4396 Computer Networks Lab Dynamic Routing Protocols - II OSPF.
1 Pertemuan 20 Teknik Routing Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
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.
Review: routing algorithms. –Choose the appropriate paths. –Routing algorithms Flooding Shortest path routing (example). –Dijkstra algorithm. –Bellman-Ford.
Spring 2008CS 3321 Intradomain Routing Outline Algorithms Scalability.
Graph Algorithms Many problems in networks can be modeled as graph problems. -The topology of a distributed system is a graph. - Routing table computation.
10.- Graph Algorithms Centro de Investigación y Estudios Avanzados del Instituto Politécnico Nacional Introduction Routing Algorithms Computation of Shortest.
Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.
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.
Spring 2006CS 3321 Intradomain Routing Outline Algorithms Scalability.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
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.
Routing protocols. Static Routing Routes to destinations are set up manually Route may be up or down but static routes will remain in the routing tables.
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.
Routing Protocols Brandon Wagner.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
CS440 Computer Networks 1 Link State Routing and OSPF Neil Tang 10/31/2008.
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
Network-Layer Routing Routing tasks are methods of finding the paths for packet from their sources to their destinations. Routers are responsible mainly.
Graph Algorithms Many problems in networks can be modeled as graph problems. -The topology of a distributed system is a graph. - Routing table computation.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
Distance Vector and Link State Routing Pragyaditya Das.
Chapter 7 Packet-Switching Networks Shortest Path Routing.
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.
Network Layer.
Centralized vs Distributed Routing
Routing Jennifer Rexford.
COMP 3270 Computer Networks
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Routing in Packet Networks Shortest Path Routing
CS 3700 Networks and Distributed Systems
Intradomain Routing Outline Introduction to Routing
CS 3700 Networks and Distributed Systems
Communication Networks
Advanced Computer Networks
Network Layer (contd.) Routing
EE 122: Intra-domain routing: Distance Vector
Communication Networks
DSDV Destination-Sequenced Distance-Vector Routing Protocol
Network Layer.
Presentation transcript:

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 of a distributed system is a graph. - Routing table computation uses the shortest path algorithm - Efficient broadcasting uses a spanning tree - Maxflow 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

Internet routing Autonomous System AS0 AS1 AS2AS3 Intra-AS vs. Inter-AS routing Shortest Path First routing algorithm is the basis for OSPF Each AS is under a common administration

Routing revisited (borrowed from Cisco documentation

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 0 j k w(0,m), 0 (w(0,j)+w(j,k)), j The edge weights can represent latency or distance or some other appropriate parameter. Classical algorithms: Bellman-Ford, Dijkstra’s algorithm are found in most algorithm books. What is the difference between an ( ordinary ) graph algorithm and a distributed graph algorithm? m

Shortest path Revisiting Bellman Ford : basic idea Consider a static topology Process 0 sends w(0,i),0 to neighbor i {program for process i} do message = (S,k)  S < D(i)  if parent ≠ k  parent := k fi; D(i) := S; send (D(i)+w(i,j),i) to each neighbor j ≠ parent;  message (S,k)  S ≥ D(i) --> skip od Computes the shortest distance to all nodes from an initiator node The parent pointers help the packets navigate to the initiator Current distance

Shortest path Chandy & Misra’s algorithm : basic idea Consider a static topology Process 0 sends w(0,i),0 to neighbor i {for process i > 0} do message = (S,k)  S < D  if parent ≠ k  send ack to parent fi; parent := k; D := S; send (D + w(i,j), i) to each neighbor j ≠ parent; deficit := deficit + |N(i)| -1  message (S,k)  S ≥ D  send ack to sender  ack  deficit := deficit – 1 ÿdeficit = 0  parent  i  send ack to parent od Combines shortest path computation with termination detection. Termination is detected when the initiator receives ack from each neighbor

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 that is adaptation of the shortest path algorithm

Distance Vector Routing Distance Vector D for each node i contains N elements D[i,0], D[i,1], D[i,2] … Initialize these to  {Here, D[i,j] defines its distance from node i to node j.} - 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:  k≠ i: D[i,k] = min k (w[i,j] + D[j,k] ) Used in RIP, IGRP etc D[j,k]=3 means j thinks k is 3 hops away

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. So it will take forever for the distances to stabilize. A partial remedy is the split horizon method that will prevent 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.  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 Routing Each link state packet has a sequence number seq that determines the order in which the packets were generated. 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