Link State Routing. Brad Karp UCL Computer Science. CS 3035/GZ01 3 rd December 2013

Similar documents
Link State Routing. Stefano Vissicchio UCL Computer Science CS 3035/GZ01

4.4 Shortest Paths in a Graph Revisited

OSPF Fundamentals. Agenda. OSPF Principles. L41 - OSPF Fundamentals. Open Shortest Path First Routing Protocol Internet s Second IGP

OSPF - Open Shortest Path First. OSPF Fundamentals. Agenda. OSPF Topology Database

CSE/EE 461. Link State Routing. Last Time. This Lecture. Routing Algorithms Introduction Distance Vector routing (RIP)

ROUTING PROTOCOLS. Dr. Ahmed Khattab. EECE Department Cairo University Fall 2012 ELC 659/ELC724

Introduction to OSPF. ISP Workshops. Last updated 11 November 2013

Link-state protocols and Open Shortest Path First (OSPF)

Lecture 8 Link-State Routing

CS 457 Lecture 16 Routing Continued. Spring 2010

Network Layer (Routing)

Distance-Vector Routing

Link State Routing. In particular OSPF. dr. C. P. J. Koymans. Informatics Institute University of Amsterdam. March 4, 2008

Computer Networks II

Link State Routing. In particular OSPF. Karst Koymans. Informatics Institute University of Amsterdam. (version 16.3, 2017/03/09 11:25:31)

Configuring OSPF. Information About OSPF CHAPTER

Link State Routing. In particular OSPF. Karst Koymans. Informatics Institute University of Amsterdam. (version 17.4, 2017/11/30 12:33:57)

Configuring the maximum number of external LSAs in LSDB 27 Configuring OSPF exit overflow interval 28 Enabling compatibility with RFC Logging

A Performance Comparison of Multi-Hop Wireless Ad Hoc Network Routing Protocols

OSPF Domain / OSPF Area. OSPF Advanced Topics. OSPF Domain / OSPF Area. Agenda

Internet Routing Protocols Lecture 02 Intra-domain Routing

M U LT I C A S T C O M M U N I C AT I O N S. Tarik Cicic

Table of Contents. OSPF Configuration 1

Scalable Routing Protocols for Mobile Ad Hoc Networks

Junos Intermediate Routing

Energy-Efficient MANET Routing: Ideal vs. Realistic Performance

Introduction to Local and Wide Area Networks

Link State Routing. Link state routing principles Dijkstra s shortest-path-first algorithm The OSPF protocol. (Chapter 6 in Huitema) E7310/Comnet 1

Babel A flexible routing protocol

Foundations of Distributed Systems: Tree Algorithms

CSS 343 Data Structures, Algorithms, and Discrete Math II. Balanced Search Trees. Yusuf Pisan

OSPF for IPv6. ISP Workshops

AIMA 3.5. Smarter Search. David Cline

Lecture 18: Network Layer Link State and Distance Vector Routing

Configuring OSPF. The Cisco OSPF Implementation

A Review of Current Routing Protocols for Ad Hoc Mobile Wireless Networks

Stanford University CS261: Optimization Handout 9 Luca Trevisan February 1, 2011

Routing Algorithm Classification. A Distance Vector Routing Algorithm

OSPF. Routing Protocols and Concepts Chapter 11

ITE PC v4.0. Chapter Cisco Systems, Inc. All rights reserved. Cisco Public

From Shared Memory to Message Passing

PRIORITY QUEUES AND HEAPS

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

Chapter 12. Cross-Layer Optimization for Multi- Hop Cognitive Radio Networks

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims. Lecture 17: Heaps and Priority Queues

Papers. Ad Hoc Routing. Outline. Motivation

OSPF. Routing Protocols and Concepts Chapter 11. ITE PC v4.0 Chapter Cisco Systems, Inc. All rights reserved. Cisco Public

Volume 5, Issue 3, March 2017 International Journal of Advance Research in Computer Science and Management Studies

olsr.org 'Optimized Link State Routing' and beyond December 28th, 2005 Elektra

Modeling, Analysis and Optimization of Networks. Alberto Ceselli

Semiring Pruning for Information Dissemination in Mobile Ad Hoc Networks

Introduc)on to Computer Networks

Outline for today s lecture Informed Search Optimal informed search: A* (AIMA 3.5.2) Creating good heuristic functions Hill Climbing

