Internet Technology. 08. Routing. Paul Krzyzanowski. Rutgers University. Spring CS Paul Krzyzanowski

Similar documents
Chapter 4: Network Layer

Interplay between routing, forwarding

Routing Algorithm Classification. A Link-State Routing Algorithm

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

CS 3516: Advanced Computer Networks

Initialization: Loop until all nodes in N

4.5 Routing Algorithms

Network Layer: Routing

Chapter 4: Network Layer

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

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

CS 3516: Advanced Computer Networks

Computer Networks. Instructor: Niklas Carlsson

Chapter IV: Network Layer

4.5.2 The Distance-Vector (DV) Routing Algorithm

Internet Technology 3/21/2016

Computer Networking. Rou1ng Algorithms. Rou1ng Algorithms. Interplay between rou1ng, forwarding. routing algorithm

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

Interplay tra routing e forwarding

Ethernet Basics Learning Switches. based on Chapter 4 of CompTIA Network+ Exam Guide, 4 th ed., Mike Meyers

Chapter 4: Network Layer: Part II

Network Layer: Control Plane 5-2

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

Flooding. Routing: Outlook. Flooding Algorithms. Spanning Tree. Flooding

DATA COMMUNICATOIN NETWORKING

11/13/2017 Network Layer (SSL) Network-layer functions. Recall the two network-layer functions:

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

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

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

CSC 4900 Computer Networks: Routing Algorithms

Chapter 4 Network Layer. Network Layer 4-1

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

Chapter 5: Network Layer Control Plane. understand principles behind network control plane : traditional routing algorithms

Network layer. Two Key Network-Layer Functions. Datagram Forwarding table. IP datagram format. IP Addressing: introduction

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2017

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

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

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

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

Assignments. Computer Networks LECTURE 7 Network Layer: Routing and Addressing. Network Layer Function. Internet Architecture

Routing Algorithms. 1 Administrivia. Tom Kelliher, CS 325. Apr. 25, Announcements. Assignment. Read 4.6. From Last Time. IP protocol.

Chapter 4: Network Layer, partb

Chapter 4: Network Layer

CSC 401 Data and Computer Communications Networks

Network layer: Overview. Network layer functions Routing IP Forwarding

Routing Algorithms : Fundamentals of Computer Networks Bill Nace

Redes de Computadores. Shortest Paths in Networks

How Routing Algorithms Work

Computer Networks. Routing Algorithms

CSCE 463/612 Networks and Distributed Processing Spring 2018

Chapter 4: Network Layer. TDTS06 Computer networks. Chapter 4: Network Layer. Network layer. Two Key Network-Layer Functions

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

Routing Protocols and the IP Layer

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

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

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

Intra-domain Routing

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

Announcements. CS 5565 Network Architecture and Protocols. Count-To-Infinity. Poisoned Reverse. Distance Vector: Link Cost Changes.

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

Chapter 4 Network Layer

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

Chapter 4 Network Layer

COM-208: Computer Networks - Homework 6

End-to-end path: route

Chapter 4 Network Layer

Chapter 4: Network Layer

Introduction to Intra-Domain Routing

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

Chapter 12. Routing and Routing Protocols 12-1

Lecture 4. The Network Layer (cont d)

Chapter 5 Network Layer: The Control Plane

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

cs/ee 143 Communication Networks

CSCE 463/612 Networks and Distributed Processing Spring 2017

Lecture 4 Wide Area Networks - Routing

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

COMP/ELEC 429/556 Introduction to Computer Networks

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

Routing in a network

Missing Pieces of the Puzzle

Protocoles et Interconnexions

In this edition of HowStuffWorks, we'll find out precisely what information is used by routers in determining where to send a packet.

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

6.02 Fall 2014! Lecture #21. Failures in routing Routing loops Counting to infinity

COMP 3331/9331: Computer Networks and Applications

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

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

CSc 450/550 Computer Networks Internet Routing

ICS 351: Today's plan. netmask exercises network and subnetwork design dynamic routing RIP distance-vector routing

Data and Computer Communications. Chapter 12 Routing in Switched Networks

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

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

Distance Vector Routing

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

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network Layer. Chapter goals:

CS118 Discussion Week 7. Taqi

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

Transcription:

Internet Technolog 08. Routing Paul Kranoski Rutgers Universit Spring 06 March, 06 CS 0-06 Paul Kranoski

Routing algorithm goal st hop router = source router last hop router = destination router router router sitch LAN LAN Routing algorithm: given routers connected ith links, hat is a good (best?) path a source to a destination router good = least cost cost = time or mone March, 06 CS 0-06 Paul Kranoski

