Redes de Computadores. Shortest Paths in Networks

Similar documents
Communication Networks

Link-State Routing OSPF

Link State Rou.ng Reading: Sec.ons 4.2 and 4.3.4

CS 457 Networking and the Internet. What is Routing. Forwarding versus Routing 9/27/16. Fall 2016 Indrajit Ray. A famous quotation from RFC 791

CSCD 330 Network Programming Spring 2018

DATA COMMUNICATOIN NETWORKING

CSCD 330 Network Programming Spring 2017

CSC 4900 Computer Networks: Routing Algorithms

CS 5114 Network Programming Languages Control Plane. Nate Foster Cornell University Spring 2013

CS 457 Networking and the Internet. Shortest-Path Problem. Dijkstra s Shortest-Path Algorithm 9/29/16. Fall 2016

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

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

CSC 401 Data and Computer Communications Networks

Link State Rou.ng Reading: Sec.ons 4.2 and 4.3.4

Chapter 4: Network Layer, partb

Routing Protocols. The routers in an internet are responsible for receiving and. forwarding IP datagrams through the interconnected set of

Interplay between routing, forwarding

Chapter 4: Network Layer

Chapter 5 Network Layer: The Control Plane

COMP/ELEC 429/556 Introduction to Computer Networks

Routing Algorithms : Fundamentals of Computer Networks Bill Nace

CS4450. Computer Networks: Architecture and Protocols. Lecture 11 Rou+ng: Deep Dive. Spring 2018 Rachit Agarwal

Dynamic Routing. The Protocols

Mobile Communications. Ad-hoc and Mesh Networks

More Routing. EE122 Fall 2012 Scott Shenker

cs/ee 143 Communication Networks

Internet rou)ng. V. Arun CS491G: Computer Networking Lab University of MassachuseFs Amherst

Chapter 4 Network Layer. Network Layer 4-1

Chapter 4 Network Layer

Interplay tra routing e forwarding

Review of Graph Theory. Gregory Provan

Announcement. Project 2 extended to 2/20 midnight Project 3 available this weekend Homework 3 available today, will put it online

EE 122: Intra-domain routing

Lecture 4. The Network Layer (cont d)

Network Layer: Routing

CMPE 80N: Introduction to Networking and the Internet. Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 20

Network layer. Network Layer 4-1. application transport network data link physical. network data link physical. network data link physical

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 13

Course on Computer Communication and Networks. Lecture 7 Network Layer, Chapter 4 (6/e) - Part B (7/e Ch5)

Outline. Routing. Introduction to Wide Area Routing. Classification of Routing Algorithms. Introduction. Broadcasting and Multicasting

Network Layer: Routing

Module 8. Routing. Version 2 ECE, IIT Kharagpur

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

Chapter 4 Network Layer

CSC 8560 Computer Networks: Control Plane

Computer Networks. Instructor: Niklas Carlsson

CSCE 463/612 Networks and Distributed Processing Spring 2018

5.1 introduction 5.5 The SDN control 5.2 routing protocols plane. Control Message 5.3 intra-as routing in Protocol the Internet

Routing Algorithms. CS158a Chris Pollett Apr 4, 2007.

Network layer: Overview. Network layer functions Routing IP Forwarding

Communication Networks I December 4, 2001 Agenda Graph theory notation Trees Shortest path algorithms Distributed, asynchronous algorithms Page 1

Graph abstraction: costs. Graph abstraction 10/26/2018. Interplay between routing and forwarding

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

ECE 333: Introduction to Communication Networks Fall 2001

EC441 Fall 2018 Introduction to Computer Networking Chapter 5: Network Layer Control Plane

CS321: Computer Networks Unicast Routing

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

CSE 461 Routing. Routing. Focus: Distance-vector and link-state Shortest path routing Key properties of schemes

Routing Algorithm Classification. A Link-State Routing Algorithm

Lecture 9. Network Layer (cont d) Network Layer 1-1

Network layer: Overview. Network layer functions Routing IP Forwarding

Internet Routing. Shortest-Path Routing. Intra-Domain Routing and Traffic Engineering. Two-Tiered Internet Routing System

