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

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

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

CS 457 Lecture 16 Routing Continued. Spring 2010

Lecture 8 Link-State Routing

Network Layer (Routing)

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

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

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

Distance-Vector Routing

Configuring OSPF. Information About OSPF CHAPTER

Computer Networks II

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

Introduction to Local and Wide Area Networks

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

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

Junos Intermediate Routing

4.4 Shortest Paths in a Graph Revisited

OSPF for IPv6. ISP Workshops

Internet Routing Protocols Lecture 02 Intra-domain Routing

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

Table of Contents. OSPF Configuration 1

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

Lecture 18: Network Layer Link State and Distance Vector Routing

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

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

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

CCNA Routing and Switching Study Guide Chapters 5 & 19: Multi-Area OSPF

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.

Guide to OSPF Application on the CSS 11000

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

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

Configuring OSPF. The Cisco OSPF Implementation

OSPF. Routing Protocols and Concepts Chapter 11

Scalable Routing Protocols for Mobile Ad Hoc Networks

Routing Algorithm Classification. A Distance Vector Routing Algorithm

Energy-Efficient MANET Routing: Ideal vs. Realistic Performance

material. For more information on how to get additional questions, please see a.

Simulative Comparison of MPLS Protection Switching vs. OSPF Re-routing

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

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

Babel A flexible routing protocol

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

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

Foundations of Distributed Systems: Tree Algorithms

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

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

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

Grundlagen der Rechnernetze. Introduction

Data Dissemination in Wireless Sensor Networks

Energy Saving Routing Strategies in IP Networks

Semiring Pruning for Information Dissemination in Mobile Ad Hoc Networks

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

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

Semiring Pruning for Information Dissemination in Mobile Ad Hoc Networks

IP Routing: OSPF Configuration Guide, Cisco IOS Release 12.4

Sybex ICND Chapter 4 and 18: OSPF. Instructor & Todd Lammle

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

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

From Shared Memory to Message Passing

Wireless Internet Routing. IEEE s

AIMA 3.5. Smarter Search. David Cline

Rev a. Single-Area OSPF. c cnac o okbook.com

OSPF Inbound Filtering Using Route Maps with

Wireless Network Security Spring 2014

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

Optimisation and Operations Research

Routing Messages in a Network

Lab Topology R16 R12 R15. Lo R /32 R /32 R /32 R /32 R / /

OSPF Enhanced Traffic Statistics for OSPFv2 and OSPFv3

Cisco IOS IP Routing: OSPF Command Reference

Data Gathering. Chapter 4. Ad Hoc and Sensor Networks Roger Wattenhofer 4/1

Basics of Routing and Link-State Routing

MITOCW R18. Quiz 2 Review

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

UMBC 671 Midterm Exam 19 October 2009

Problem 1 (15 points: Graded by Shahin) Recall the network structure of our in-class trading experiment shown in Figure 1

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

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

The Pennsylvania State University. The Graduate School. College of Engineering PERFORMANCE ANALYSIS OF END-TO-END

Wireless Mesh Networks

PERFORMANCE ANALYSIS OF ROUTING PROTOCOLS FOR P INCLUDING PROPAGATION MODELS

A Comparative Study of Quality of Service Routing Schemes That Tolerate Imprecise State Information

GAME THEORY MANET ROUTING FOR JAMMING ENVIRONMENT. Yi Zhu

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

PRIORITY QUEUES AND HEAPS

Link-State Routing in Networks with Unidirectional Links

Papers. Ad Hoc Routing. Outline. Motivation

Performance comparison of AODV, DSDV and EE-DSDV routing protocol algorithm for wireless sensor network

Lecture 20: Combinatorial Search (1997) Steven Skiena. skiena

Travel time uncertainty and network models

Global State and Gossip

Quality-of-Service Provisioning for Multi-Service TDMA Mesh Networks

CMPUT 396 Tic-Tac-Toe Game

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

Robonet - MANET for Robot Communication

Monitoring Churn in Wireless Networks

OSPF Nonstop Routing. Finding Feature Information. Prerequisites for OSPF NSR

Connected Identifying Codes

Transcription:

Link State Routing Stefano Vissicchio UCL Computer Science CS 335/GZ

Reminder: Intra-domain Routing Problem Shortest paths problem: What path between two vertices offers minimal sum of edge weights? Classic graph algorithms find single-source shortest paths when the entire graph is known centrally Dijkstra s Algorithm, Bellman-Ford Algorithm Typically, no central knowledge of entire graph Each router only knows its own interfaces addresses