Routing graphs, neighbors, and cost v u Graph G = (N, E) N = set of nodes (routers) E = set of edges (links) Each edge = pair of connected nodes in N Node is a neighbor of node if (, ) E Cost Each edge has a value representing the cost of the link c(, ) = cost of edge beteen nodes & if (, ) E, then c(, ) = We ill assume c(, ) = c(, ) March, 06 CS 0-06 Paul Kranoski

Path cost, least-cost path, & shortest path v u A path in a graph G = (N, E) is a sequence of nodes (,,, p ) such that each of the pairs (, ), (, ),, ( p-, p ) are edges in E. The cost of a path is the sum of edge costs: c(, ), c(, ),, c( p-, p ) There could be multiple paths beteen to nodes, each ith a different cost. One or more of these is a least-cost path. Eample: the least-cost path beteen u and is (u,,, ) c(u,,, ) = If all edges have the same cost, then least-cost path = shortest path March, 06 CS 0-06 Paul Kranoski 4

Algorithm classifications Global routing algorithms Compute the least-cost path using complete knoledge of the netork The algorithm knos the connectivit beteen all nodes & costs Centralied algorithm These are link-state (LS) algorithms Decentralied routing algorithms No node has complete information about the costs of all links A node initiall knos onl its direct links Iterative process: calculate & echange info ith neighbors Eventuall calculate the least-cost path to a destination Distance-Vector (DV) algorithm March, 06 CS 0-06 Paul Kranoski

Additional algorithm classifications Static routing algorithms Routes change ver slol over time Dnamic routing algorithms Change routing paths as netork traffic loads or topolog change Load-sensitive algorithms Link costs var to reflect the current level of congestion Load-insensitive algorithms Ignore current or recent levels of congestion March, 06 CS 0-06 Paul Kranoski 6

Link-State (LS): Dijkstra s Algorithm Assumption: Entire netork topolog & link costs are knon Each node broadcasts link-state packets to all other nodes All nodes have an identical, complete vie of the netork Compute least-cost path one node to all other nodes in the netork Iterative algorithm After k iterations, least-cost paths are knon to k nodes March, 06 CS 0-06 Paul Kranoski 7

Dijkstra s Algorithm D(v): cost of least-cost path source to v p(v): previous node (neighbor of v) along the least-cost path to v N : subset of nodes for hich e found the least-cost path Initialie: N = current node N = { u } for all nodes v if v is a neighbor of u D(v) = c(u, v) else D(v) = u v step N D(v), p(v) D(), p() D(),p() D(),p() D(),p() 0 u,u,u,u March, 06 CS 0-06 Paul Kranoski 8

Dijkstra s Algorithm D(v): cost of least-cost path source to v p(v): previous node (neighbor of v) along the least-cost path to v N : subset of nodes for hich e found the least-cost path Loop until N = N: Find a node n not in N such that D(n) is a minimum Node has minimum D(n) add n to N N = {u, } for each neighbor m of n not in N : for each neighbor of node D(m) = min( D(m), D(n) + c(n, m) ) ne cost = old cost or cost through if D(m) changed, set p(m) = n u Skip: u N v step N D(v), p(v) D(), p() D(),p() D(),p() D(),p() Least cost path 0 u,u,u,u u,u 4,, Cost to v is not better through Cost to is better through Ignore ; it is in N We no have a path to March, 06 CS 0-06 Paul Kranoski 9

Dijkstra s Algorithm D(v): cost of least-cost path source to v p(v): previous node (neighbor of v) along the least-cost path to v N : subset of nodes for hich e found the least-cost path Loop until N = N: find n not in N such that D(n) is a minimum Nodes v & have minimum D(n) Pick an one: e choose add n to N N = {u,, } for each neighbor m of n not in N : for each neighbor of node D(m) = min( D(m), D(n) + c(n, m) ) ne cost = old cost or cost through if D(m) changed, set p(m) = n u v step N D(v), p(v) D(), p() D(),p() D(),p() D(),p() 0 u,u,u,u u,u 4,, u,u, 4, Cost to is even better through Least cost path Skip: and are in N We no have a path to March, 06 CS 0-06 Paul Kranoski 0

