Routing Algorithms : Fundamentals of Computer Networks Bill Nace

Similar documents
CSC 4900 Computer Networks: Routing Algorithms

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

CSC 401 Data and Computer Communications Networks

DATA COMMUNICATOIN NETWORKING

Chapter 5 Network Layer: The Control Plane

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

Chapter 4: Network Layer, partb

CSCD 330 Network Programming Spring 2018

Chapter 4 Network Layer

CSCD 330 Network Programming Spring 2017

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

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

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

Chapter 4: Network Layer

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

Chapter 4 Network Layer. Network Layer 4-1

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

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

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

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

CSCE 463/612 Networks and Distributed Processing Spring 2018

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

CSC 8560 Computer Networks: Control Plane

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

Routing Algorithm Classification. A Link-State Routing Algorithm

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

CSCE 463/612 Networks and Distributed Processing Spring 2017

Chapter 4: Network Layer

Interplay between routing, forwarding

Redes de Computadores. Shortest Paths in Networks

CS 3516: Advanced Computer Networks

Network Layer: Routing

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

CS 3516: Advanced Computer Networks

EE 122: Intra-domain routing

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

Lecture 4. The Network Layer (cont d)

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

Chapter 4 Network Layer

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

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

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

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

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

Module 3 Network Layer CS755! 3-1!

Chapter IV: Network Layer

COMP 3331/9331: Computer Networks and Applications

COMP/ELEC 429/556 Introduction to Computer Networks

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

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

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

Initialization: Loop until all nodes in N

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

Data Communications & Networks. Session 7 Main Theme Networks: Part II Circuit Switching, Packet Switching, The Network Layer

Computer Networks. Wenzhong Li. Nanjing University

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

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

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

Computer Networks. Instructor: Niklas Carlsson

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

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

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

Dynamic Routing. The Protocols

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

Network layer: Overview. Network layer functions Routing IP Forwarding

Network layer: Overview. Network layer functions Routing IP Forwarding

Routing in a network

Department of Computer Science Southern Illinois University Carbondale

Routing Algorithms. CS158a Chris Pollett Apr 4, 2007.

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

Chapter 4: Network Layer

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

Interplay tra routing e forwarding

Chapter 5 Network Layer: The Control Plane

CS118 Discussion Week 7. Taqi

Δίκτυα Υπολογιστών ΙΙ. Κώστας Μαγκούτης Επίκουρος Καθηγητής Τμήμα Μηχανικών Η/Υ και Πληροφορικής Πανεπιστήμιο Ιωαννίνων

Link-State Routing OSPF

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

Routing Protocols and the IP Layer

Network Layer. CMPS 4750/6750: Computer Networks

Third Generation Routers

Chapter 12. Routing and Routing Protocols 12-1

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

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

Chapter 5 Network Layer: The Control Plane

Chapter 5 Network Layer: The Control Plane

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

Intra-domain Routing

NETWORK LAYER CONTROL PLANE

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

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

Chapter 5 Network Layer: The Control Plane

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

Lecture 4 Wide Area Networks - Routing

Network Layer: Control Plane 5-2

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

Computer Networks. Routing Algorithms

Master Course Computer Networks IN2097

cs/ee 143 Communication Networks

Transcription:

Routing Algorithms 4-740: Fundamentals of Computer Networks Bill Nace Material from Computer Networking: A Top Down Approach, 6 th edition. J.F. Kurose and K.W. Ross

Recall from Last Time Routing Algorithm Forwarding Table Header value 0xx 00 0 x Output Link 3 Routing is the process of creating and maintaining forwarding tables 0 value in arriving packet's header Forwarding uses the table to determine the output link for each packet 3

traceroute Routing Theory: Graphs and Overview Link State Algorithms Distance Vector Algorithms 3

Graph Abstraction Internet is composed of nodes connected with links Can be modeled as a big graph G = (N, E) N = Set of routers E = Set of links 4

Costs 5 v w 3 c(n,n) = cost of the link between N N ex: c(w, z) = 5, c(x,z) = Cost could mean: (hopcount), latency, congestion or inverse of bandwidth Cost of path (N, N,.. Np) = c(n,n) + c(n, N3) +.. + c(np-,np) u x 3 y 5 z 5

