10.- Graph Algorithms Centro de Investigación y Estudios Avanzados del Instituto Politécnico Nacional Introduction Routing Algorithms Computation of Shortest.

Slides:



Advertisements
Similar presentations
1 Routing Protocols I. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.
Advertisements

Chapter 4 Distributed Bellman-Ford Routing
COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure.
CS 4700 / CS 5700 Network Fundamentals Lecture 7: Bridging (From Hub to Switch by Way of Tree) Revised 1/14/13.
What is “Routing”? Routing algorithm that part of the network layer responsible for deciding on which output line to transmit an incoming packet Adaptive.
What is “Routing”? Routing algorithm that part of the network layer responsible for deciding on which output line to transmit an incoming packet Adaptive.
Distance-Vector and Path-Vector Routing Sections , 4.3.2, COS 461: Computer Networks Spring 2011 Mike Freedman
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.
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
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.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #5 Mobile Ad-Hoc Networks TBRPF.
Spring Routing & Switching Umar Kalim Dept. of Communication Systems Engineering 06/04/2007.
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.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
Introduction to Computer Networks 09/23 Presenter: Fatemah Panahi.
© 2007 Cisco Systems, Inc. All rights reserved.ICND1 v1.0—4-1 LAN Connections Exploring the Functions of Routing.
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.
CS 4700 / CS 5700 Network Fundamentals Lecture 9: Intra Domain Routing Revised 7/30/13.
Routing Protocols and the IP Layer CS244A Review Session 2/01/08 Ben Nham Derived from slides by: Paul Tarjan Martin Casado Ari Greenberg.
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.
Chapter 13: WAN Technologies and Routing 1. LAN vs. WAN 2. Packet switch 3. Forming a WAN 4. Addressing in WAN 5. Routing in WAN 6. Modeling WAN using.
Complexity of Bellman-Ford Theorem. The message complexity of Bellman-Ford algorithm is exponential. Proof outline. Consider a topology with an even number.
Routing and Routing Protocols Dynamic Routing Overview.
1 CS 4396 Computer Networks Lab Dynamic Routing Protocols - II OSPF.
Introduction to Routing and Routing Protocols By Ashar Anwar.
1 Pertemuan 20 Teknik Routing Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
Routing in Communication Networks Routing: Network layer protocol that guides information units to correct destinations. A complex collection of decision.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
Review: routing algorithms. –Choose the appropriate paths. –Routing algorithms Flooding Shortest path routing (example). –Dijkstra algorithm. –Bellman-Ford.
Packet-Switching Networks Routing in Packet Networks.
M.Menelaou CCNA2 ROUTING. M.Menelaou ROUTING Routing is the process that a router uses to forward packets toward the destination network. A router makes.
WAN technologies and routing Packet switches and store and forward Hierarchical addresses, routing and routing tables Routing table computation Example.
1 Routing. 2 Routing is the act of deciding how each individual datagram finds its way through the multiple different paths to its destination. Routing.
Graph Algorithms Many problems in networks can be modeled as graph problems. -The topology of a distributed system is a graph. - Routing table computation.
TCOM 515 Lecture 2. Lecture 2 Objectives Dynamic Routing Distance Vector Routing Link State Routing Interior vs Exterior RIP - Routing Information Protocol.
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.
Static versus Dynamic Routes Static Route Uses a protocol route that a network administrators enters into the router Static Route Uses a protocol route.
CIS 725 Network Layer. This layer provides communication between any two nodes Uniform addressing scheme independent of the network technology Network.
The Network Layer & Routing
Complexity of Bellman-Ford
Routing 2 CS457 Fall 2010.
A correction The definition of knot in page 147 is not correct. The correct definition is: A knot in a directed graph is a subgraph with the property that.
Network Layer4-1 Distance Vector: link cost changes Link cost changes: r node detects local link cost change r updates distance table (line 15) r if cost.
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.
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.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
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.
Centralized vs Distributed Routing
COMP 3270 Computer Networks
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Intradomain Routing Outline Introduction to Routing
RFC 1058 & RFC 2453 Routing Information Protocol
Global state collection
CS60002: Distributed Systems
ECE453 – Introduction to Computer Networks
Advanced Computer Networks
Presentation transcript:

10.- Graph Algorithms Centro de Investigación y Estudios Avanzados del Instituto Politécnico Nacional Introduction Routing Algorithms Computation of Shortest Path Distance Vector Routing Link-State Routing Interval Routing Sistemas Distribuidos Jorge Antonio Perez Espinoza

Graph Graph G: G = (V, E) V = Set of nodes 0….N-1. E = Set of edges representing links: (A,B),(A,C) Each edge w(i, j) has a weight. AA BB EE CC DD

