Advanced routing topics. Tuomas Launiainen

Similar documents
Routing. Information Networks p.1/35

CS521 \ Notes for the Final Exam

CSCI2100B Data Structures Heaps

Graph Algorithms. Many problems in networks can be modeled as graph problems.

INDIAN STATISTICAL INSTITUTE

Algorithm Design (8) Graph Algorithms 1/2

CSE 100: GRAPH ALGORITHMS

Graph Algorithms. Many problems in networks can be modeled as graph problems.

We can use a max-heap to sort data.

Computer Science 210 Data Structures Siena College Fall Topic Notes: Priority Queues and Heaps

tree follows. Game Trees

CSE 530A. B+ Trees. Washington University Fall 2013

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

Principles of Algorithm Design

Communication network problem. How the routers need to store and forward packets as in Internet/internets/intranets on a hop-by-hop basis.

Routing Algorithms. CS158a Chris Pollett Apr 4, 2007.

Routing. 4. Mar INF-3190: Switching and Routing

PART IV. Given 2 sorted arrays, What is the time complexity of merging them together?

Redes de Computadores. Shortest Paths in Networks

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Seminar on Algorithms and Data Structures: Multiple-Edge-Fault-Tolerant Approximate Shortest-Path Trees [1]

Multiprocessor Interconnection Networks- Part Three

Interconnection Networks: Topology. Prof. Natalie Enright Jerger

Binary heaps (chapters ) Leftist heaps

Parallel Pointers: Graphs

Selection, Bubble, Insertion, Merge, Heap, Quick Bucket, Radix

Network-on-chip (NOC) Topologies

Algorithm 23 works. Instead of a spanning tree, one can use routing.

HEAPS: IMPLEMENTING EFFICIENT PRIORITY QUEUES

MITOCW watch?v=w_-sx4vr53m

1 The range query problem

Interconnection networks

BST Deletion. First, we need to find the value which is easy because we can just use the method we developed for BST_Search.

Binary Trees

COMP Data Structures

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

Motivation for B-Trees

Topologies. Maurizio Palesi. Maurizio Palesi 1

Data Structures and Algorithms

Interconnection Network

Multi-way Search Trees. (Multi-way Search Trees) Data Structures and Programming Spring / 25

B-Trees. Introduction. Definitions

Lecture 4 Wide Area Networks - Routing

Notes on Binary Dumbbell Trees

B-Trees and External Memory

Red-Black trees are usually described as obeying the following rules :

Search Algorithms for Discrete Optimization Problems

Cost-Effective Traffic Grooming in WDM Rings

LECTURE 3 ALGORITHM DESIGN PARADIGMS

B-Trees and External Memory

Assignment 5: Solutions

Leader Election in Rings

UNIT III BALANCED SEARCH TREES AND INDEXING

ARC 088/ABC 083. A: Libra. DEGwer 2017/12/23. #include <s t d i o. h> i n t main ( )

Algorithm Design Paradigms

CMPSC 250 Analysis of Algorithms Spring 2018 Dr. Aravind Mohan Shortest Paths April 16, 2018

Distributed Systems. Basic Algorithms. Rik Sarkar. University of Edinburgh 2015/2016

Topology basics. Constraints and measures. Butterfly networks.

Routing algorithms. Jan Lönnberg, 51101M. October 2, Based on G. Tel: Introduction to Distributed Algorithms, chapter 4.

Binary Search Tree (3A) Young Won Lim 6/2/18

Binary Trees. BSTs. For example: Jargon: Data Structures & Algorithms. root node. level: internal node. edge.

Alternate Routing Diagram

9. Heap : Priority Queue

Balanced Search Trees

Distributed Systems. Basic Algorithms. Rik Sarkar. University of Edinburgh 2016/2017

Computer Science Engineering Sample Papers

Constructions of hamiltonian graphs with bounded degree and diameter O(log n)

Solving problems on graph algorithms

CSCI Trees. Mark Redekopp David Kempe