Routing 5 v w 3 What is the least-cost path between u and z? u x 3 y 5 z There are 7 different paths Routing Algorithm: find the least-cost path between any pairs of nodes When u forwards a packet bound for z : Choose exit link with least-cost path 6

Algorithm Classifications Global ( Link State algorithms) All routers have complete topology information and all link costs Decentralized ( Distance Vector algorithms) Each router starts with just local knowledge physically-connected neighbors link costs to neighbors Iterative process of computation, exchange of info with neighbors 7

Algorithm Classification () Static Route changes very slowly over time Perhaps via manual intervention Dynamic Routes change quickly Periodic updates... or in response to topology changes Load Sensitive? Reacts to congestion 8

traceroute Routing Theory: Graphs and Overview Link State Algorithms Distance Vector Algorithms 9

Link State Algorithms Use global knowledge: All routers know all Connectivity, edge weights How do all routers learn? Flooding Each node sends its link-state information on all directly connected links Each node relays such information on all of it s links, etc 0

After the Flood Each router calculates routes based on the link-state information Deterministic algorithm, so each router comes up with same answer Several algorithms exist: Dijkstra s is most famous

Dijkstra s Algorithm Iterative algorithm after k steps, know the least cost path to k closest locations Notation c(x,y): link cost from node x to y; if no direct link D(v): current value of cost of path from source to node v p(v): predecessor node along path from source to node v N : set of nodes whose least-cost path is known

Initialization: N' = {u} for all nodes v if v adjacent to u then D(v) = c(u,v) else D(v) = Loop until N' contains all nodes find w not in N' such that D(w) is a minimum add w to N' for all nodes v adjacent to w and N' D(v) = min( D(v), D(w) + c(w,v) ) /* new cost to v changes if path through w costs less */

5 v w Example u 3 3 5 z x y Step N D(v), p(v) D(w), p(w) D(x), p(x) D(y), p(y) D(z), p(z) 0 u, u 5, u, u ux, u 4, x,x uxy, u 3, y 4, y 3 uxyv 3, y 4, y 4 uxyvw 4, y 5 uxyvwz

Shortest Path Tree For a graph G and a particular node r...... the SPT(G, r) is a tree...... with the shortest path from the root to any other node d in the graph A SPT for Europe (all roads lead to Rome)

Dijkstra s Results SPT (G, u) and a forwarding table for u destination link v w v v u z w x x y x y x x z x 6

Complexity Algorithm complexity: n nodes each iteration: check all nodes not in N first iteration, check n nodes nd iteration, check n- nodes... Total is n(n+)/ comparisons O(n ) more efficient implementations possible Using a heap O(n log n) xkcd.com/399 7

traceroute Routing Theory: Graphs and Overview Link State Algorithms Distance Vector Algorithms 8

Distance-Vector Algs Still need to distribute local information Message exchange rather than flooding Each node exchanges distance vector with neighboring nodes d map of nodes to distances 9

Routing Algorithm Iterative: Each local iteration caused by..... A change in local link cost... or DV update message from neighbor Distributed Each node autonomously computes based on local knowledge...... which, after enough iterations is communicated to the world 0

Convergence At each node: wait for change recompute estimates, based on change if DV to any destination has changed, notify neighbors Convergence: process of getting consistent information to all nodes

Bellman-Ford Eqn Define dx(y) as cost of the least-cost path from x to y Bellman-Ford Equation says dx(y) = minv{c(x,v) + dv(y)} where minv means the min for all neighbors v of x xkcd.com/69

B-F Example 5 v 3 w Neighbors of U: dv(z) = 5, dx(z) = 3, dw(z) = 3 du(z) = min { c(u,v) + dv(z), c(u,x) + dx(z), c(u,w) + dw(z) } du(z) = min { + 5, + 3, 5 + 3 } = 4 Node that achieves minimum is next hop in the shortest path x goes in the forwarding table u x 3 y 5 z 3

Putting it all together Each node periodically sends its own distance vector estimates to neighbors When a node x receives a new DV estimate from a neighbor v, uses B-F Dx(y) minv{c(x,v)+dv(y)} for each y N The estimate Dx(y) converges to the actual dx(y) for minor, natural conditions 4

