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

Similar documents
EE 122: Intra-domain routing

Let s focus on clarifying questions. More Routing. Logic Refresher. Warning. Short Summary of Course. 10 Years from Now.

COMP/ELEC 429/556 Introduction to Computer Networks

COMP 3331/9331: Computer Networks and Applications

IP Forwarding Computer Networking. Routes from Node A. Graph Model. Lecture 10: Intra-Domain Routing

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

Initialization: Loop until all nodes in N

ECE 158A: Lecture 5. Fall 2015

Discussion 8: Link State Routing. CSE 123: Computer Networks Marti Motoyama & Chris Kanich

Routing. 9: Intro to Routing Algorithms. Routing. Roadmap. Routing Algorithm classification: Static or Dynamic?

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

Distance-Vector Routing: Distributed B-F (cont.)

Third Generation Routers

Network service model. Network service model. Network Layer (part 1) Virtual circuits. By the end of this lecture, you should be able to.

Routing Algorithm Classification. A Link-State Routing Algorithm

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

IP Forwarding Computer Networking. Graph Model. Routes from Node A. Lecture 11: Intra-Domain Routing

WAN Technology and Routing

More Routing. EE122 Fall 2012 Scott Shenker

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

Chapter 4: Network Layer

Chapter 4: Network Layer

COMP 631: NETWORKED & DISTRIBUTED SYSTEMS 9/6/16 COMP 631: NETWORKED & DISTRIBUTED SYSTEMS. Internet Routing. Jasleen Kaur.

Routers & Routing : Computer Networking. Binary Search on Ranges. Speeding up Prefix Match - Alternatives

CSC 4900 Computer Networks: Routing Algorithms

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

DATA COMMUNICATOIN NETWORKING

ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE! 1. Link state flooding topology information finding the shortest paths (Dijkstra)

Chapter 4: Network Layer

TCP/IP Networking. Part 3: Forwarding and Routing

Missing Pieces of the Puzzle

Chapter 4: Network Layer, partb

Link-State Routing OSPF

More on Network Routing and Internet Protocol

Network Routing. Packet Routing, Routing Algorithms, Routers, Router Architecture

The Problem: Finding Paths Spring 2011 Lecture #19. Forwarding. Shortest Path Routing

4/25/12. The Problem: Distributed Methods for Finding Paths in Networks Spring 2012 Lecture #20. Forwarding. Shortest Path Routing

CSCE 463/612 Networks and Distributed Processing Spring 2018

Communication Networks

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

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2017

CEN445 Network Protocols and Algorithms. Chapter 2. Routing Algorithms. Dr. Ridha Ouni

Routing. Effect of Routing in Flow Control. Relevant Graph Terms. Effect of Routing Path on Flow Control. Effect of Routing Path on Flow Control

Network Layer: Routing

CSC 401 Data and Computer Communications Networks

Chapter 4 Network Layer. Network Layer 4-1

06/02/ Local & Metropolitan Area Networks. Overview. Routing algorithm ACOE322. Lecture 6 Routing

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

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

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

Interplay between routing, forwarding

Advanced Computer Networks

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

Routing Algorithms : Fundamentals of Computer Networks Bill Nace

Redes de Computadores. Shortest Paths in Networks

Network Layer (Routing)

CSE/EE 461 Distance Vector Routing

Computer Networks. Instructor: Niklas Carlsson

Main Challenge. Other Challenges. How Did it Start? Napster. Model. EE 122: Peer-to-Peer Networks. Find where a particular file is stored

CS 268: Lecture 9. Intra-domain Routing Protocols. Internet Routing. Example. Routing Problem. Routing

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

2/16/2008. Outline Computer Networking Lecture 11 Routing. Sending Link States by Flooding. Link State Protocol Concept

Chapter 5 Network Layer: The Control Plane

Network layer: Overview. Network layer functions Routing IP Forwarding

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

Chapter 4 Network Layer

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

ETSF05/ETSF10 Internet Protocols. Routing on the Internet

Distance Vector Routing

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

Lecture 4. The Network Layer (cont d)

Computer Networks. Wenzhong Li. Nanjing University

Routing in Ad-hoc Networks

Network Layer: Routing. Routing. Routing protocol. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links

Where we are in the Course

Internet Architecture. Network Layer Overview. Fundamental Network Layer Function. Protocol Layering and Data. Computer Networks 9/23/2009

DSDV: Proactive. Distance Vector (Basic idea) Distance Vector. Distance Vector Algorithm: Tables 12/13/2016

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