Monitoring Churn in Wireless Networks

Lectures: Feb 27 + Mar 1 + Mar 3, 2017

Graphs and Network Flows IE411. Lecture 14. Dr. Ted Ralphs

Grundlagen der Rechnernetze. Introduction

BBS: Lian et An al. Energy Efficient Localized Routing Scheme. Scheme for Query Processing in Wireless Sensor Networks

A HYBRID GENETIC ALGORITHM FOR THE WEIGHT SETTING PROBLEM IN OSPF/IS-IS ROUTING

Data Dissemination in Wireless Sensor Networks

Question No: 2 In an OSPF Hello packet, which of the following fields must match for all neighbor routers on the segment? Choose three answers.

COMP Online Algorithms. Paging and k-server Problem. Shahin Kamali. Lecture 11 - Oct. 11, 2018 University of Manitoba

CMPUT 396 Tic-Tac-Toe Game

Optimisation and Operations Research

Wireless Internet Routing. IEEE s

Guide to OSPF Application on the CSS 11000

OSPF. OSPF Areas. BSCI Module Cisco Systems, Inc. All rights reserved. Cisco Public. Review of OSPF area characteristics:

Chapter 7: Sorting 7.1. Original

IP Routing: OSPF Configuration Guide, Cisco IOS Release 12.2SX

CSE 123: Computer Networks

Routing Messages in a Network

CSE 573 Problem Set 1. Answers on 10/17/08

Robonet - MANET for Robot Communication

CS649 Sensor Networks IP Lecture 9: Synchronization

PRIORITY QUEUES AND HEAPS. Lecture 19 CS2110 Spring 2014

Wireless Mesh Networks

Connected Identifying Codes

Final Exam (ECE 408/508 Digital Communications) (05/05/10, Wed, 6 8:30PM)

IP Routing: OSPF Configuration Guide, Cisco IOS XE Release 2

Basics of Routing and Link-State Routing

Computer Graphics (CS/ECE 545) Lecture 7: Morphology (Part 2) & Regions in Binary Images (Part 1)

Semiring Pruning for Information Dissemination in Mobile Ad Hoc Networks

A Level Computer Science H446/02 Algorithms and programming. Practice paper - Set 1. Time allowed: 2 hours 30 minutes

Common Mistakes. Quick sort. Only choosing one pivot per iteration. At each iteration, one pivot per sublist should be chosen.

Introduction. Introduction ROBUST SENSOR POSITIONING IN WIRELESS AD HOC SENSOR NETWORKS. Smart Wireless Sensor Systems 1

Overview. Ad Hoc and Wireless Mesh Networking. Ad hoc network. Ad hoc network

Introduction to Mesh

Travel time uncertainty and network models

Mathematical Problems in Networked Embedded Systems

p-percent Coverage in Wireless Sensor Networks

Link-State Routing in Networks with Unidirectional Links

Routing and Wavelength Assignment in All-Optical DWDM Transport Networks with Sparse Wavelength Conversion Capabilities. Ala I. Al-Fuqaha, Ph.D.

MIMO III: Channel Capacity, Interference Alignment

SCAM: Scenario-based Clustering Algorithm for Mobile Ad Hoc networks. V. S. Anitha & M. P. Sebastian National Institute of Technology Calicut Kerala

Design of Parallel Algorithms. Communication Algorithms

IP Routing: OSPF Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3650 Switches)

UNIVERSITY of PENNSYLVANIA CIS 391/521: Fundamentals of AI Midterm 1, Spring 2010

: Principles of Automated Reasoning and Decision Making Midterm

UMBC 671 Midterm Exam 19 October 2009

Design and Analysis of Algorithms Prof. Madhavan Mukund Chennai Mathematical Institute. Module 6 Lecture - 37 Divide and Conquer: Counting Inversions

Transcription:

Link State Routing Brad Karp UCL Computer Science CS 33/GZ 3 rd December 3

Outline Link State Approach to Routing Finding Links: Hello Protocol Building a Map: Flooding Protocol Healing after Partitions: Bringing up Adjacencies Finding Routes: Dijkstra s Shortest-Path- First Algorithm Properties of Link State Routing

Link State Approach to Routing Finding shortest paths in graph is classic theory problem Classic centralized single-source shortest paths algorithm: Dijkstra s Algorithm requires map of entire network Link State Routing: push a copy of whole network map to every router each router learns link state database each router runs Dijkstra s algorithm locally 3