Example 5 v 3 w At t=0 u x 3 y 5 z Node U u 0 v w 5 x y z Node V u v 0 w 3 x y z Node W u 5 v 3 w 0 x 3 y z 5 Node X u v w 3 x 0 y z Node Y u v w x y 0 z Node Z u v w 5 x y z 0 5

Example 5 v 3 w Node u receives DV from w, v, x u x 3 y 5 z Node U u 0 v w 5 x y z Node V u v 0 w 3 x y z Node W u 5 v 3 w 0 x 3 y z 5 Node X u v w 3 x 0 y z Node U() u 0 v w 4 x y z 0 du(w) = min {c(u,u) + du(w), c(u,v) + dv(w), c(u,w) + dw(w), c(u,x) + dx(w), c(u,y) + dy(w), c(u,z) + dz(w)} du(w) = min {0 + 5, + 3, 5 + 0, + 3, + unknown, + unknown} du(w) = 4 6

Example 5 v 3 w After exchange u x 3 y 5 z Node U u 0 v w 4 x y z 0 Node V u v 0 w 3 x y 3 z 8 Node W u 4 v 3 w 0 x y z 3 Node X u v w x 0 y z 3 Node Y u v 3 w x y 0 z Node Z u 0 v 8 w 3 x 3 y z 0 7

Example 5 v 3 w After exchanges u x 3 y 5 z Node U u 0 v w 3 x y z 4 Node V u v 0 w 3 x y 3 z 5 Node W u 3 v 3 w 0 x y z 3 Node X u v w x 0 y z 3 Node Y u v 3 w x y 0 z Node Z u 4 v 5 w 3 x 3 y z 0 8

Example 5 v 3 w After 3 exchanges u x 3 y 5 z Node U u 0 v w 3 x y z 4 Node V u v 0 w 3 x y 3 z 5 Node W u 3 v 3 w 0 x y z 3 Node X u v w x 0 y z 3 Node Y u v 3 w x y 0 z Node Z u 4 v 5 w 3 x 3 y z 0 9

Dynamics If a link cost changes Node detects local link cost change, updates own forwarding table (recalculates DV) If DV changes, will notify neighbors Good News travels fast (one link-radius per exchange) 30

Dynamics () But: Bad news travels slowly If a link cost increases, can create a routing loop that slowly (and incorrectly) increases costs Count to Infinity problem Ex: If link c(x,y) changes to 60, Z still thinks there is a route to X of 5 Y thinks a route to X should be min(60, +5} = 6 60 X 4 0 Y Z 3

Stabilization Techniques Split horizon When a node sends a routing update to its neighbor, does not send those routes it learned from each neighbor back to that neighbor Split horizon with poisoned reverse Nodes advertise a cost of for a destination to the neighbor it routes through to that destination 3

Example 60 Y 4 Since Z routes through Y to get to X, it tells Y that Dz(x) = X 0 Z Dz(x) is actually 5 Now, Y calculates Dy(x) = min { 60, + } Y will tell Z that Dy(x) = 60, so Z will calculate Dz(x) = min {0, + 60} 33

Can also redefine Assume maximum costs to get to anywhere is C Do not let cost get > C in calculation This bounds the time to count to infinity Unfortunately, no technique completely solves the count to infinity problem When routing loop contains 3+ nodes 34

Comparison Message Complexity LS: with n nodes, E links, O(nE) messages sent DV: exchange between neighbors only Speed of Convergence LS: After correct message exchange DV: Varies. May be routing loops 35

Comparison () Robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: node can advertise incorrect path cost each node s table used by others, error propagates thru network 36

Lesson Objectives Now, you should be able to: describe the differences between global / decentralized and static / dynamic routing algorithms. Students should be able to describe different message complexity, convergence speeds, robustness and algorithm complexity calculate a forwarding table using Dijkstra's algorithm (which may include identifying and using proper variables and terms). Intermediate results may be required, such as an SPT or table of variable values 37

You should be able to: use Bellman-Ford equations to calculate a forwarding table for a DV routing algorithm. Intermediate values may be required, which may require knowing variable names and terms describe how DV algorithms operate to pass updates describe DV instability problems, such as Count to Infinity and the associated stabilization techniques analyze DV instability examples