Reminder: Distance Vector (DV) Approach Shortest paths problem: What path between two vertices offers minimal sum of edge weights? but turned into a distributed algorithm Classic graph algorithms find single-source shortest paths when the entire graph is known centrally Dijkstra s Algorithm, Bellman-Ford Algorithm Typically, no central knowledge of entire graph Each router only knows its own interfaces addresses 3

Link State (LS) Approach Shortest paths problem: What path between two vertices offers minimal sum of edge unmodified, weights? but run on every router Classic graph algorithms find single-source shortest paths when the entire graph is known centrally Dijkstra s Algorithm, Bellman-Ford Algorithm Typically, no central knowledge of entire graph Each router only knows its own interfaces addresses 4

Link State Approach: Share the Map! Dijkstra s algorithm takes a weighted graph as input it is a centralized algorithm Link State routing protocols instruct routers to collectively build a map of the whole network each router shares its local information each router stores the map in a link state database each router runs Dijkstra s algorithm locally 5

Comparison between LS and DV principles Distance Vector principle: tell everything you know to your neighbours dump routing tables to neighbours Link State principle: tell everybody what you know about your neighbourhood flood local information network-wide 6

Agenda We deepen how Link State routing protocols work. Sharing the map Finding links: Hello protocol Building the map: Flooding protocol Dealing with failures and partitions. Computing paths 3. Properties of Link State Routing 7

Routers periodically say hello Each router runs a Hello Protocol transmits a hello packet on each interface, every time period P A hello packet contains: sender ID a list of neighbours from which sender has heard hello on that interface during period D > P e.g., D=3P 8

Routers establish adjacencies Routers need to know who to share the map with they establish logical links called adjacencies used to exchange LS messages Hello messages enable adjacencies to be built between neighbouring routers the adjacency is up if each of the two routers has received a hello message with its own ID, in the last period D the adjacency is down otherwise 9

Routers spread news on their neighbourhood Goal: build a map and keep it updated whenever a link in the LS map comes up or goes down, the map should be changed To this end, information is flooded LS routers run a Flooding Protocol a router detecting a topology change sends a link state advertisement (LSA) to all its neighbours over the established adjacencies

Flooding enables to build the network map An LSA contains: ID of the advertising router a sequence number information on every local link, including router ID of the other endpoint and link metric message parameters: LS age, type, etc. Routers store received LSAs in a link-state database the LSDB keeps all the most recent LSAs routers flood new LSAs in the database

Routers flood information about adjacencies If link was not previously in database or LSA seq. no. > stored seq. no then:. store the LSA in the database. send the LSA out of all interfaces except the one it arrived on else if LSA seq. no. < stored seq. no then: send the stored LSA back to that neighbour (it s out of date) else ignore the LSA (we ve already heard it).

Agenda We deepen how Link State routing protocols work. Sharing the map Finding links: Hello protocol Building the map: Flooding protocol Dealing with failures and partitions. Computing paths 3. Properties of Link State Routing 3

LS: No bouncing after link failures LS distributes complete information on the network no ambiguity on valid paths à no bouncing When a link fails, the network map is updated flood that link is down, everyone recalculates paths A D B E C 4

LS: No count to infinity Flooding also implies no count to infinity When the network partitions, each router will end up with a map of its connected component computes paths on that sub-map A D B E C 5

Can LS always heal partitions efficiently? Consider flooding behavior when partition heals Link D-E is restored Link C-E fails nearly at the same time A D B E C 6

Some cases seem tricky D detects link (D, E) is now up, and floods LSAs to A but A and D may still think link (C, E) exists! If this is the first time link (D, E) comes up, how will A and D learn about links (B, E) and (B, C)? A D B E C 7

Periodic state refreshes are inadequate OSPF sends new LSAs every 3 mins, even for unmodified links sent often à too much overhead sent not so often à too slow A D B E C 8

Let s think about the real problem Problem: A, D do not know the state of remote links think about (B,C) Root cause: flooding news for neighbouring links is not always sufficient A D B E C 9

Routers briefly sync on new adjacencies! Solution: Routers exchange LS database summaries when they form new adjacencies upon new adjacency, routers exchange lists of (link endpoints, sequence numbers) LS databases contain much more information à summaries save bandwidth each router then requests missing or newer entries anything new is flooded to all the other neighbours