Finding Links: Hello Protocol Each router configured to know its interfaces On each interface, every period P transmit a hello packet containing sender s ID list of neighbors from which sender has heard hello during period D D > P (e.g., D = 3P) Link becomes up if have received hello containing own ID on it in last period D Link becomes down if no such hello received in last period D Screens out unidirectional links 4

Building a Map: Flooding Protocol Whenever node becomes up or becomes down, flood announcement to whole network two link endpoint addresses metric for link (configured by administrator) sequence number Sequence number stored in link state database; incremented on every changed announcement prevents old link states from overwriting new ones

Building a Map: Flooding Protocol Whenever node becomes up or becomes down, flood announcement to whole network two link endpoint addresses metric for link (configured by administrator) sequence number Sequence number stored in link state database; incremented on every changed announcement prevents old link states from overwriting new ones Upon receiving new link state message on interface i: if link not in database, add it, flood elsewhere if link in database, and seqno in message higher than one in database, write into database, flood elsewhere if link in database and seqno in message lower than one in database, send link state from database on interface i 6

Outline Link State Approach to Routing Finding Links: Hello Protocol Building a Map: Flooding Protocol Healing after Partitions: Bringing up Adjacencies Finding Routes: Dijkstra s Shortest-Path- First Algorithm Properties of Link State Routing 7

Healing Network Partitions Recall example from Distance Vector routing where network partitions Consider flooding behavior when partitions heal A D B E C 8

Healing Network Partitions Recall example from Distance Vector routing where network partitions Consider flooding behavior when partitions heal A D B E C 9

Healing Network Partitions Recall example from Distance Vector routing where network partitions Consider flooding behavior when partitions heal A D B E C

Healing Network Partitions Recall example from Distance Vector routing where network partitions Consider flooding behavior when partitions heal A D B E C

Healing Network Partitions (II) D detects link (D, E), floods link state to A A and D may still think link (C, E) exists! If first time link (D, E) comes up, how will A learn about links (B, E), (B, C)? Flooding to report changes only in neighboring links not always sufficient! Bringing up adjacencies: when link comes up, routers at ends exchange short summaries (link endpoints, sequence numbers) of their whole databases routers then request missing or newer entries from one another saves bandwidth; real LS database entries contain more than link endpoints, seqnos A D B E C

Outline Link State Approach to Routing Finding Links: Hello Protocol Building a Map: Flooding Protocol Healing after Partitions: Bringing up Adjacencies Finding Routes: Dijkstra s Shortest-Path- First Algorithm Properties of Link State Routing 3

Link State Database à Routing Table After flooding each router holds map of entire network graph in memory Need to transform network map into routing table How: single-source shortest paths algorithm Router views itself as source s, all other routers as destinations 4

Shortest Paths: Definitions Each router is a vertex, v V Each link is an edge, e E, also written (u, v) Each link metric an edge weight, w(u, v) Series of edges is a path, whose cost is sum of edges weights Single-source shortest paths: seek path with least cost from s to all other vertices Data structures: π[v] is predecessor of v: π[v] is vertex before v along shortest path from s to v d[v] is shortest path estimate: least cost found from s to v so far

Shortest Paths: Definitions Each router is a vertex, v V Each link is an edge, e E, also written (u, v) Each link metric an edge weight, w(u, v) Series of edges is a path, whose cost is sum of edges weights Assume Single-source all edge shortest weights paths: nonnegative seek path with (Doesn t least cost make from sense s to all for other a link vertices to have negative cost ) Data structures: π[v] is predecessor of v: π[v] is vertex before v along shortest path from s to v d[v] is shortest path estimate: least cost found from s to v so far 6

Shortest Paths: Initialization When we start, we know little: no estimate of cost of any path from s to any other vertex no predecessor of v along shortest path from s to any v initialize-single-source(v, s) for each vertex v V do d[v] ß infinity π[v] ß NULL d[s] = 7

Shortest Paths Building Block: Relaxation Relaxation: Suppose we have current estimates d[u], d[v] of shortest path cost from s to u and v Does it reduce cost of shortest path from s to v to reach v via (u, v)? relax(u, v, w) if d[v] > d[u] + w(u, v) then d[v] ß d[u] + w(u, v) π[v] ß u 8