Graphs on Distributed System The topology of a distributed system is represented by a graph where the nodes represent processes, and the links represent communication channels. Static vs. Dynamic Topology. AA BB EE CC DD

ROUTING ALGORITHMS Routing is a fundamental problem in networks. Discover and maintain an acyclic path from the source of a message to its destination. The routing table is updated when the topology changes. A path can have many attributes: hops, delay.

COMPUTATION OF SHORTEST PATH Given a graph G: G = (V, E) V = Set of nodes 0….N-1. E = Set of edges representing links. Each edge w(i, j) has a weight. The topology is static. AA BB EE CC DD

Chandy and Misra Algorithm A refinement of the Bellman-Ford Algorithm. Designed to work with a single initiator node 0. D(i): Distance to node 0 Each node knows the weights of all edges incident on it. Initially : D(0) = 0 ∀ i : i > 0 : D(i) = ∞. N0 N1 N2 N4 N

For each node: 1. D, the current shortest distance of node 0 to itself. Initially D(0) = 0, D(i: i > 0) = ∞ 2. A node called parent: Initially parent (j) = j 3. A variable deficit, representing the number of unacknowledged messages. Initially deficit=0. N0 N1 N2 N4 N

program shortest path {for process i >0}; define D, S : distance; {S denotes the shortest distance received through a message} parent : process deficit : integer; N: set of neighbors of process i; initially D= ∞, parent = i, deficit = 0 {for process 0} send (w(0,i), 0) to each neighbor i; deficit := |N(0)|; do ack -> deficit := deficit – 1 od; {deficit = 0 signals termination} {for process i > 0} do message = (S,k) ^ S 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 the parent od N0 N1 N2 N4 N

Example

Lemma : When the algorithm terminates, let k = parent (i). If D(k) is the distance of the shortest path from k to 0, then D(i) = D(k) + w(k, i) is the distance of the shortest path from i to 0 and the shortest path includes k. Proof: Suppose this is false : The shortest path from 0 to i is via j, where j ≠ k. Message D(i)>D(j)+w(j,i). Message D(i)>D(k)+w(k,i). i K 0 j

DISTANCE VECTOR ROUTING Shortest path routing, but handles topology changes. Routing Table DestinationNextHopDistance D[i, j] = 0 when i = j, = 1 when j is a neighbor of i, and = ∞ when i = j and j is not a neighbor of i ∀ k ≠ i :D[i,k]=minj(w[i,j]+D[j,k]) Each node j periodically broadcasts its distance vector to its immediate neighbors

DISTANCE VECTOR ROUTING RT- U XX1 YX2 VV∞ Following this, the distance vectors are corrected, and routing table is eventually recomputed.

Count to Infinity Problem ABC D E Node A. -> B(A,A,1) 2.- Node B. -> C(A,B,2) 3.- Node C. -> B(A,C,3) 4.- Node B. -> C(A,B,4) 5.- Node C. -> B(A,C,5)

Split Horizont Method ABC D E

LINK-STATE ROUTING This is an alternative method of shortest path routing. Converges faster. Each node i periodically broadcasts the weights of all edges (i,j) incident on it (this is the link state) to all its neighbors

Link State Protocol

INTERVAL ROUTING Consider a connected network of N nodes. The conventional routing table used to route a message from one node to another has N − 1 entries, one for each destination node. Entry Destination# Port 13 Entries

Can we do something to reduce the growth of the routing tables? Entry Destination# Port ??????

Interval routing Santoro and Khatib first proposed interval routing for tree topologies only. Each node has two ports: port 0 is connected to the node with a higher id. port 1 is connected with the node of lower id

Interval Routing For a set of N nodes 0 ….N − 1, define the interval [p, q) between a pair of p and q as follows: if p < q then [p,q) = p, p + 1, p + 2,..., q − 2, q − 1 if p ≥ q then [p, q) = p, p + 1, p + 2,...,N − 1, 0, 1,..., q − 2, q − 1 As an example, if N = 8, then [5, 5) = 5, 6, 7, 0, 1, 2, 3, 4.

Routing for a tree Network 1. Label the root as node Do a preorder traversal of the tree, and label the successive nodes in ascending order starting from For each node, label the port towards a child by the node number of the child. Then label the port towards the parent by L(i) + T(i) + 1 mod N, where L(i) is the label of the node i T(i) is the number of nodes in the subtree under node i (excluding i) Subtree under i: L(i),L(i)+T(i) + 1 mod N) Comp: [L(i)+T(i)+1 mod N,L(i))

Adaptation to changes in the topology. Every time a new node is added to a network, or an existing node is removed from the network, in general all node labels and port labels have to be recomputed.

Prefix Routing if X = Y → Deliver the message locally X = Y → Find the port with the longest prefix of X as its label; Forward the message towards that port fi