COMP/ELEC 429/556 Introduction to Computer Networks

Similar documents
EE 122: Intra-domain routing

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

Routing Algorithm Classification. A Link-State Routing Algorithm

Chapter 4: Network Layer

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

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

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

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

Chapter 4: Network Layer

COMP 3331/9331: Computer Networks and Applications

More Routing. EE122 Fall 2012 Scott Shenker

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

ECE 158A: Lecture 5. Fall 2015

Chapter 4: Network Layer

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

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2017

CSC 4900 Computer Networks: Routing Algorithms

Interplay between routing, forwarding

Redes de Computadores. Shortest Paths in Networks

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

WAN Technology and Routing

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

DATA COMMUNICATOIN NETWORKING

Chapter 4: Network Layer, partb

CSCE 463/612 Networks and Distributed Processing Spring 2018

Initialization: Loop until all nodes in N

CSC 401 Data and Computer Communications Networks

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

Lecture 9. Reminder: Homework 3, Programming Project 2 due today. Questions? Thursday, September 22 CS 475 Networks - Lecture 9 1

Chapter 4 Network Layer. Network Layer 4-1

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

Network Layer: Routing

Routing. Routing. Overview. Overview. Routing vs. Forwarding. Why Routing

Network layer: Overview. Network layer functions Routing IP Forwarding

VI. ROUTING. - "routing protocol" nodes exchange information to ensure consistent understanding of paths

Dynamic Routing. The Protocols

C13b: Routing Problem and Algorithms

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

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

Overview. Problem: Find lowest cost path between two nodes Factors static: topology dynamic: load

Overview 4.2: Routing

COMP/ELEC 429 Introduction to Computer Networks

Link-State Routing OSPF

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

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

Routing in a network

Chapter 5 Network Layer: The Control Plane

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

Routing Algorithms : Fundamentals of Computer Networks Bill Nace

Network layer: Overview. Network layer functions Routing IP Forwarding

CSc 450/550 Computer Networks Internet Routing

Missing Pieces of the Puzzle

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

Third Generation Routers

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

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

Chapter 4 Network Layer

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

COMP/ELEC 429/556 Introduction to Computer Networks

TCP/IP Networking. Part 3: Forwarding and Routing

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

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

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

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

ETSF05/ETSF10 Internet Protocols. Routing on the Internet

Computer Networks. Instructor: Niklas Carlsson

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

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

Foundations of Telematics

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

Network Layer (Routing)

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

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

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

Routing. Outline. Algorithms Scalability

CS118 Discussion Week 7. Taqi

Network Layer: Routing

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

More on Network Routing and Internet Protocol

Routing. Jens A Andersson Communication Systems

Routing Unicast routing protocols

Chapter 4 Network Layer

ETSF05/ETSF10 Internet Protocols Routing on the Internet

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

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

Routing Algorithms. CS158a Chris Pollett Apr 4, 2007.

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

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

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

CS3600 SYSTEMS AND NETWORKS

CS4700/CS5700 Fundamentals of Computer Networks

CompSci 356: Computer Network Architectures. Lecture 13: Dynamic routing protocols: Link State Chapter 3.3.3, Xiaowei Yang

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

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

COMP211 Chapter 5 Network Layer: The Control Plane

Routing Algorithms. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Routing, Routers, Switching Fabrics

ECE 333: Introduction to Communication Networks Fall 2001

CSC 8560 Computer Networks: Control Plane

Transcription:

OMP/ELE 49/6 Introduction to omputer Networks Intra-domain routing Some slides used with permissions from Edward W. Knightly, T. S. Eugene Ng, Ion Stoica, Hui Zhang T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Routing What is routing? The process of determining the path to send data from a source to a destination Routing decides the contents of the forwarding tables in routers Different from Forwarding Forwarding is the act of moving packets from input to output according to a forwarding table Forwarding happens at both IP routers and at Ethernet bridges Ethernet performs forwarding, but not routing: Ethernet bridges flood a packet through the spanning tree, bridges learn the direction to the source and fill forwarding tables. There is no intentional path choice being made. Host Houston Host hicago T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Two Level Hierarchy of Internet Routing S- Interior router order router S- S- S utonomous System The numeric value is an ID T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Why Need Levels? Routing protocols are not efficient enough to deal with the size of the entire Internet Different organizations may want different internal routing policies llow organizations to hide their internal network configurations from outside llow organizations to choose how to route across multiple S s More scalable, more autonomy/independence T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 4

Two Level Hierarchy of Internet Routing First level autonomous systems (S) S: region of network under a single administrative domain e.g. Rice s IP network, T&T s US backbone IP network Each S performs intra-domain routing e.g. Routing Information Protocol (RIP) e.g. Open Shortest Path First (OSPF) Protocol e.g. Static routing, centralized routing... Second level inter-connected Ss etween Ss perform inter-domain routing e.g. order Gateway Protocol (GP) De facto standard today, GP-4 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Routing Policy Given multiple alternative paths, which paths are chosen to route packets to destinations is a policy decision What are some possible policies? Shortest path Most load-balanced Satisfies app s delay/bandwidth requirements Need routing protocols to realize these policies D E F Network modeled as a graph Routers nodes Link edges Edge cost: delay, congestion level, T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 6