Suppose d[u] = d[v] = 9 w(u, v) = relax(u, v, w) computes: d[v]?> d[u] + w(u, v) 9?> + Yes, so reaching v via (u, v) reduces path cost d[v] = d[u] + w(u, v) π[v] = u Relaxation: Example u v 9 9

Suppose d[u] = d[v] = 9 w(u, v) = relax(u, v, w) computes: d[v]?> d[u] + w(u, v) 9?> + Yes, so reaching v via (u, v) reduces path cost d[v] = d[u] + w(u, v) π[v] = u Relaxation: Example u v 9 relax(u, v)

Suppose d[u] = d[v] = 9 w(u, v) = relax(u, v, w) computes: d[v]?> d[u] + w(u, v) 9?> + Yes, so reaching v via (u, v) reduces path cost d[v] = d[u] + w(u, v) π[v] = u Relaxation: Example u v 9 relax(u, v) u v 7

Dijkstra s Algorithm: Overall Strategy Maintain running estimates of costs of shortest paths to all vertices (initially all infinity) Keep a set S of vertices that are finished ; shortest paths to these vertices already found (initially empty) Repeatedly pick the unfinished vertex v with least shortest path cost estimate Add v to set S Relax all edges leaving v

Dijkstra s Algorithm: Overall Strategy Maintain running estimates of costs of shortest paths to all vertices (initially all infinity) Keep a set S of vertices that are finished ; shortest paths to these vertices N.B. only correct for graphs where edge already found (initially empty) weights nonnegative! Repeatedly pick the unfinished vertex v with least shortest path cost estimate Add v to set S Relax all edges leaving v 3

Dijkstra s Algorithm: Pseudocode Dijkstra(V, E, w, s) initialize-single-source(v, s) S ß Q ß V while Q do u ß extract-min(q) S ß S {u} for each vertex v that neighbors u do relax(u, v, w) 4

Dijkstra s Algorithm: Pseudocode Dijkstra(V, E, w, s) initialize-single-source(v, s) S ß Q ß V while Q do u ß extract-min(q) S ß S {u} extract-min(q): return vertex v in Q with minimal shortest-path estimate d[v] for each vertex v that neighbors u do relax(u, v, w)

Dijkstra s Algorithm: Example s u 3 x 7 9 4 v y 6 s u 3 x 7 9 4 v y 6 s: source d[i]: number inside of vertex i π[b]: if (a, b) red, then π[b] = a members of set S: blue-shaded vertices members of priority queue Q: non-shaded vertices 6

7 Dijkstra s Algorithm Example (cont d) u v y x 3 7 6 4 9 4 8 7 u v y x 3 7 4 9 3 8 7 v y x 3 7 4 9 6 6 u 9 8 7 v y x 3 7 4 9 6 u s s s s

Dijkstra s Algorithm Example (cont d) s u 8 3 x 9 7 4 v 9 7 y 6 s u 8 3 x 9 7 4 v 9 7 y 6 At termination, know shortest-path routes from s to all other routers Shortest-path tree, rooted at s 8

Dijkstra s Algorithm: Efficiency Most networks are sparse graphs far fewer edges than O(N ) Implement Q with binary heap for N items in heap, cost of extract-min() is O(log N) Begin with V entries in Q, call extract-min() once for each Cost: O(Vlog V) Total cost to insert V entries into Q: O(V) Each call to relax() reduces d[] value for vertex in Q Cost: O(log V) At most E calls to relax() Total cost: O((V + E) log V), or O(E log V) when all vertices reachable from source 9

Outline Link State Approach to Routing Finding Links: Hello Protocol Building a Map: Flooding Protocol Healing after Partitions: Bringing up Adjacencies Finding Routes: Dijkstra s Shortest-Path- First Algorithm Properties of Link State Routing 3

Link State Routing: Properties At first glance, flooding status of all links seems costly It is! Doesn t scale to thousands of nodes without other tricks, namely hierarchy (more when we discuss BGP) Cost reasonable for networks of hundreds of routers In practice, for intra-domain routing, LS has won, and DV no longer used LS: after flooding, no loops in routes, provided all nodes have consistent link state databases LS: flooding offers fast convergence after topology changes LS more complex to implement than DV Sequence numbers crucial to protect against stale announcements Bringing up adjacencies Maintains both link state database and routing table 3