CS118 Discussion Week 7. Taqi

Intra-AS Routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

ETSF05/ETSF10 Internet Protocols Routing on the Internet

Routing Protocol. Seiya Tsubone. Apr The University of Tokyo. Seiya Tsubone (The University of Tokyo) Routing Protocol Apr. 25.

Routing. Advanced Computer Networks: Routing 1

SWITCHING, FORWARDING, AND ROUTING

Shortest Paths Algorithms and the Internet: The Distributed Bellman Ford Lecturer: Prof. Chiara Petrioli

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 14

What is Routing? EE 122: Shortest Path Routing. Example. Internet Routing. Ion Stoica TAs: Junda Liu, DK Moon, David Zats

Chapter 4: Network Layer

Review: Routing in Packet Networks Shortest Path Algorithms: Dijkstra s & Bellman-Ford. Routing: Issues

Routing. Information Networks p.1/35

Lecture 4 Wide Area Networks - Routing

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

ETSF05/ETSF10 Internet Protocols. Routing on the Internet

5.2 Routing Algorithms

CMPE 150: Introduction to Computer Networks

By B.A.Khivsara Assistant Professor Department of Computer Enginnering SNJB s KBJ COE,Chandwad

Communication Networks

Youki Kadobayashi NAIST

Network Layer. CMPS 4750/6750: Computer Networks

Top-Down Network Design, Ch. 7: Selecting Switching and Routing Protocols. Top-Down Network Design. Selecting Switching and Routing Protocols

How Routing Algorithms Work

ICS 351: Today's plan. OSPF BGP Routing in general

CS 43: Computer Networks. 23: Routing Algorithms November 14, 2018

Lecture 5 The Network Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Top-Down Network Design

Youki Kadobayashi NAIST

Course Routing Classification Properties Routing Protocols 1/39

Distance Vector Routing

Routing in packet-switching networks

CS118 Discussion 1A, Week 7. Zengwen Yuan Dodd Hall 78, Friday 10:00 11:50 a.m.

Lecture 12: Link-state Routing. Lecture 12 Overview. Router Tasks. CSE 123: Computer Networks Chris Kanich. Routing overview

Chapter 3 Part 2 Switching and Bridging. Networking CS 3470, Section 1

ECE 158A: Lecture 5. Fall 2015

Network Layer: Control Plane 5-2

Routing Protocols of IGP. Koji OKAMURA Kyushu University, Japan

From Routing to Traffic Engineering

Transcription:

Redes de Computadores Shortest Paths in Networks Manuel P. Ricardo Faculdade de Engenharia da Universidade do Porto

» What is a graph?» What is a spanning tree?» What is a shortest path tree?» How are paths defined in a network?» How does the Dijkstra algorithm work?» How does a link state routing protocol work?» How does a node learn about neighbours?» How does the Bellman-Ford algorithm work?» How does a distance vector work?» What are the limitations of the layer network of switches?» How does the IEEE spanning tree protocol work?» What is the maximum capacity of a flow network?

Graph Directed and Undirected

Tree Trees T = (V,E)» graph with no cycles» number of edges E = V» any two vertices of the tree are connected by exactly one path A tree T is said to span a graph G = (V,E) (spanning tree) if» T = (V,E ) and E E

Shortest Path Trees Graphs and Trees can be weighted» G=(V,E,w)» T=(V, E,w)» w: E R Total cost of a tree T Minimum Spanning Tree T*» algorithms used to compute MST: Prism, Kruskal Shortest Path Tree (SPT) Rooted at Vertex s» tree composed by the» union of the shortest paths between s and each of other vertices of G» Algorithms used to compute SPT: Dijkstra, Bellman-Ford Computer networks use Shortest Path Trees 5

Routing in Layer Networks 6

Forwarding, Routing Forwarding data plane» directing packet from input to output link» using a forwarding table Routing control plane» computing paths the packets will follow» routers exchange messages» each router creates its forwarding table 0 destination address routing algorithm local forwarding table header value 000 00 0 00 output link 7