Outline for this Module Two approaches for intra-domain routing oth try to achieve the shortest path routing policy Link state routing protocol Distance vector routing protocol In Project, you will get to implement fairly realistic variants of these and really understand how they work! Distributed coordination in action T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 7

General ssumptions Nodes know only the cost to their neighbors; not the topology Nodes can talk only to their neighbors using messages ll nodes run the same algorithm concurrently Nodes / links may fail, messages may be lost T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 8

Link State Routing Nodes flood, in a controlled manner, topology information in the form of link state packets Each node learns full topology Do not confuse this with Ethernet spanning tree data packet flooding Each node computes its own routing table to realize the shortest path routing policy y Dijkstra's algorithm T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 9

Link State Flooding Each node knows its connectivity and cost to a direct neighbor How? Every node tells every other node this local connectivity/cost information Via controlled flooding In the end, every node learns the complete topology of the network E.g. floods message: connected to cost connected to D cost connected to cost D E F T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 0

Flooding Details Each node periodically generates Link State Packet (LSP) that contains ID of node created LSP List of direct neighbors and costs Sequence number (say 64 bit, assume to never wrap around) Incremented when a new LSP is created Sequence number used to identify newer LSP n older LSP with a sequence number previously seen is discarded What if a router reboots and lost the last sequence number used? Receiving node flood newer LSP to all its neighbors except the neighbor where the LSP came from LSP is also triggered on-demand when a link s state changes (failed or restored) From Seq. # D T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Link State Flooding Example 7 4 8 6 0 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Link State Flooding Example 7 4 8 6 0 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Link State Flooding Example 7 4 8 6 0 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 4

Link State Flooding Example assume this copy arrives first 7 4 8 6 0 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Link State Flooding Example assume this copy arrives first 7 4 8 6 0 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 6

omputing Shortest Path Routes with Dijkstra s Shortest Path lgorithm Dijkstra s algorithm Network topology, link costs learned by all nodes ccomplished via link state flooding Each node computes least cost paths from itself to all other nodes in the topology Notations c(i,j): link cost from node i to j; cost infinite if not direct neighbors D(v): current value of cost of path from source to node 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 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 7

Dijsktra s lgorithm Initialization: S = {}; for all nodes v 4 if v adjacent to then D(v) = c(,v); 6 else D(v) = ; 7 8 Loop 9 find w not in S such that D(w) is a minimum; 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) ); // new cost to v is either old cost to v or known // shortest path cost to w plus cost from w to v until all nodes in S; T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 8

Example: Dijkstra s lgorithm Step 0 4 start S D(),p(), D(),p(), D(D),p(D), D(E),p(E) D(F),p(F) D E F Initialization: S = {}; for all nodes v 4 if v adjacent to then D(v) = c(,v); 6 else D(v) = ; T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 9

Example: Dijkstra s lgorithm Step 0 4 start S D D D(),p(), E F D(),p(), 4,D D(D),p(D), D(E),p(E),D D(F),p(F) 8 Loop 9 find w not in S s.t. D(w) is a minimum; 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; T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 0

Example: Dijkstra s lgorithm Step 0 4 start S D DE D(),p(), D(),p(), 4,D,E D(D),p(D), D(E),p(E),D D(F),p(F) 4,E D E F 8 Loop 9 find w not in S s.t. D(w) is a minimum; 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; T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Example: Dijkstra s lgorithm Step 0 4 start S D DE DE D(),p(), D(),p(), 4,D,E D(D),p(D), D(E),p(E),D D(F),p(F) 4,E D E F 8 Loop 9 find w not in S s.t. D(w) is a minimum; 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; T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Example: Dijkstra s lgorithm Step 0 4 start S D DE DE DE D(),p(), D(),p(), 4,D,E D(D),p(D), D(E),p(E),D D(F),p(F) 4,E D E F 8 Loop 9 find w not in S s.t. D(w) is a minimum; 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; T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Example: Dijkstra s lgorithm Step 0 4 start S D DE DE DE DEF D(),p(), D(),p(), 4,D,E D(D),p(D), D(E),p(E),D D(F),p(F) 4,E D E F 8 Loop 9 find w not in S s.t. D(w) is a minimum; 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; T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 4

Distance Vector Routing What is a distance vector? urrent best known cost to get to a destination e.g. at a node Dest. ost 7 D J K Q T t the beginning, distance vector only has information about directly attached neighbors Eventually the vector is filled T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Each router maintains Distance Vector Routing Row for each possible destination olumn for each directly-attached neighbor Entry in row Y and column Z of node X represents best known distance from X to Y, via Z as next hop Idea: Exchange distance vectors among neighbors to learn about lowest cost paths Periodically to refresh information On-demand when distance vector information changes Iteratively exchange distance vectors until no new information is learned T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 6

