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

Similar documents
DATA COMMUNICATOIN NETWORKING

CSCE 463/612 Networks and Distributed Processing Spring 2018

Chapter 4: Network Layer, partb

CSC 4900 Computer Networks: Routing Algorithms

Chapter 4: Network Layer

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

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

Routing Algorithms : Fundamentals of Computer Networks Bill Nace

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

Network layer: Overview. Network layer functions Routing IP Forwarding

Chapter 4 Network Layer. Network Layer 4-1

CS321: Computer Networks Unicast Routing

cs/ee 143 Communication Networks

Network Layer: Routing

Chapter 4 Network Layer

CSCD 330 Network Programming Spring 2018

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

CSCD 330 Network Programming Spring 2017

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

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

Chapter 5 Network Layer: The Control Plane

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

EE 122: Intra-domain routing

Important Lessons From Last Lecture Computer Networking. Outline. Routing Review. Routing hierarchy. Internet structure. External BGP (E-BGP)

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

CSC 401 Data and Computer Communications Networks

Lecture 4. The Network Layer (cont d)

Interplay between routing, forwarding

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

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

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

Chapter 4: Network Layer

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

Link State Routing & Inter-Domain Routing

Routing Algorithm Classification. A Link-State Routing Algorithm

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

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

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

CSC 8560 Computer Networks: Control Plane

Network Layer: Routing

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

COM-208: Computer Networks - Homework 6

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

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

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

CSc 450/550 Computer Networks Internet Routing

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 14, 2013

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

Network layer: Overview. Network layer functions Routing IP Forwarding

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

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

Network Layer: Control Plane 5-2

Redes de Computadores. Shortest Paths in Networks

Routing in a network

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

Computer Networking Introduction

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

Intra-domain Routing

Routing Algorithms. CS158a Chris Pollett Apr 4, 2007.

Chapter 4: outline. Network Layer 4-1

NETWORK LAYER CONTROL PLANE

Routing. Outline. Algorithms Scalability

Inter-Domain Routing: BGP

Chapter 4: Network Layer: Part II

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

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

CS4450. Computer Networks: Architecture and Protocols. Lecture 15 BGP. Spring 2018 Rachit Agarwal

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

Computer Networks. Instructor: Niklas Carlsson

Introduction to Internet Routing

Dynamic Routing. The Protocols

Inter-Autonomous-System Routing: Border Gateway Protocol

How Routing Algorithms Work

Interplay Between Routing, Forwarding

Chapter IV: Network Layer

Why dynamic route? (1)

COMP 3331/9331: Computer Networks and Applications

Chapter 4: Network Layer. Lecture 12 Internet Routing Protocols. Chapter goals: understand principles behind network layer services:

Inter-Autonomous-System Routing: Border Gateway Protocol

Youki Kadobayashi NAIST

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

Routing. Jens A Andersson Communication Systems

Chapter 4: Network Layer

Youki Kadobayashi NAIST

UNIT III THE NETWORK LAYER

Routing. Advanced Computer Networks: Routing 1

Master Course Computer Networks IN2097

CS 43: Computer Networks. 24: Internet Routing November 19, 2018

Youki Kadobayashi NAIST

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

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 16, 2017

COMP211 Chapter 5 Network Layer: The Control Plane

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

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

Network Layer. CMPS 4750/6750: Computer Networks

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

Chapter 4: Network Layer

Routing Unicast routing protocols

Routing Protocols. Autonomous System (AS)

Transcription:

Routing Algorithms Tom Kelliher, CS 325 Apr. 25, 2008 1 Administrivia Announcements Assignment Read 4.6. From Last Time IP protocol. Outline 1. Introduction. 2. Link state routing. 3. Distance vector routing. 4. Hierarchical routing. 1

Coming Up Routing in the Internet. 2 Introduction 1. Host-to-host routing boils down to source router-to-destination router routing. Hence, we only need consider routing between routers. 2. Routing algorithms represent networks as graphs. 3. Let s recall a few things about graphs: (a) A set of vertices/nodes representing the routers. (b) A set of labeled edges, representing the links between routers. The edge labels specify the cost of the link. (c) Several ways to assign link costs: i. Assign a cost of 1 to every link. Minimizes hop count. ii. Assign cost as the inverse of link speed. Maximizing use of high speed links. iii. Assign costs for political/business reasons. Discourage use of certain links. (d) A path/route is an ordered list of connected vertices, from source to destination: i. Path cost is the sum of the edge costs along the path. ii. Routing algorithms work to minimize all path costs. Example network represented as a graph: 2

4. Classifications of routing algorithms: (a) Global: the routing algorithm knows the connectivity status and cost of all links in the network. The algorithm might be run at one centralized location or multiple sites. Referred to as link state algorithms. How is link state information acquired? How much overhead in acquiring this information? (b) Decentralized: the routing algorithm runs in an iterative, distributed manner within each router. Routers only know the cost of their directly-connected links, and share routing information with their neighbors. After a number of iterations, routers converge on the least-cost routes. Referred to as distance vector algorithms, as routers maintain a vector of distances (costs) to other routers. 3 Link State Routing 1. A router periodically broadcasts link state information to all other routers in the network. 2. Routers periodically run the LS algorithm to update their forwarding tables. 3