Chapter 12. Routing and Routing Protocols 12-1

We noticed that the trouble is due to face routing. Can we ignore the real coordinates and use virtual coordinates for routing?

From Routing to Traffic Engineering

CSE 5095 Topics in Big Data Analytics Spring 2014; Homework 1 Solutions

Recitation 9. Prelim Review

Chapter 2: Basic Data Structures

CS301 - Data Structures Glossary By

Multi-way Search Trees

Priority Queues and Binary Heaps

SELF-BALANCING SEARCH TREES. Chapter 11

1 Introduction 2. 2 A Simple Algorithm 2. 3 A Fast Algorithm 2

CS 6143 COMPUTER ARCHITECTURE II SPRING 2014

Unit 6 Chapter 15 EXAMPLES OF COMPLEXITY CALCULATION

Lecture 5: Search Algorithms for Discrete Optimization Problems

March 10, Distributed Hash-based Lookup. for Peer-to-Peer Systems. Sandeep Shelke Shrirang Shirodkar MTech I CSE

Multi Hop Send Protocol Tool for TinyNodes Semesterthesis

Hash Tables. CS 311 Data Structures and Algorithms Lecture Slides. Wednesday, April 22, Glenn G. Chappell

Solutions to Problem Set 3

COMP3121/3821/9101/ s1 Assignment 1

ME/CS 132: Advanced Robotics: Navigation and Vision

A data structure and associated algorithms, NOT GARBAGE COLLECTION

CS244a: An Introduction to Computer Networks

Balanced Trees Part Two

Adaptive Routing. Claudio Brunelli Adaptive Routing Institute of Digital and Computer Systems / TKT-9636

Evaluating XPath Queries

Test 1 Review Questions with Solutions

Jerrolyn Brees and Sukhamay Kundu Department of Computer Science Louisiana State University Baton Rouge, LA 70803, USA

Matching Theory. Figure 1: Is this graph bipartite?

Distributed Algorithms 6.046J, Spring, 2015 Part 2. Nancy Lynch

Algorithms: Lecture 10. Chalmers University of Technology

8. Write an example for expression tree. [A/M 10] (A+B)*((C-D)/(E^F))

Transcription:

Advanced routing topics Tuomas Launiainen

Suboptimal routing Routing trees Measurement of routing trees Adaptive routing Problems Fault-tolerant tables Point-of-failure rerouting Point-of-failure shortest path rerouting Correctness Compact tables Routing with interwals

Restrictions used: Bidirectional Links (BL) Connectivity (CN) Total Reliability (TR) Initial Distinct Values (ID)

Suboptimal routing Optimal (shortest path guaranteed) routing is expensive Suboptimal routing does not guarantee shortest paths, but is often sufficient

Routing trees Routing can be done using a single spanning tree, a routing tree. All messages are passed using only the edges in the routing tree. Relatively easy to construct Guaranteed delivery Guaranteed to use no more messages than the diameter of the tree

Centre-based routing tree Since messages are delivered with no more than diam(t ) hops in a routing tree T, one logical choise for the routing tree is one rooted at the centre of the graph (a node that has the smallest distance to the farthest node from it).

Centre-based routing tree Since messages are delivered with no more than diam(t ) hops in a routing tree T, one logical choise for the routing tree is one rooted at the centre of the graph (a node that has the smallest distance to the farthest node from it). Construction: 1. Find the centre of the graph 2. Construct the shortest path spanning tree for that node

Centre-based routing tree Since messages are delivered with no more than diam(t ) hops in a routing tree T, one logical choise for the routing tree is one rooted at the centre of the graph (a node that has the smallest distance to the farthest node from it). Construction: 1. Find the centre of the graph 2. Construct the shortest path spanning tree for that node The diameter of the spanning tree is bound from above: diam(g) diam(pt(c)) 2diam(G).