Agenda We deepen how Link State routing protocols work. Sharing the map Finding links: Hello protocol Building the map: Flooding protocol Dealing with failures and partitions. Computing paths 3. Properties of Link State Routing

Link State Database à Routing Table After flooding, routers need to transform their map into a routing table How? Single-source shortest paths algorithm Given a graph, the algorithm computes path with least cost from s to all other vertices In LS, each router views itself as source s, and all other routers as destinations

Shortest Paths: Definitions Each router is a vertex, v V Each link is an edge, e E, also written (u, v) Each link metric maps to an edge weight, w(u, v) A path is a sequence of edges Path cost is sum of edges weights 3

Shortest Paths: Definitions Data structures: π[v] is predecessor of v: π[v] is vertex before v along current shortest path from s to v d[v] is shortest path estimate: least cost found from s to v so far 4

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

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

Relaxation: Example Suppose d[u] = 5 d[v] = 9 w(u, v) = relax(u, v, w) computes: is d[v] > d[u] + w(u, v)? is 9 > 5 +? u v 5 9 relax(u, v) u v 5 7 Yes, so reaching v via (u, v) reduces path cost d[v] ß d[u] + w(u, v) π[v] ß u 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) 3. Pick the unfinished vertex v with smallest shortest path cost estimate 4. Add v to set S 5. Relax all edges leaving v 6. Repeat from 3. [Note: only correct for graphs where edge weights are not negative!] 8

Dijkstra s Algorithm: Pseudocode Dijkstra(V, E, w, s) ini#alize-single-source(v, s) S ß extract-min(q): Q ß V return vertex v from Q while Q do that has minimal shortestpath estimate d[v]; u ß extract-min(q) S ß S {u} remove v from Q for each vertex v that neighbors u relax(u, v, w) 9

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

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

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

Dijkstra s Algorithm: Pseudocode Dijkstra(V, E, w, s) ini#alize-single-source(v, s) S ß extract-min(q): Q ß V return vertex v from Q while Q do that has minimal shortestpath estimate d[v]; u ß extract-min(q) S ß S {u} remove v from Q for each vertex v that neighbors u relax(u, v, w) 33

Dijkstra s Algorithm: Efficiency Implement Q with binary heap total cost to insert V entries into Q: O(V) Cost of all extract-min() calls is O(V log V) cost of single call: O(log N), if N items in Q V calls, since the initial size of Q is V Cost of all relax() is O(E log V) cost of single call: O(log V) each call reduces d[] value for one vertex in Q at most E calls 34

Dijkstra s Algorithm: Efficiency (cont d) Total algorithm cost: O((V + E) log V) or O(E log V) when all vertices are reachable from the source Dijsktra runs in POLYNOMIAL time! fast in practice Also, note that most networks are sparse graphs E << V à Dijkstra algorithm is almost linear 35

Agenda We deepen how Link State routing protocols work. Sharing the map Finding links: Hello protocol Building the map: Flooding protocol Dealing with failures and partitions. Computing paths 3. Properties of Link State Routing 36

Link State Routing: Properties At first glance, flooding status of all links seems costly cost reasonable for hundreds of routers vanilla LS doesn t scale indefinitely e.g., for thousands of nodes yet, scalability can be improved with hierarchy In practice, LS has won over DV LS is more commonly used, especially in large (ISP) networks, where routing is critical DV rarely used except in small networks e.g., enterprise ones 37

Performance Comparison with Distance Vector LS has more guarantees and better performance than DV no loops after flooding, provided all nodes have consistent link state databases flooding à faster convergence after topology changes However, LS is also more complex to implement than DV sequence numbers crucial to protect against stale announcements adjacencies have to be established and maintained link state database is needed 38

Disclaimer: The real world is more complex Yet, LS does not solve all problems e.g., transient loops during convergence Such problems are relevant in practice connectivity is of utmost relevance: 99.999% uptime à max downtime: 5.6 minutes / year They attracted many industrial and research efforts Loop Free Alternate (LFA) and all its variants progressive metric increment 39

Disclaimer: The real world is more complex Also, network operators face more requirements avoid congestion, enforce firewall traversal, Routers primitives and Traffic Engineering (TE) techniques enable routing on non-shortest paths Big players started to develop their own routing systems even centralized: Google B4 [3], Microsoft SWAN [3], Google BwE [5], and this seems just an interesting beginning! 4