Importance of Routing End-to-end performance» path affects quality of service» delay, throughput, packet loss Use of network resources» balance traffic over routers and links» avoiding congestion by directing traffic to less-loaded links Transient disruptions» failures, maintenance» limiting packet loss and delay during changes 8

Shortest-Path Routing Path-selection model» Destination-based» Load-insensitive (e.g., static link weights)» Minimum hop count or minimum sum of link weights 5 9

Shortest-Path Problem Given a network topology with link costs» c(x,y) - link cost from node x to node y» infinity if x and y are not direct neighbors Compute the least-cost paths from source u to all nodes p(v) - node predecessor of node v in the path to u u 5 p(v) v 0

Dijkstra s Shortest-Path Algorithm Iterative algorithm» After k iterations known least-cost paths to k nodes S set of nodes for which least-cost path is known» Initially, S={u}, where u is the source node» Add one node to S in each iteration D(v) current cost of path from source to node v» Initially D(v)=c(u,v) for all nodes v adjacent to u D(v)= for all other nodes v» Continually update D(v) when shorter paths are learned

Dijsktra s Algorithm Initialization: S = {u} for all nodes v if v adjacent to u { 5 D(v) = c(u,v) } 6 else D(v) = 7 8 Loop 9 find node w not in S with the smallest D(w) 0 add w to S update D(v) for all v adjacent to w and not in S: D(v) = min{d(v), D(w) + c(w,v)} until all nodes in S

Dijkstra s Algorithm - Example 5 5 5 5

Dijkstra s Algorithm - Example 5 5 5 5

Shortest-Path Tree Shortest-path tree from u v y x u 5 t w s Forwarding table at u link z v (u,v) w (u,w) x (u,w) y (u,v) z (u,v) s (u,w) t (u,w) 5

Link-State Routing Each router keeps track of its incident links» link up, link down» cost on the link Each router broadcasts link state every router gets a complete view of the graph Each router runs Dijkstra s algorithm, to» compute the shortest paths» construct the forwarding table Example protocols» Open Shortest Path First (OSPF)» Intermediate System Intermediate System (IS-IS) 6

Detection of Topology Changes Beacons generated by routers on links» Periodic hello messages in both directions» few missed hellos link failure hello 7

Broadcasting the Link State How to Flood the link state?» every node sends link-state information through adjacent links» next nodes forward that info to all links except the one where the information arrived X A C B D (a) X A C B D (b) When to initiate flooding?» Topology change link or node failure/recovery link cost change» Periodically refresh link-state information typically 0 minutes X A C B D (c) X A C B D (d) 8

Scaling Link-State Routing Overhead of link-state routing» flooding link-state packets throughout the network» running Dijkstra s shortest-path algorithm Introducing hierarchy through areas Area Area area border router Area 0 Area Area 9

Bellman-Ford Algorithm Define distances at each node x» d x (y) = cost of least-cost path from x to y Update distances based on neighbors» d x (y) = min {c(x,v) + d v (y)} over all neighbors v u v w x 5 s y t z d u (z) = min{c(u,v) + d v (z), c(u,w) + d w (z)} 0

Distance Vector Algorithm c(x,v) = cost for direct link from x to v node x maintains costs of direct links c(x,v) D x (y) = estimate of least cost from x to y node x maintains distance vector D x = [D x (y): y є N ] Node x maintains also its neighbors distance vectors for each neighbor v, x maintains D v = [D v (y): y є N ] Each node v periodically sends D v to its neighbors» and neighbors update their own distance vectors» D x (y) min v {c(x,v) + D v (y)} for each node y N Over time, the distance vector D x converges

Distance Vector Algorithm Iterative, asynchronous each local iteration caused by: local link cost change distance vector update message from neighbor Distributed» node notifies neighbors only when its DV changes Neighbors then notify their neighbors, if necessary Each node: wait for (change in local link cost or message from neighbor) recompute estimates if DV to any destination has changed, notify neighbors

Distance Vector Example - Step 0 Optimum -hop paths Table for A Dst Cst Hop Table for B Dst Cst Hop E C A 0 A B B C D E E F 6 F A A B 0 B C D D E F F A 6 F B D Table for C Table for D Table for E Table for F Dst Cst Hop Dst Cst Hop Dst Cst Hop Dst Cst Hop A A A A A 6 A B B B B B B C 0 C C C C C C D D D 0 D D D E E E 0 E E E F F F F F F 0 F