Median-based routing tree Since a tree has no loops, each edge e = (x, y) of the routing tree splits the tree in two: T [x y], and T [y x]. This means that every message passing from one half to the other must go through e, the use of which costs θ(e).

Median-based routing tree Since a tree has no loops, each edge e = (x, y) of the routing tree splits the tree in two: T [x y], and T [y x]. This means that every message passing from one half to the other must go through e, the use of which costs θ(e). If all nodes send the same amount of messages on average, and the destinations are evenly distributed independent of the sender, the overall average cost of using T for routing is relative to: (x,y) T T [x y] T [y x] θ((x, y))

Median-based routing tree Since a tree has no loops, each edge e = (x, y) of the routing tree splits the tree in two: T [x y], and T [y x]. This means that every message passing from one half to the other must go through e, the use of which costs θ(e). If all nodes send the same amount of messages on average, and the destinations are evenly distributed independent of the sender, the overall average cost of using T for routing is relative to: (x,y) T T [x y] T [y x] θ((x, y)) This is also the sum of all distances between every pair of nodes.

Median-based routing tree (contd.) If message passing is evenly distributed, the overall cost of a routing tree can be minimized by minimizing the sum of every distance in the tree. Unfortunately constructing such a tree is difficult.

Median-based routing tree (contd.) If message passing is evenly distributed, the overall cost of a routing tree can be minimized by minimizing the sum of every distance in the tree. Unfortunately constructing such a tree is difficult. A near-optimal solution, a median-based routing tree, is simple to construct, however. The median node of a graph is one that has the smallest sum of distances to every other node.

Median-based routing tree (contd.) If message passing is evenly distributed, the overall cost of a routing tree can be minimized by minimizing the sum of every distance in the tree. Unfortunately constructing such a tree is difficult. A near-optimal solution, a median-based routing tree, is simple to construct, however. The median node of a graph is one that has the smallest sum of distances to every other node. The average cost of a median-based routing tree is (claimed to be) no worse than twice the average cost of the cost-minimizing routing tree.

Minimum-cost routing tree Another natural choise is the spanning tree that minimizes the sum of costs of it s edges. It can be constructed with e.g. MegaMerger.

Measurement of routing trees Examine how much a routing tree stretches the distance between two nodes. Strecth factor: the maximum streching between nodes: max x,y V d T (x,y) d G (x,y) Dilation: the maximum length between neighbours in the original graph: max d T (x, y) (x,y) E Edge-stretch factor: maximum stretch of an edge: (also called the dilation factor) max (x,y) E d T (x,y) θ((x,y)) Also average stretch factor and average dilation factor

Adaptive routing Adaptive routing tries to handle routing in a system where the costs of edges change. When the cost of a link (x, y) changes, both x and y are notified The restriction Total Reliability is replaced with Total Component Reliability New restriction Cost Change Detection A link failure can be described by setting it s cost to

Map Update A naïve approach: Every node contains a complete map of the network When a node detects one of it s links has changed, it updates it s map and sends an update-message to all it s neighbours When a node receives an update-message, it updates it s map and passes the message to it s other neighbours Periodic updates can be used even if no changes occur This is very expensive, even more so with periodic messages. It can, however, handle any amount and type of changes. E.g. the second Internet routing protocol uses this scheme.

Vector Update Construct initial routing tables with Iterative Construction When a node detects a one of it s links has changed, it initiates a global update of routing tables, either by starting a new execution of Iterative Construction, or a new round of iterations, until the tables converge again Starting a new round of iterations is preferable, since starting from scratch is expensive. This scheme was used in the first Internet routing protocol, but it has problems.

Vector Update (contd.) Count-to-infinity problem 1 1 1 x y z w cost to w: 1

Vector Update (contd.) Count-to-infinity problem 1 1 K x y z w cost to w:?

Vector Update (contd.) Count-to-infinity problem 1 1 K x y z w cost to w: 3

Vector Update (contd.) Count-to-infinity problem 1 1 K x y z w cost to w: 4 cost to w: 3