Dijkstra s Algorithm D(v): cost of least-cost path source to v p(v): previous node (neighbor of v) along the least-cost path to v N : subset of nodes for hich e found the least-cost path Loop until N = N: find n not in N such that D(n) is a minimum Node v has minimum D(n) add n to N N = {u,,, v} for each neighbor m of n not in N : for each neighbor of node v D(m) = min( D(m), D(n) + c(n,m) ) ne cost = old cost or cost through if D(m) changed, set p(m) = n u v step N D(v), p(v) D(), p() D(),p() D(),p() D(),p() 0 u,u,u,u u,u 4,, u,u, 4, uv, 4, No improvement (+) No change: is not a neighbor March, 06 CS 0-06 Paul Kranoski

Dijkstra s Algorithm D(v): cost of least-cost path source to v p(v): previous node (neighbor of v) along the least-cost path to v N : subset of nodes for hich e found the least-cost path Loop until N = N: find n not in N such that D(n) is a minimum Node has minimum D(n) add n to N N = {u,,, v, } for each neighbor m of n not in N : for each neighbor of node D(m) = min( D(m), D(n) + c(n,m) ) ne cost = old cost or cost through if D(m) changed, set p(m) = n u v step N D(v), p(v) D(), p() D(),p() D(),p() D(),p() 0 u,u,u,u u,u 4,, u,u, 4, uv, 4, 4 uv 4, No improvement (+) 4 March, 06 CS 0-06 Paul Kranoski

Dijkstra s Algorithm D(v): cost of least-cost path source to v p(v): previous node (neighbor of v) along the least-cost path to v N : subset of nodes for hich e found the least-cost path Loop until N = N: find n not in N such that D(n) is a minimum Node is the onl one left! u v step N D(v), p(v) D(), p() D(),p() D(),p() D(),p() 0 u,u,u,u add n to N N = {u,,, v,, } for each neighbor m of n not in N : There are no neighbors not in N! We re done u,u 4,, u,u, 4, uv, 4, 4 uv 4, uv March, 06 CS 0-06 Paul Kranoski

Dijkstra s Algorithm D(v): cost of least-cost path source to v p(v): previous node (neighbor of v) along the least-cost path to v N : subset of nodes for hich e found the least-cost path N = N: All nodes are in N u v step N D(v), p(v) D(), p() D(),p() D(),p() D(),p() () u is s predecessor For each node, e have the total cost the source and the predecessor along that path. We can look up the predecessor to find its predecessor E.g., least-cost path u is u 0 u,u,u,u u,u 4,, u,u, 4, uv, () is s 4, predecessor 4 uv 4, uv () is s predecessor March, 06 CS 0-06 Paul Kranoski 4

Dijkstra s Algorithm D(v): cost of least-cost path source to v p(v): previous node (neighbor of v) along the least-cost path to v N : subset of nodes for hich e found the least-cost path We can create a forarding table that stores the net hop on the least-cost route Forarding table for node u Destination v Link uv u u u u u v step N D(v), p(v) D(), p() D(),p() D(),p() D(),p() 0 u,u,u,u u,u 4,, u,u, 4, uv, 4, 4 uv 4, uv March, 06 CS 0-06 Paul Kranoski

Dijkstra s Algorithm Computational cost st iteration: search n nodes to find the minimum cost node nd iteration: search n- nodes rd iteration: search n- nodes n th iteration: search node n Total of n iterations = n + (n - ) + (n - ) + = i=0 (n i) We need to search n(n+)/ nodes Compleit = O(n ) March, 06 CS 0-06 Paul Kranoski 6

Oscillations ith congestion-based routing If link cost = load carried on the link Link costs are not smmetric c(u, v) = c(v, u) onl if the same load flos in both directions Eample loads Load of comes into for Load of comes into for Load of e comes into for When LS is run determines ( ) cost is compared to ( ) cost, hich is +e determines that is a loer-cost path +e 0 0 e 0 Initial routing e March, 06 CS 0-06 Paul Kranoski 7

Oscillations ith congestion-based routing After route updates, LS is run again,, and detect 0-cost path counterclockise +e 0 0 +e +e 0 0 0 0 e e Clockise routing Counterclockise routing March, 06 CS 0-06 Paul Kranoski 8

Oscillations ith congestion-based routing After route updates, LS is run et again,, and no detect 0-cost path clockise 0 +e +e 0 0 0 +e 0 0 e e Counterclockise routing Clockise routing March, 06 CS 0-06 Paul Kranoski 9

Avoiding oscillations Ensure that not all routers run the LS algorithm at the same time Avoid snchronied routers b randomiing the time hen a router advertises its link state March, 06 CS 0-06 Paul Kranoski 0