Distributed Algorithms in Networks EECS 122: Lecture 17

Distance Vector: Link Cost Changes. Interdomain Routing. Distance Vector: Count to Infinity Problem. Distance Vector: Poisoned Reverse

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

Agenda. distance-vector (what you invented last Friday) hierarchical routing routing in the Internet. v DNS assignment Q&A v Routing Algorithms

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

TCOM 501: Networking Theory & Fundamentals. Lecture 11 April 16, 2003 Prof. Yannis A. Korilis

ETSF05/ETSF10 Internet Protocols Routing on the Internet

Routing Unicast routing protocols

Routing. Jens A Andersson Communication Systems

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

CSc 450/550 Computer Networks Internet Routing

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

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

Dynamic Routing. The Protocols

Network layer: Overview. Network layer functions Routing IP Forwarding

Routing in a network

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

CSC 8560 Computer Networks: Control Plane

What s a protocol? CE80N Introduction to Networks & The Internet. Communication Protocol. Protocol Layers. Dr. Chane L. Fullmer UCSC Winter 2002

Advanced Topics in Routing

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

Transcription:

What is Routing? Routing implements the core function of a network: : Shortest Path Routing Ion Stoica Ts: Junda Liu, K Moon, avid Zats http://inst.eecs.berkeley.edu/~ee/fa9 (Materials with thanks to Vern Paxson, Jennifer Rexford, and colleagues at U erkeley) It ensures that information accepted for transfer at a source node is delivered to the correct set of destination nodes, at reasonable levels of performance. Internet Routing xample Internet organized as a two level hierarchy irst level autonomous systems (S s) S region of network under a single administrative domain S s run an intra-domain routing protocols istance Vector, e.g., Routing Information Protocol (RIP) Link State, e.g., Open Shortest Path irst (OSP) etween S s runs inter-domain routing protocols, e.g., order Gateway Routing (GP) e facto standard today, GP- S- S- Interior router GP router S-

orwarding vs. Routing orwarding: data plane irecting a data packet to an outgoing link Individual router using a forwarding table Routing: control plane omputing paths the packets will follow Routers talking amongst themselves Individual router creating a forwarding table Know Thy Network Routing requires knowledge of the network structure entralized global state Single entity knows the complete network structure an calculate all routes centrally Problems with this approach? istributed global state very router knows the complete network structure Independently calculates routes Problems with this approach? istributed no-global state very router knows only about its neighboring routers Independently calculates routes Problems with this approach? Link State Routing!.g. lgorithm: ijkstra!.g. Protocol: OSP! istance Vector Routing!.g. lgorithm: ellman-ord!.g. Protocol: RIP! 6 Modeling a Network Link State: ontrol Traffic Modeled as a graph Routers nodes Link edges Possible edge costs delay congestion level ach node floods its local information to every other node in the network ach node ends up knowing the entire network topology use ijkstra to compute the shortest path to every other node Host N Host N N Host Goal of Routing etermine a good path through the network from source to destination Good usually means the shortest path Host N N N6 N Host 8

Link State: Node State Notation Host Host N N Host N N N6 N N Host Host c(i,j): link cost from node i to j; cost infinite if not direct neighbors; (v): current value of cost of path from source to destination v p(v): predecessor node along path from source to v, that is next to v S: set of nodes whose least cost path definitively known 9 Source! ijsktra s lgorithm Initialization: S = {}; for all nodes v if v adjacent to then (v) = c(,v); 6 else (v) = ; c(i,j): link cost from node i to j (v): current cost source v p(v): predecessor node along path from source to v, that is next to v S: set of nodes whose least cost path definitively known 9 find w not in S such that (w) is a minimum; add w to S; update (v) for all v adjacent if (w) + c(w,v) < (v) then // w gives us a shorter path to v than we ve found so far (v) = (w) + c(w,v); p(v) = w; until all nodes in S; xample: ijkstra s lgorithm (),p() (),p(),, (),p(), (),p() (),p() Initialization: S = {}; for all nodes v if v adjacent to then (v) = c(,v); 6 else (v) = ;