Oscillation A problem concerning many approaches is oscillation. It occurs when the cost of using a link is proportional to the amount of traffic through it. z x y w If x wants to send lots of messages to y, the best path will start to oscillate between z and w.

Fault-tolerant tables Upholding optimal routing tables in a changing system is very expensive. If suboptimal routes are allowed and link failures are limited to a single link at a time (single-link crash failure), fault-tolerant tables can be used to relay messages with minimal communication.

Point-of-failure rerouting Each node stores two edge-disjoint paths to each destination. Messages are delivered through the shortest path from their source to their destination, assuming no link crashes have occurred. If the message arrives to a node whose link has crashed (point of failure), it is rerouted to it s destination via the alternate path. Suboptimal service is provided only when a crash occurs, and information about crashes does not need to be relayed.

Point-of-failure shortest path rerouting Swap edges In systems with bidirectional links, the shortest path from the source node s to the target node t is contained in the shortest path spanning tree rooted at t, PT(t). Each node x, x t in this tree has a parent p t (x). When a link e t [x] = (x, p t (x)) in PT(t) fails, it disconnects PT(t) into two subtrees. For each link e t [x] in PT(t), there exists a link e not in PT(t) that can reconnect the spanning tree if e t [x] fails. e is called the swap edge of e t [x]. The best swap edge is called the optimal swap.

Point-of-failure shortest path rerouting (contd.) Routing tables To provide point-of-failure shortest path rerouting, each node needs to know the optimal swap in addition to the normal link for each destination. It also needs to know the shortest path to the optimal swap. The routing table of x thus has this row for each destination t, where (u, v) is the optimal swap for (x, p t (x)): Final Destination Normal Rerouting Swap Des- Swap Link Link Link tination t (x, p t (x)) (x, p u (x)) u (u, v) When a message reaches a point-of-failure node, the node then sends the message towards the optimal swap.

Point-of-failure shortest path rerouting (contd.) Algorithm (sort of) All messages contain the following fields: final destination, swap destination, swap link, and swap bit. 1. s sends a message to t: it sets the final destination to t, the swap destination and swap link to empty, and the swap bit to 0. 2. An intermediate node x receives a message to t:

Point-of-failure shortest path rerouting (contd.) Algorithm (sort of) All messages contain the following fields: final destination, swap destination, swap link, and swap bit. 1. s sends a message to t: it sets the final destination to t, the swap destination and swap link to empty, and the swap bit to 0. 2. An intermediate node x receives a message to t: (a) If the swap bit is 0 and the normal link (x, p t (x)) is up, use that.

Point-of-failure shortest path rerouting (contd.) Algorithm (sort of) All messages contain the following fields: final destination, swap destination, swap link, and swap bit. 1. s sends a message to t: it sets the final destination to t, the swap destination and swap link to empty, and the swap bit to 0. 2. An intermediate node x receives a message to t: (a) If the swap bit is 0 and the normal link (x, p t (x)) is up, use that. (b) If the swap bit is 0 and the normal link (x, p t (x)) is down, set the swap link and swap destination according to the routing table, set the swap bit to 1, and send the message to the rerouting link.

Point-of-failure shortest path rerouting (contd.) Algorithm (sort of) All messages contain the following fields: final destination, swap destination, swap link, and swap bit. 1. s sends a message to t: it sets the final destination to t, the swap destination and swap link to empty, and the swap bit to 0. 2. An intermediate node x receives a message to t: (a) If the swap bit is 0 and the normal link (x, p t (x)) is up, use that. (b) If the swap bit is 0 and the normal link (x, p t (x)) is down, set the swap link and swap destination according to the routing table, set the swap bit to 1, and send the message to the rerouting link. (c) If the swap bit is 1 and x = u, set the swap bit to 0 and use the swap link in the message.