Distance Vector Routing Each local iteration caused by: Local link cost change DV message from neighbor: its least cost path to destination changed Each node notifies neighbors when its least cost path to any destination changes Neighbors then notify their neighbors if necessary Periodic messages used to refresh information Each node: wait for (change in local link cost or msg from neighbor) recompute distance vector if least cost path to any dest has changed, notify neighbors T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 7

Distance Vector lgorithm Initialization: for all nodes V do if V adjacent to 4 D(, V, V) = c(,v); /* Distance from to V via neighbor V */ else D(, V, *) = ; loop: 8 wait (until sees a link cost change to neighbor V 9 or until receives update from neighbor V) 0 if (c(,v) changes by d) for all destinations Y through V do D(,Y, V) = D(,Y,V) + d else if (update D(V, Y) received from V) /* shortest path from V to some Y has changed */ 4 D(,Y,V) = c(,v) + D(V, Y); if (there is a new minimum for destination Y) 6 send new message containing D(, Y) to all neighbors /* D(,Y) denotes the min D(,Y,*) */ 7 forever T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 8

Example: Distance Vector lgorithm 7 D Node Dest. ost NextHop 7 D - Node Dest. ost NextHop D D Initialization: for all nodes V do if V adjacent to 4 D(, V, V) = c(,v); else 6 D(, V, *) = ; Node Dest. ost NextHop 7 D D Node D Dest. ost NextHop - T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 9

Example: st Iteration ( ) 7 Node 7 loop: else if (update D(V, Y) received from V) 4 D(,Y,V) = c(,v) + D(V, Y); if (there is a new min. for destination Y) 6 send D(, Y) to all neighbors 7 forever Node D Dest. ost NextHop 7 D 8 Dest. ost NextHop 7 D D Node Dest. ost NextHop D D D(,D,) = c(, ) + D(,D) = 7 + = 8 (D(,), D(,), D(,D)) Node D Dest. ost NextHop - T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 0

Example: st Iteration (, ) 7 D Node Dest. ost NextHop D Node Dest. ost NextHop D D D(,D,) = c(,) + D(,D) = + = D(,,) = c(,) + D(,) = + = 7 loop: else if (update D(V, Y) received from V) 4 D(,Y,V) = c(,v) + D(V, Y) if (there is a new min. for destination Y) 6 send D(, Y) to all neighbors 7 forever Node Dest. ost NextHop 7 D D Node D Dest. ost NextHop - T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Example: End of st Iteration 7 D 7 loop: else if (update D(V, Y) received from V) 4 D(,Y,V) = c(,v) + D(V, Y); if (there is a new min. for destination Y) 6 send D(, Y) to all neighbors 7 forever Node Dest. ost NextHop D Node Dest. ost NextHop D D Node Dest. ost NextHop D Node D Dest. ost NextHop T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Example: End of nd Iteration 7 D Node Dest. ost NextHop D 4 7 loop: else if (update D(V, Y) received from V) 4 D(,Y,V) = c(,v) + D(V, Y); if (there is a new min. for destination Y) 6 send D(, Y) to all neighbors 7 forever Node Dest. ost NextHop D D Node Dest. ost NextHop D Node D Dest. ost NextHop 4 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

7 Example: End of rd Iteration D Node Dest. ost NextHop D 4 7 loop: else if (update D(V, Y) received from V) 4 D(,Y,V) = c(,v) + D(V, Y); if (there is a new min. for destination Y) 6 send D(, Y) to all neighbors 7 forever Node Dest. ost NextHop D D Nothing changes Node Dest. ost NextHop D Node D Dest. ost NextHop 4 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 4

Node Distance Vector: Link ost hanges 4 0 D N D N D N D N 4 Node D N D N D N D N good news travels fast Link cost changes here Nothing changes time T. S. Eugene Ng eugeneng at cs.rice.edu Rice University

Distance Vector: ount to Infinity Problem Node D N D N D N D N 60 4 0 4 6 6 8 Node D N D N D 7 N D 7 N bad news travels slowly time Link cost changes here; recall that also maintains shortest distance to through, which is 6. Thus D(, ) becomes 6! T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 6

Node Distance Vector: Poison Reverse If routes through to get to : - tells its distance to is infinite (so won t route to via ) - Will this completely solve count to infinity problem? D N D N D N D N 60 4 0 D N 4 60 60 Node D N D N D N D N D N 0 0 0 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 7

Link State vs. Distance Vector chieve different engineering trade-offs in terms of messaging overhead, computational overhead, convergence time, reliability... Which one would you choose and why? T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 8

Link State vs. Distance Vector Per node message complexity LS: O(n*d) messages to learn entire topology; n number of nodes; d average degree of nodes DV: O(d) messages per iteration; number of iterations vary (count-to-infinity) omputation complexity LS: O(n log n) with efficient priority queue for each execution of Dijkstra s alg. Faster incremental algorithms do exist DV: O(n) per iteration; total computation and convergence time vary (count-to-infinity) Robustness How likely is it to have a routing loop with each protocol? What happens in each protocol if a router malfunctions and lies in messages? T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 9