xample: ijkstra s lgorithm (),p(), (),p(), (),p(), (),p() (),p() 9 find w not in S s.t. (w) is a minimum; add w to S; update (v) for all v adjacent If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; until all nodes in S; xample: ijkstra s lgorithm (),p(), (),p(), (),p(), (),p() (),p() 9 find w not in S s.t. (w) is a minimum; add w to S; update (v) for all v adjacent If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; until all nodes in S; xample: ijkstra s lgorithm (),p(), (),p() (),p(),,, (),p(), (),p() 9 find w not in S s.t. (w) is a minimum; add w to S; update (v) for all v adjacent If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; until all nodes in S; xample: ijkstra s lgorithm (),p(), (),p() (),p(),,,, (),p(), (),p(), 9 find w not in S s.t. (w) is a minimum; add w to S; update (v) for all v adjacent If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; until all nodes in S; 6

xample: ijkstra s lgorithm (),p(), (),p() (),p(),,,, (),p(), (),p(), 9 find w not in S s.t. (w) is a minimum; add w to S; update (v) for all v adjacent If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; until all nodes in S; xample: ijkstra s lgorithm (),p(), (),p() (),p(),,,, (),p(), (),p(), 9 find w not in S s.t. (w) is a minimum; add w to S; update (v) for all v adjacent If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; until all nodes in S; 8 xample: ijkstra s lgorithm (),p(), (),p() (),p(),,,, (),p(), (),p(), 9 find w not in S s.t. (w) is a minimum; add w to S; update (v) for all v adjacent If (w) + c(w,v) < (v) then (v) = (w) + c(w,v); p(v) = w; until all nodes in S; 9 xample: ijkstra s lgorithm (),p(), (),p() (),p(),,,, (),p(), (),p() To determine path (say), work backward from via p(v),

The orwarding Table Running ijkstra at node gives the shortest path from to all destinations We then construct the forwarding table estination Link (,) (,) (,) (,) omplexity How much processing does running the ijkstra algorithm take? ssume a network consisting of N nodes ach iteration: need to check all nodes, w, not in S N(N+)/ comparisons: O(N ) More efficient implementations possible: O(N log(n)) (,) Obtaining Global State looding the Link State looding ach router sends link-state information out its links The next node sends it out through all of its links except the one where the information arrived Note: need to remember previous msgs & suppress duplicates! X X X (a) (c) X (b) (d) Reliable flooding nsure all nodes receive link-state information nsure all nodes use the latest version hallenges Packet loss Out-of-order arrival Solutions cknowledgments and retransmissions Sequence numbers Time-to-live for each packet 6

When to Initiate looding Topology change Link or node failure Link or node recovery onfiguration change Link cost change See next slide for hazards of dynamic link costs based on current load Periodically Refresh the link-state information Typically (say) minutes Oscillations ssume link cost = amount of carried traffic +e e e initially +e +e recompute routing 6 orrects for possible corruption of the data +e +e recompute +e +e e recompute How can you avoid oscillations? istance Vector Routing Minute reak Questions efore We Proceed? ach router knows the links to its immediate neighbors oes not flood this information to the whole network ach router has some idea about the shortest path to each destination.g.: Router : I can get to router with cost via next hop router Routers exchange this information with their neighboring routers gain, no flooding the whole network Routers update their idea of the best path using info from neighbors 8

Information low in istance Vector ellman-ord lgorithm Host Host N N Host N N N6 N N Host Host INPUT: Link costs to each neighbor Not full topology OUTPUT: Next hop to each destination and the corresponding cost oes not give the complete path to the destination 9 ellman-ord - Overview ach router maintains a table Row for each possible destination olumn for each directly-attached neighbor to node ntry in row Y and column Z of node X best known distance from X to Y, via Z as next hop = Z (X,Y) Node 8 8 Neighbor (next-hop) estinations (, ) ellman-ord - Overview ach router maintains a table Row for each possible destination olumn for each directly-attached neighbor to node ntry in row Y and column Z of node X best known distance from X to Y, via Z as next hop = Z (X,Y) Node 8 8 Smallest distance in row Y = shortest istance of to Y, (, Y) 8