Distance Vector Example - Step Optimum -hop paths Table for A Dst Cst Hop Table for B Dst Cst Hop E C A 0 A B B C 7 F D 7 B E E F 5 E A A B 0 B C F D D E F F F A 6 F B D Table for C Table for D Table for E Table for F Dst Cst Hop Dst Cst Hop Dst Cst Hop Dst Cst Hop A 7 F A 7 B A A A 5 B B F B B B F B B C 0 C C C C F C C D D D 0 D D D C E F E E 0 E E E F F F C F F F 0 F

Distance Vector Example - Step Optimum -hop paths Table for A Dst Cst Hop Table for B Dst Cst Hop E C A 0 A B B C 6 E D 7 B E E F 5 E A A B 0 B C F D D E F F F A 6 F B D Table for C Table for D Table for E Table for F Dst Cst Hop Dst Cst Hop Dst Cst Hop Dst Cst Hop A 6 F A 7 B A A A 5 B B F B B B F B B C 0 C C C C F C C D D D 0 D D 5 F D C E F E 5 C E 0 E E E F F F C F F F 0 F 5

Routing Information Protocol (RIP) Distance vector protocol» nodes send distance vectors every 0 seconds» or, when an update causes a change in routing RIP is limited to small networks 6

BGP The Exterior Gateway Routing Protocol (a) A set of BGP routers. (b) Information sent to F 7

Unique Spanning Tree in Ethernet Networks 8

L Networking - Single Tree Required Ethernet frame No hop-count Could loop forever broadcast frame, mis-configuration Layer network Required to have tree topology Single path between every pair of stations Spanning Tree Protocol (STP) Running in bridges Helps building the spanning tree Blocks ports 9

Constructing a Spanning Tree Distributed algorithm» switches need to elect a root the switch with the smallest identifier» each switch identifies if its interface is on the shortest path from the root» messages (Y, d, X) from node X claiming Y is the root and the distance is d root One hop Three hops 0

Steps in Spanning Tree Algorithm Initially, each switch thinks it is the root» switch sends a message out every interface» identifying itself as the root with distance 0» example: switch X announces (X, 0, X) Other switches update their view of the root» upon receiving a message, check the root id» if the new id is smaller, start viewing that switch as root Switches compute their distance from the root» add to the distance received from a neighbor» identify interfaces not on a shortest path to the root and exclude them from the spanning tree

Example - Switch # s Viewpoint Switch # thinks it is the root» sends (, 0, ) message to and 7 Then, switch # hears from #» receives (, 0, ) message from» and thinks that # is the root» and realizes it is just one hop away Then, switch # hears from #7» receives (,, 7) from 7» and realizes this is a longer path» so, prefers its own one-hop path» and removes -7 link from the tree 7 5 6

Example - Switch # s Viewpoint Switch # hears about switch #» switch hears (,, ) from» switch starts treating as root» and sends (,, ) to neighbors Switch # hears from switch #» switch starts treating as root» and sends (,, ) to neighbors 7 5 6 Switch # hears from switch #7» switch receives (,, 7) from 7» and realizes this is a longer path» so, prefers its own three-hop path» and removes -7 Iink from the tree 7 5 6

Maximum Flow of a Network

Flow Network Model Flow network» source s» sink t» nodes a, b and c Edges are labeled with capacities» (e.g. bit/s) Communication networks are not flow networks» they are queue networks» flow networks enable to determine limit values 5

Maximum Capacity of a Flow Network Max-flow min-cut theorem» maximum amount of flow transferable through a network» equals minimum value among all simple cuts of the network Cut split of the nodes V into two disjoint sets S and T» S T = V» there are V possible cuts Capacity of cut (S, T): 6

Max-flow Min-cut - Example possible cuts Maximum flow = 0 7

Homework. Review slides. Read from Tanenbaum» Section 5. Routing algorithms» Section.8. Spanning Tree Bridges 8