Distance-Vector Routing Algorithm Initial assumption Each router (node) knos the reach its directl-connected neighbors Iterative, asnchronous, distributed algorithm Multiple iterations Each iteration caused b local link cost change or distance vector update message neighbor Asnchronous Does not require lockstep snchroniation Distributed Each node receives information one or more directl attached neighbors Notifies neighbors onl hen its distance-vector changes March, 06 CS 0-06 Paul Kranoski

Bellman-Ford Equation What it sas If is not directl connected to, it needs to first hop to some neighbor v The loest cost is (the cost of the first hop to v) + (the loest cost v to ) = c(, v) + d v () the least cost path to, d (), is the minimum of the loest cost of all of s neighbors d () = min v { c(, v) + d v () } The value of v that satisfies the equation is the forarding table entr in s router for destination v' d v () c(,v ) c(,v ) v d v () March, 06 CS 0-06 Paul Kranoski

Distance-Vector Routing Algorithm At each node e store: c(, v) = cost for the direct link to v for each neighbor v D () = estimate of the cost of the least-cost path to Distance Vector is the set of D () for all nodes in N D = [ D (): N ] Least-cost estimates to all other nodes Distance vectors received its neighbors D v = [ D v (): N ] Set of least-cost estimates each neighbor v to each node Each node v periodicall sends its distance vector, D v to its neighbors When a node receives a distance vector, it saves it and updates its on distance vector using the Bellman-Ford equation D () = min v { c(, v) + D v () } for each node N If this results in a change to s DV, it sends the ne DV to its neighbors Each cost estimate D () converges to the actual least-cost D () March, 06 CS 0-06 Paul Kranoski

Distance-Vector Eample Node DV table Node DV table Node DV table 0 7 7 0 7 0 March, 06 CS 0-06 Paul Kranoski 4

Distance-Vector Eample Node DV table Node DV table Node DV table 0 7 7 0 7 0 Node sends its DV {0,, 7} to nodes and Node DV table 0 7 Node DV table 0 7 0 Node DV table 0 7 7 0 c(, ) = c(, ) = 7 March, 06 CS 0-06 Paul Kranoski

Distance-Vector Eample Node DV table Node DV table Node DV table 0 7 0 7 0 7 7 0 7 0 Node sends its DV {, 0, } to nodes and Node sends its DV {7,, 0} to nodes and Node DV table 0 0 7 0 Node DV table 0 7 0 7 0 Node DV table 0 7 0 0 c(, ) = From : c(,) is c(, ) = c(, ) + c(,) = c(, ) = = + = Less than old value, 7 Ever update to a node s DV also updates the forarding table From : c(,) is c(, ) = c(,) + c(,) = = + = Less than old value, 7 March, 06 CS 0-06 Paul Kranoski 6

Distance-Vector Eample Node DV table Node DV table Node DV table 0 0 7 0 7 7 0 0 0 7 0 7 0 0 Node DV table 0 0 0 Node DV table 0 0 0 Node DV table Node sends its DV {0,, 7} to nodes and Node s vector did not change it stas quiet Node sends its DV {, 0, } to nodes and 0 0 0 We converged. Everone has the same vie of the netork. Nobod has updates to send. March, 06 CS 0-06 Paul Kranoski 7

Link cost changes The DV algorithm remains quiet once it converges until some link cost changes If a node detects link cost change beteen itself and a neighbor It updates its distance vector If there is a change in the cost of an least-cost path it informs its neighbors of the ne distance vector Each neighbor computes a ne least cost If the value changed its previous value, it sends its DV to its neighbors Recompute until values converge March, 06 CS 0-06 Paul Kranoski 8

Link loss Distance to C = Distance to C = A B C We created a Routing Loop Suppose e lose the link to C: c(b,c) = B ill send an update to A but A thinks its C is B ill think there is a route to C: B A C ith a cost of (c(b,a) + ) = 4 Distance to C = Distance to C =4 A B C Update (A,C)= Distance to C = Distance to C =4 A B C Update (B,C)=4 This continues ad infinitum! March, 06 CS 0-06 Paul Kranoski 9

Mitigation: Poison Reverse If A routes through B to get to C A ill advertise to B that its distance is infinit B ill then never attempt to route through A This does not ork ith loops involving or more nodes! Other approaches Limit sie of netork b setting a hop (cost) limit Send full path information in route advertisement Perform eplicit queries for loops March, 06 CS 0-06 Paul Kranoski 0

The end March, 06 CS 0-06 Paul Kranoski