Point-of-failure shortest path rerouting (contd.) Algorithm (sort of) All messages contain the following fields: final destination, swap destination, swap link, and swap bit. 1. s sends a message to t: it sets the final destination to t, the swap destination and swap link to empty, and the swap bit to 0. 2. An intermediate node x receives a message to t: (a) If the swap bit is 0 and the normal link (x, p t (x)) is up, use that. (b) If the swap bit is 0 and the normal link (x, p t (x)) is down, set the swap link and swap destination according to the routing table, set the swap bit to 1, and send the message to the rerouting link. (c) If the swap bit is 1 and x = u, set the swap bit to 0 and use the swap link in the message. (d) If the swap bit is 1 and x u, send the message towards u using the routing table.

Correctness Consider this example, where the blue node wants to send a message to the green node, but just before the message reaches it, the red link before it goes down.

Correctness Consider this example, where the blue node wants to send a message to the green node, but just before the message reaches it, the red link before it goes down. We cannot make any guarantees that a message will arrive to it s destination. We can, however, guarantee that if the changes in the system stop (for a long enough period), the message will be delivered through the point-of-failure shortest path.

Compact tables Routing tables are quite large: O(n 2 log n) bits each for full routing tables O(n log n) bits each, if only destination-link pairs are stored (for each destination t, the routing table of x stores the link (x, p t (x))) Without special knowledge about node naming and network topology, this is about as good as we can get, since an entry needs to be made for each destination.

Routing with interwals We can assume that all node names are integers between 0 and n 1, inclusive. For two integers j and k, 0 j, k n 1, an inteval is a sequence: { j, j + 1,..., k, if j k j, j + 1,..., n 1, 0, 1,..., k if j > k Instead of storing destination-link pairs, a routing table can store interwal-link pairs. Routing tables can be as small as O(log n). The ability to choose node names and knowledge about network topology is needed.

Routing with interwals (contd.) Example 0 7 2 6 5 1 4 3 right The routing table of 0 Link Interwal left (1, 4) = 1, 2, 3, 4 right (5, 7) = 5, 6, 7 In sorted and directed rings O(log n) can be achieved.

Routing with interwals (contd.) Tree networks Interwal routing can always be done in tree networks by renaming the nodes by post-order traversal. Every node has a higher number than any of it s children Every subtree contains only consecutive integers

Routing with interwals (contd.) Tree example 15 3 8 14 2 6 7 9 13 0 1 4 5 10 11 12 An example of a 16-node tree network with nodes named by post-order traversal.

Routing with interwals (contd.) Tree example (contd.) (4, 6) 8 (9, 3) (7, 7) The routing table of 8 Link Interwal parent (9, 3) = 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3 left (4, 6) = 4, 5, 6 right (7, 7) = 7

Routing with interwals (contd.) Globe graph Interwal routing is not always possible, however. Here is an example of such a case, called a globe graph:

Suboptimal routing with interwals If providing shortest path routing is not necessary, for any network a routing tree can be constructed. As already seen, interwal routing always works in trees.

Recap Optimal routing is expensive, but suboptimal, efficient, and often good enough solutions exist. The primary method covered here uses some spanning tree to route traffic.

Recap Optimal routing is expensive, but suboptimal, efficient, and often good enough solutions exist. The primary method covered here uses some spanning tree to route traffic. Adaptive routing tries to cope with changing costs of links. Optimal solutions are very expensive, but e.g. point-of-failure rerouting uses no extra communication after the initial construction, and manages single-link crash failures. Message delivery cannot be guaranteed while crashes continue to occur, however.

Recap Optimal routing is expensive, but suboptimal, efficient, and often good enough solutions exist. The primary method covered here uses some spanning tree to route traffic. Adaptive routing tries to cope with changing costs of links. Optimal solutions are very expensive, but e.g. point-of-failure rerouting uses no extra communication after the initial construction, and manages single-link crash failures. Message delivery cannot be guaranteed while crashes continue to occur, however. Complete routing tables are very large. The only way to get below O(n log n) size per table is to use special knowledge about the network.