3. Dijkstra s algorithm is generally used. The following notation is used below: (a) N the set of the graph s vertices. (b) N set of vertices for which we know the final least-cost paths. (c) c(u, v) the cost associated with the edge from u to v. If no such edge exists, the cost is infinity. c(u, v) could differ from c(v, u). (d) D(v) current cost of the least-cost path from the source vertex to vertex v. (e) f(v) first vertex, connected to the source vertex, along the current least cost path from the source vertex to v. f(v) will be the first-hop router for forwarding. This differs slightly from the algorithm given in the textbook, which stores the next-to-last vertex along the path in p(v), requiring post-processing to determine the first-hop routers. The algorithm: N = {u}; // u is the source vertex. for each vertex, v, in N D(v) = c(u, v); if c(u, v) is finite // D(v) is finite only for u s neighbors. f(v) = v; do find w not in N such that D(w) is a minimum; add w to N ; for each neighbor, v, of w that is not in N if D(w) + c(w, v) < D(v) D(v) = D(w) + c(w, v); f(v) = f(w); while (N!= N); An efficient implementation will be O(n log n). (A poor implementation would be O(n 2 ), emphasizing the importance of paying attention in algorithms class!) 4

4. Run the algorithm on this graph: This will be the result: 3.1 Anomalous LS Routing Oscillations can occur if link cost is based on link traffic. Consider this example: 1. x and z route one unit of traffic to w; y routes e units of traffic to w. x and z route directly to w; y routes via x. (Assume that this traffic density is repeated for each routing cycle.) 5

2. After running the LS algorithm, the least cost path is now clockwise. 3. After running the LS algorithm again, the least cost path is now counter-clockwise! 6

4. Clockwise, again!! 5. Basing routing decisions on link traffic is desirable. Routing oscillations are not desirable. A solution to this problem is to prevent the routers from running the routing algorithm simultaneously. If this is not done carefully, the routers will tend to self-synchronize. 4 Distance Vector Routing 1. The DV algorithm is distributed, asynchronous, and self-terminating. 7

It iterates until it converges upon the shortest paths, at which time it ceases execution, until a link cost changes. 2. Notation: (a) d_x(y) is the cost of the least-cost path from x to y. (b) The Bellman-Ford equation recognizes that d_x(y) = min_v{c(x, v) + d_v(y)} where min_v{} is taken over all of x s neighbors. This equation is the heart of the DV algorithm. 3. DV_x = {D_x(y): y in N} is the vector of estimated least-cost distances from x to all vertices y in N. Over time, these estimates converge upon the actual least-cost distances. 4. DV algorithm for vertex x: for all vertices y in N D_x(y) = c(x, y); // If x and y aren t neighbors, this cost is // infinity. for each neighbor w and all vertices y D_w(y) = infinity; for each neighbor w send DV_x to w; while true wait until a link cost to a neighbor w changes or a neighbor w sends a new distance vector; for each y in N D_x(y) = min_v{c(x, y) + D_v(y)}; if D_x(y) changed for any vertex y for each neighbor w send DV_x to w; 8

5. Example: 4.1 Anomalous Behavior in DV Routing Consider the following link cost changes, ignoring x: 9

1. Left figure link cost decrease: y updates, sends; z updates, sends; done. Two iterations. 2. Right figure link cost increase: This will take 50 4 = 46 message exchanges before the forwarding tables stabilize. Meanwhile, we have a routing loop between y and z for datagrams destined for x. Count to infinity problem. This specific problem can be fixed if z reports to y that its distance to x is infinity. In general, if a uses b to route to c, a should report to b that its distance to c is infinity eliminating such routing loops. Poisoned reverse. Unfortunately, poisoned reverse doesn t work for routing loops involving three or more routers. 5 Comparing LS and DV Algorithms 1. LS requires more message exchanges than DV. 2. LS converges more quickly than DV. DV can suffer from routing loops until it does converge and suffers from count-to-infinity. 3. Both algorithms have failure modes, but LS failures tend to be local, while DV failures can be network-wide. 6 Hierarchical Routing 1. Routing is done in a hierarchical manner: 10

(a) To control scale. Number of Internet routers would overflow forwarding tables. LS info exchanges would be prohibitive. DV algorithms would never converge. (b) To allow administrative autonomy. An ISP should be able to control its routers using whatever routing protocol it chooses. ISPs should be able to hide details of their networks from each other. 2. Organize routers into autonomous systems. (a) Routers within an AS run the same routing protocol. (b) Routers that route between ASs are called gateway routers. 3. Example: Within an AS, LS or DV algorithms are used. Between AS s, network connectivity information is exchanged. This info must be propagated from the gateway routers to the interior routers. 4. If a foreign network is reachable through multiple gateways, interior routers use hot potato routing to route to the nearest gateway: 11

5. An ISP may treat its system as a single AS, or it may partition it into multiple ASs. 12