ellman-ord - Overview ach router maintains a table Row for each possible destination olumn for each directly-attached neighbor to node ach node: wait for (change in local link ntry in row Y and column Z of node X best known distance from X to Y, via cost or msg from neighbor) Z as next hop = Z (X,Y) ach local iteration caused by: recompute distance table Local link cost change Message from neighbor if least cost path to any dest Notify neighbors only if least cost path to any destination changes has changed, notify neighbors Neighbors then notify their neighbors if necessary istance Vector lgorithm (cont d) Initialization: for all neighbors V do c(i,j): link cost from node i to j if V adjacent to Z (,V): cost from to V via Z (, V) = c(,v); (,V): cost of s best path to V else 6 (, V) = ; send (, Y) to all neighbors loop: 8 wait (until sees a link cost change to neighbor V /* case */ 9 or until receives update from neighbor V) /* case */ if (c(,v) changes by ±d) /* case */ for all destinations Y that go through V do V (,Y) = V (,Y) ± d else if (update (V, Y) received from V) /* case */ /* shortest path from V to some Y has changed */ V (,Y) = V (,V) + (V, Y); /* may also change (,Y) */ if (there is a new minimum for destination Y) 6 send (, Y) to all neighbors forever xample: st Iteration ( ) loop: else if (update (, Y) from ) (,Y) = (,) + (, Y); if (new min. for destination Y) 6 send (, Y) to all neighbors forever Node 8 8 Node Node (, ) = (,) + (, ) = + = 8 (, ) = (,) + (, ) = + = 8 Node xample: st Iteration ( ) loop: else if (update (, Y) from ) (,Y) = (,) + (, Y); if (new min. for destination Y) 6 send (, Y) to all neighbors forever Node 8 8 Node Node (, ) = (,) + (, ) = + = (, ) = (,) + (, ) = + = Node 9

xample: nd of st Iteration nd of st Iteration ll nodes knows the best two-hop paths Node 8 8 Node 9 Node 9 Node 8 xample: nd Iteration ( ) loop: else if (update (, Y) from ) (,Y) = (,) + (, Y); if (new min. for destination Y) 6 send (, Y) to all neighbors forever Node 8 8 Node 9 Node (, ) = (,) + (, ) = + = (, ) = (,) + (, ) = + = Node 8 xample: nd of nd Iteration Node Node 8 8 xample: nd of rd Iteration Node Node 8 6 8 nd of nd Iteration ll nodes knows the best three-hop paths Node 6 9 Node nd of nd Iteration: lgorithm onverges! Node 9 Node

istance Vector: Link ost hanges istance Vector: ount to Infinity Problem loop: 8 wait (until sees a link cost change to neighbor V 9 or until receives update from neighbor V) / if (c(,v) changes by ±d) /* case */ for all destinations Y that go through V do V (,Y) = V (,Y) ± d else if (update (V, Y) received from V) /* case */ V (,Y) = V (,V) + (V, Y); if (there is a new minimum for destination Y) 6 send (, Y) to all neighbors forever loop: 8 wait (until sees a link cost change to neighbor V 9 or until receives update from neighbor V) / if (c(,v) changes by ±d) /* case */ for all destinations Y that go through V do V (,Y) = V (,Y) ± d else if (update (V, Y) received from V) /* case */ V (,Y) = V (,V) + (V, Y); if (there is a new minimum for destination Y) 6 send (, Y) to all neighbors forever 6 Node Node 6 9 6 9 6 9 good news travels fast Node Node 6 9 6 6 9 6 6 9 6 8 9 bad news travels slowly Link cost changes here time lgorithm terminates Link cost changes here time Node Node istance Vector: Poisoned Reverse If routes through to get to : - tells its ( s) distance to is infinite (so won t route to via ) - Will this completely solve count to infinity problem? 6 9 6 6 9 Link cost changes here; updates (, ) = 6 as has advertised (, ) = 6 6 9 6 6 9 6 9 time lgorithm terminates Routing Information Protocol (RIP) Simple distance-vector protocol Nodes send distance vectors every seconds or, when an update causes a change in routing Link costs in RIP ll links have cost Valid distances of through with 6 representing infinity Small infinity smaller counting to infinity problem RIP is limited to fairly small networks.g., campus

Link State vs. istance Vector Per-node message complexity: LS: O(e) messages e: number of edges V: O(d) messages, many times d is node s degree omplexity/onvergence LS: O(N log N) computation Requires global flooding V: convergence time varies ount-to-infinity problem Robustness: what happens if router malfunctions? LS: Node can advertise incorrect link cost ach node computes only its own table V: Node can advertise incorrect path cost ach node s table used by others; errors propagate through network Summary Routing is a distributed algorithm ifferent from forwarding React to changes in the topology ompute the shortest paths Two main shortest-path algorithms ijkstra link-state routing (e.g., OSP, IS-IS) ellman-ord distance-vector routing (e.g., RIP) onvergence process hanging from one topology to another Transient periods of inconsistency across routers Next time: GP Reading: K&R.6. 6