Shivkumar Kalyanaraman 1 Routing I: Basic Ideas Shivkumar Kalyanaraman Rensselaer Polytechnic Institute Based in part upon slides.

Slides:



Advertisements
Similar presentations
COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure.
Advertisements

Routing Protocol.
Courtesy: Nick McKeown, Stanford
Ali El-Mousa University of Jordan Based in part upon slides of Prof. Raj Jain (OSU), S. Keshav (Cornell), J. Kurose (U Mass), Noel Chiappa.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 ECSE-6600: Internet Protocols Informal Quiz #06: SOLUTIONS Shivkumar Kalyanaraman: GOOGLE: “Shiv.
Routing - I Important concepts: link state based routing, distance vector based routing.
Mod 10 – Routing Protocols
CCNA 2 v3.1 Module 6.
Routing & IP Routing Protocols
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Link State and Distance Vector Routing Computer Science Division Department of Electrical.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 Exterior Gateway Protocols: EGP, BGP-4, CIDR Shivkumar Kalyanaraman Rensselaer Polytechnic Institute.
Routing and Routing Protocols
COS 420 Day 17. Agenda Finished Grading Individualized Projects Very large disparity in student grading No two students had same ranking for other students.
Announcement r Project 2 extended to 2/20 midnight r Project 3 available this weekend r Homework 3 available today, will put it online.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Network Layer (Routing) Shivkumar.
Spring Routing & Switching Umar Kalim Dept. of Communication Systems Engineering 06/04/2007.
CSE 461: Distance Vector Routing. Next Topic  Focus  How do we calculate routes for packets?  Routing is a network layer function  Routing Algorithms.
Announcement r Project 2 Extension ? m Previous grade allocation: Projects 40% –Web client/server7% –TCP stack21% –IP routing12% Midterm 20% Final 20%
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
Lecture Week 3 Introduction to Dynamic Routing Protocol Routing Protocols and Concepts.
1 ECE453 – Introduction to Computer Networks Lecture 10 – Network Layer (Routing II)
1 Semester 2 Module 6 Routing and Routing Protocols YuDa college of business James Chen
Network Layer Goals: understand principles behind network layer services: –routing (path selection) –dealing with scale –how a router works –advanced topics:
Routing Algorithms (Ch5 of Computer Network by A. Tanenbaum)
ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical.
Interior Gateway Protocols: RIP & OSPF
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
Routing/Routed Protocols. Remember: A Routed Protocol – defines logical addressing. Most notable example on the test – IP A Routing Protocol – fills the.
1 Introducing Routing 1. Dynamic routing - information is learned from other routers, and routing protocols adjust routes automatically. 2. Static routing.
M.Menelaou CCNA2 ROUTING. M.Menelaou ROUTING Routing is the process that a router uses to forward packets toward the destination network. A router makes.
Routing protocols Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF)
1. 2 Anatomy of an IP Packet IP packets consist of the data from upper layers plus an IP header. The IP header consists of the following:
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
1 WAN Technologies and Routing. 2 Motivation Connect multiple computers Span large geographic distance Cross public right-of-way –Streets –Buildings –Railroads.
Network Layer4-1 Distance Vector Algorithm Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then d x (y)
Page 110/27/2015 A router ‘knows’ only of networks attached to it directly – unless you configure a static route or use routing protocols Routing protocols.
The Network Layer & Routing
1 Week 5 Lecture 2 IP Layer. 2 Network layer functions transport packet from sending to receiving hosts transport packet from sending to receiving hosts.
CCNA 2 Week 6 Routing Protocols. Copyright © 2005 University of Bolton Topics Static Routing Dynamic Routing Routing Protocols Overview.
Routing and Routing Protocols
Routing protocols. Static Routing Routes to destinations are set up manually Route may be up or down but static routes will remain in the routing tables.
IP Routing Principles. Network-Layer Protocol Operations Each router provides network layer (routing) services X Y A B C Application Presentation Session.
1 Version 3.1 Module 6 Routed & Routing Protocols.
1 7-Jan-16 S Ward Abingdon and Witney College Dynamic Routing CCNA Exploration Semester 2 Chapter 3.
© 2002, Cisco Systems, Inc. All rights reserved..
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
4: Network Layer4a-1 Distance Vector Routing Algorithm iterative: r continues until no nodes exchange info. r self-terminating: no “signal” to stop asynchronous:
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
Cisco 2 - Routers Perrine modified by Brierley Page 13/21/2016 Chapter 4 Module 6 Routing & Routing Protocols.
ROUTING ON THE INTERNET COSC Jun-16. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
Routing and Routing Protocols CCNA 2 v3 – Module 6.
Routing I: Basic Ideas Shivkumar Kalyanaraman
CS 5565 Network Architecture and Protocols
CSE390 – Advanced Computer Networks
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Routing in Packet Networks Shortest Path Routing
Road Map I. Introduction II. IP Protocols III. Transport Layer
CS 4700 / CS 5700 Network Fundamentals
CS 3700 Networks and Distributed Systems
Dynamic Routing and OSPF
COS 561: Advanced Computer Networks
ECE453 – Introduction to Computer Networks
CS 3700 Networks and Distributed Systems
COS 461: Computer Networks
ECSE-4730: Computer Communication Networks (CCN)
EE 122: Intra-domain routing: Distance Vector
Routing I: Basic Ideas Brief Version
Computer Networks Protocols
EE 122: Intra-domain routing: Link State
Presentation transcript:

Shivkumar Kalyanaraman 1 Routing I: Basic Ideas Shivkumar Kalyanaraman Rensselaer Polytechnic Institute Based in part upon slides of Prof. Raj Jain (OSU), S. Keshav (Cornell), J. Kurose (U Mass), Noel Chiappa (MIT)

Shivkumar Kalyanaraman 2  Routing vs Forwarding  Forwarding table vs Forwarding in simple topologies  Routers vs Bridges: review  Routing Problem  Telephony vs Internet Routing  Source-based vs Fully distributed Routing  Distance vector vs Link state routing  Addressing and Routing: Scalability  Refs: Chap 8, 11, 14, 16 in Comer textbook  Books: “Routing in Internet” by Huitema, “Interconnections” by Perlman  Reading: Notes for Protocol Design, E2e Principle, IP and Routing: In PDFIn PDF  Reading: Routing 101: Notes on Routing: In PDF | In MS WordIn PDF In MS Word  Reading: Khanna and Zinky, The revised ARPANET routing metricThe revised ARPANET routing metric  Reference: Garcia-Luna-Aceves: "Loop-free Routing Using Diffusing Computations" :"Loop-free Routing Using Diffusing Computations" :  Reading: Alaettinoglu, Jacobson, Yu: "Towards Milli-Second IGP Convergence""Towards Milli-Second IGP Convergence" Overview

Shivkumar Kalyanaraman 3  Routing vs Forwarding  Forwarding table vs Forwarding in simple topologies  Routers vs Bridges: review  Routing Problem  Telephony vs Internet Routing  Source-based vs Fully distributed Routing  Distance vector vs Link state routing  Addressing and Routing: Scalability Where are we?

Shivkumar Kalyanaraman 4 Routing vs. Forwarding  Forwarding: select an output port based on destination address and routing table  Data-plane function  Often implemented in hardware  Routing: process by which routing table is built..  … so that the series of local forwarding decisions takes the packet to the destination with high probability, and …(reachability condition)  … the path chosen/resources consumed by the packet is efficient in some sense… (optimality and filtering condition)  Control-plane function  Implemented in software

Shivkumar Kalyanaraman 5 Forwarding Table  Can display forwarding table using “netstat -rn”  Sometimes called “routing table” Destination Gateway Flags Ref Use Interface UH lo U 2 13 fa U le U 2 25 qaa U 3 0 le0 default UG

Shivkumar Kalyanaraman 6 Forwarding Table Structure q Fields: destination, gateway, flags,... q Destination: can be a host address or a network address. If the ‘H’ flag is set, it is the host address. q Gateway: router/next hop IP address. The ‘G’ flag says whether the destination is directly or indirectly connected. q U flag: Is route up ? q G flag: router (indirect vs direct) q H flag: host (dest field: host or n/w address?) Key question: q Why did we need this forwarding table in the first place ?

Shivkumar Kalyanaraman 7 Routing in Simple Topologies... Full mesh: port# = dest-addr Bus: Drop pkt on the wire… Star: stubs point to hub; hub behaves like full mesh S Ring: send packet consistently in (anti-)clockwise direction

Shivkumar Kalyanaraman 8  Routing vs Forwarding  Forwarding table vs Forwarding in simple topologies  Routers vs Bridges: review  Routing Problem  Telephony vs Internet Routing  Source-based vs Fully distributed Routing  Distance vector vs Link state routing  Addressing and Routing: Scalability Where are we?

Shivkumar Kalyanaraman 9 Recall… Layer 1 & 2 q Layer 1: q Hubs do not have “forwarding tables” – they simply broadcast signals at Layer 1. No filtering. q Layer 2: q Forwarding tables not required for simple topologies (previous slide): simple forwarding rules suffice q The next-hop could be functionally related to destination address (i.e. it can be computed without a table explicitly listing the mapping). q This places too many restrictions on topology and the assignment of addresses vis-à-vis ports at intermediate nodes. q Forwarding tables could be statically (manually) configured once or from time-to-time. q Does not accommodate dynamism in topology

Shivkumar Kalyanaraman 10 Recall… Layer 2 q Even reasonable sized LANs cannot tolerate above restrictions q Bridges therefore have “L2 forwarding tables,” and use dynamic learning algorithms to build it locally. q Even this allows LANs to scale, by limiting broadcasts and collisions to collision domains, and using bridges to interconnect collision domains. q The learning algorithm is purely local, opportunistic and expects no addressing structure. q Hence, bridges often may not have a forwarding entry for a destination address (I.e. incomplete) q In this case they resort to flooding – which may lead to duplicates of packets seen on the wire. q Bridges coordinate “globally” to build a spanning tree so that flooding doesn’t go out of control.

Shivkumar Kalyanaraman 11 Recall …: Layer 3 q Routers have “L3 forwarding tables,” and use a distributed protocol to coordinate with other routers to learn and condense a global view of the network in a consistent and complete manner. q Routers NEVER broadcast or flood if they don’t have a route – they “pass the buck” to another router. q The good filtering in routers (I.e. restricting broadcast and flooding activity to be within broadcast domains) allows them to interconnect broadcast domains, q Routers communicate with other routers, typically neighbors to collect an abstracted view of the network. q In the form of distance vector or link state. q Routers use algorithms like Dijkstra, Bellman-Ford to compute paths with such abstracted views.

Shivkumar Kalyanaraman 12 Recall: Interconnection Devices H H B H H Router Extended LAN =Broadcast domain LAN= Collision Domain Network Datalink Physical Transport Router Bridge/Switch Repeater/Hub Gateway Application Network Datalink Physical Transport Application

Shivkumar Kalyanaraman 13 Summary so far q If topology is simple and static, routing is simple and may not even require a forwarding table q If topology is dynamic, but filtering requirements are weak (I.e. network need not scale), then a local heuristic setup of forwarding table (bridging approach) suffices. q Further, if a) filtering requirements are strict, b) optimal/efficient routing is desired, and c) we want small forwarding tables and bounded control traffic, then … some kind of global communication, and smart distributed algorithms are needed to condense global state in a consistent, but yet complete way …

Shivkumar Kalyanaraman 14 What’s up in advanced routing? q Routers are efficient in the collection of the abstracted view (control-plane filtering) q Routers accommodate a variety of topologies, and sub- networks in an efficient manner q Routers are organized in hierarchies to achieve scalability; and into autonomous systems to achieve complex policy-control over routing. q Routers then condense paths into next hops, either: q depending upon other routers in a path to compute next-hops in a consistent manner (fully distributed), or q using a signaling protocol to enforce consistency. q Advanced routing algorithms support “QoS routing” and “traffic engineering” goals like multi-path routing, source- based or distributed traffic splitting, fast re-route, path protection etc.

Shivkumar Kalyanaraman 15  Routing vs Forwarding  Forwarding table vs Forwarding in simple topologies  Routers vs Bridges: review  Routing Problem  Telephony vs Internet Routing  Source-based vs Fully distributed Routing  Distance vector vs Link state routing  Addressing and Routing: Scalability Where are we?

Shivkumar Kalyanaraman 16 Routing problem q Collect, process, and condense global state into local forwarding information q Global state q inherently large q dynamic q hard to collect q Hard issues: q consistency, completeness, scalability q Impact of resource needs of sessions

Shivkumar Kalyanaraman 17 Consistency q Defn: A series of independent local forwarding decisions must lead to connectivity between any desired (source, destination) pair in the network. q If the states are inconsistent, the network is said not to have “converged” to steady state (I.e. is in a transient state) q Inconsistency leads to loops, wandering packets etc q In general a part of the routing information may be consistent while the rest may be inconsistent. q Large networks => inconsistency is a scalability issue. q Consistency can be achieved in two ways: q Fully distributed approach: a consistency criterion or invariant across the states of adjacent nodes q Signaled approach: the signaling protocol sets up local forwarding information along the path.

Shivkumar Kalyanaraman 18 Completeness q Defn: The network as a whole and every node has sufficient information to be able to compute all paths. q In general, with more complete information available locally, routing algorithms tend to converge faster, because the chances of inconsistency reduce. q But this means that more distributed state must be collected at each node and processed. q The demand for more completeness also limits the scalability of the algorithm. q Since both consistency and completeness pose scalability problems, large networks have to be structured hierarchically and abstract entire networks as a single node.

Shivkumar Kalyanaraman 19 Design Choices …  Centralized vs. distributed routing  Centralized is simpler, but prone to failure and congestion  Centralized preferred in traffic engineering scenarios where complex optimization problems need to be solved and where routes chosen are long-lived  Source-based (explicit) vs. hop-by-hop (fully distributed)  Will the source-based route be signaled to fix the path and to minimize packet header information?  Eg: ATM, Frame-relay etc  Or will the route be condensed and placed in each header? Eg: IP routing option  Intermediate: loose source route

Shivkumar Kalyanaraman 20 Design choices…  Static vs Dynamic Routing: a) ‘route’ command [Static] b) ICMP redirect message.[Static] c) routing daemon.Eg: ‘routed’ [Dynamic, connectionless] d) A signaling protocol [Dynamic, virtual- circuit]

Shivkumar Kalyanaraman 21 Static vs Dynamic StaticallyDynamically Routers exchange network reachability information using ROUTING PROTOCOLS. Routers use this to compute best routes Administrator manually configures forwarding table entries Practice : a mix of these. Static routing mostly at the “edge” + More control + Not restricted to destination-based forwarding - Doesn’t scale - Slow to adapt to network failures + Can rapidly adapt to changes in network topology + Can be made to scale well - Complex distributed algorithms - Consume CPU, Bandwidth, Memory - Debugging can be difficult - Current protocols are destination-based

Shivkumar Kalyanaraman 22 Example Dynamic Routing Model

Shivkumar Kalyanaraman 23  Routing vs Forwarding  Forwarding table vs Forwarding in simple topologies  Routers vs Bridges: review  Routing Problem  Telephony vs Internet Routing  Source-based vs Fully distributed Routing  Distance vector vs Link state routing  Addressing and Routing: Scalability Where are we?

Shivkumar Kalyanaraman 24 Detour: Telephony routing q Circuit-setup is what is routed. Voice then follows route, and claims reserved resources.  3-level hierarchy, with a fully-connected core  AT&T: 135 core switches with nearly 5 million circuits  LECs may connect to multiple cores

Shivkumar Kalyanaraman 25 Telephony Routing algorithm  If endpoints are within same CO, directly connect  If call is between COs in same LEC, use one-hop path between COs  Otherwise send call to one of the cores  Only major decision is at toll switch  one-hop or two-hop path to the destination toll switch.  Essence of telephony routing problem: which two-hop path to use if one-hop path is full (almost a static routing problem… )

Shivkumar Kalyanaraman 26 Features of telephone routing  Resource reservation aspects:  Resource reservation is coupled with path reservation  Connections need resources (same 64kbps)  Signaling to reserve resources and the path  Stable load  Network built for voice only.  Can predict pairwise load throughout the day  Can choose optimal routes in advance  Technology and economic aspects:  Extremely reliable switches  Why? End-systems (phones) dumb because computation was non-existent in early 1900s.  Downtime is less than a few minutes per year => topology does not change dynamically

Shivkumar Kalyanaraman 27 Features of telephone routing  Source can learn topology and compute route  Can assume that a chosen route is available as the signaling proceeds through the network  Component reliability drove system reliability and hence acceptance of service by customers  Simplified topology:  Very highly connected network  Hierarchy + full mesh at each level: simple routing  High cost to achieve this degree of connectivity  Organizational aspects:  Single organization controls entire core  Afford the scale economics to build expensive network  Collect global statistics and implement global changes => Source-based, signaled, simple alternate-path routing

Shivkumar Kalyanaraman 28 Internet Routing Drivers q Technology and economic aspects: q Internet built out of cheap, unreliable components as an overlay on top of leased telephone infrastructure for WAN transport. q Cheaper components => fail more often => topology changes often => needs dynamic routing q Components (including end-systems) had computation capabilities. q Distributed algorithms can be implemented q Cheap overlaid inter-networks => several entities could afford to leverage their existing (heterogeneous) LANs and leased lines to build inter-networks. q Led to multiple administrative “clouds” which needed to inter-connect for global communication.

Shivkumar Kalyanaraman 29 Internet Routing Model q 2 key features: q Dynamic routing q Intra- and Inter-AS routing, AS = locus of admin control q Internet organized as “autonomous systems” (AS). q AS is internally connected q Interior Gateway Protocols (IGPs) within AS. q Eg: RIP, OSPF, HELLO q Exterior Gateway Protocols (EGPs) for AS to AS routing. q Eg: EGP, BGP-4

Shivkumar Kalyanaraman 30 Requirements for Intra-AS Routing q Should scale for the size of an AS. q Low end: 10s of routers (small enterprise) q High end: 1000s of routers (large ISP) q Different requirements on routing convergence after topology changes q Low end: can tolerate some connectivity disruptions q High end: fast convergence essential to business (making money on transport) q Operational/Admin/Management (OAM) Complexity q Low end: simple, self-configuring q High end: Self-configuring, but operator hooks for control q Traffic engineering capabilities: high end only

Shivkumar Kalyanaraman 31 Requirements for Inter-AS Routing q Should scale for the size of the global Internet. q Focus on reachability, not optimality q Use address aggregation techniques to minimize core routing table sizes and associated control traffic q At the same time, it should allow flexibility in topological structure (eg: don’t restrict to trees etc) q Allow policy-based routing between autonomous systems q Policy refers to arbitrary preference among a menu of available options (based upon options’ attributes) q In the case of routing, options include advertised AS- level routes to address prefixes q Fully distributed routing (as opposed to a signaled approach) is the only possibility. q Extensible to meet the demands for newer policies.

Shivkumar Kalyanaraman 32 Intra-AS and Inter-AS routing inter-AS, intra-AS routing in gateway A.c network layer link layer physical layer a b b a a C A B d Gateways: perform inter-AS routing amongst themselves perform intra-AS routers with other routers in their AS A.c A.a C.b B.a c b c

Shivkumar Kalyanaraman 33 Intra-AS and Inter-AS routing: Example Host h2 a b b a a C A B d c A.a A.c C.b B.a c b Host h1 Intra-AS routing within AS A Inter-AS routing between A and B Intra-AS routing within AS B

Shivkumar Kalyanaraman 34 Basic Dynamic Routing Methods q Source-based: source gets a map of the network, q source finds route, and either q signals the route-setup (eg: ATM approach) q encodes the route into packets (inefficient) q Link state routing: per-link information q Get map of network (in terms of link states) at all nodes and find next-hops locally. q Maps consistent => next-hops consistent q Distance vector: per-node information q At every node, set up distance signposts to destination nodes (a vector) q Setup this by peeking at neighbors’ signposts.

Shivkumar Kalyanaraman 35  Routing vs Forwarding  Forwarding table vs Forwarding in simple topologies  Routers vs Bridges: review  Routing Problem  Telephony vs Internet Routing  Source-based vs Fully distributed Routing  Distance vector vs Link state routing  Bellman Ford and Dijkstra Algorithms  Addressing and Routing: Scalability Where are we?

Shivkumar Kalyanaraman 36 DV & LS: consistency criterion q The subset of a shortest path is also the shortest path between the two intermediate nodes. q Corollary: q If the shortest path from node i to node j, with distance D(i,j) passes through neighbor k, with link cost c(i,k), then: D(i,j) = c(i,k) + D(k,j) i k j c(i,k) D(k,j)

Shivkumar Kalyanaraman 37 Distance Vector DV = Set (vector) of Signposts, one for each destination

Shivkumar Kalyanaraman 38 Distance Vector (DV) Approach Consistency Condition: D(i,j) = c(i,k) + D(k,j) q The DV (Bellman-Ford) algorithm evaluates this recursion iteratively. q In the m th iteration, the consistency criterion holds, assuming that each node sees all nodes and links m- hops (or smaller) away from it (i.e. an m-hop view) A E D CB Example network A E D CB A’s 2-hop view (After 2 nd Iteration) A E B 7 1 A’s 1-hop view (After 1 st iteration)

Shivkumar Kalyanaraman 39 Distance Vector (DV)… q Initial distance values (iteration 1): q D(i,i) = 0 ; q D(i,k) = c(i,k) if k is a neighbor (i.e. k is one-hop away); and q D(i,j) = INFINITY for all other non-neighbors j. q Note that the set of values D(i,*) is a distance vector at node i. q The algorithm also maintains a next-hop value (forwarding table) for every destination j, initialized as: q next-hop(i) = i; q next-hop(k) = k if k is a neighbor, and q next-hop(j) = UNKNOWN if j is a non-neighbor.

Shivkumar Kalyanaraman 40 Distance Vector (DV).. (Cont’d) q After every iteration each node i exchanges its distance vectors D(i,*) with its immediate neighbors. q For any neighbor k, if c(i,k) + D(k,j) < D(i,j), then: q D(i,j) = c(i,k) + D(k,j) q next-hop(j) = k q After each iteration, the consistency criterion is met q After m iterations, each node knows the shortest path possible to any other node which is m hops or less. q I.e. each node has an m-hop view of the network. q The algorithm converges (self-terminating) in O(d) iterations: d is the maximum diameter of the network.

Shivkumar Kalyanaraman 41 Distance Vector (DV) Example q A’s distance vector D(A,*): q After Iteration 1 is: [0, 7, INFINITY, INFINITY, 1] q After Iteration 2 is: [0, 7, 8, 3, 1] q After Iteration 3 is: [0, 7, 5, 3, 1] q After Iteration 4 is: [0, 6, 5, 3, 1] A E D CB Example network A E D CB A’s 2-hop view (After 2 nd Iteration) A E B 7 1 A’s 1-hop view (After 1 st iteration)

Shivkumar Kalyanaraman 42 Distance Vector: link cost changes Link cost changes:  node detects local link cost change  updates distance table  if cost change in least cost path, notify neighbors X Z Y 1 algorithm terminates “good news travels fast” Time 0Iter. 1Iter. 2 DV(Y)[ 4 0 1][ 1 0 1] DV(Z)[ 5 1 0] [ 2 1 0]

Shivkumar Kalyanaraman 43 Distance Vector: link cost changes Link cost changes:  good news travels fast  bad news travels slow - “count to infinity” problem! X Z Y 60 algo goes on! Time 0Iter 1Iter 2Iter 3Iter 4 DV(Y)[ 4 0 1][ 6 0 1] [ 8 0 1] DV(Z)[ 5 1 0] [ 7 1 0] [ 9 1 0]

Shivkumar Kalyanaraman 44 Distance Vector: poisoned reverse  If Z routes through Y to get to X :  Z tells Y its (Z’s) distance to X is infinite (so Y won’t route to X via Z)  At Time 0, DV(Z) as seen by Y is [INF INF 0], not [5 1 0] ! X Z Y 60 algorithm terminates Time 0Iter 1Iter 2Iter 3 DV(Y)[ 4 0 1][ ] [ ] DV(Z)[ 5 1 0] [ ][ 7 1 0]

Shivkumar Kalyanaraman 45 Link State (LS) Approach q The link state (Dijkstra) approach is iterative, but it pivots around destinations j, and their predecessors k = p(j) q Observe that an alternative version of the consistency condition holds for this case: D(i,j) = D(i,k) + c(k,j) q Each node i collects all link states c(*,*) first and runs the complete Dijkstra algorithm locally. i k j c(k,j) D(i,k)

Shivkumar Kalyanaraman 46 Link State (LS) Approach… q After each iteration, the algorithm finds a new destination node j and a shortest path to it. q After m iterations the algorithm has explored paths, which are m hops or smaller from node i. q It has an m-hop view of the network just like the distance-vector approach q The Dijkstra algorithm at node i maintains two sets: q set N that contains nodes to which the shortest paths have been found so far, and q set M that contains all other nodes. q For all nodes k, two values are maintained: q D(i,k): current value of distance from i to k. q p(k): the predecessor node to k on the shortest known path from i

Shivkumar Kalyanaraman 47 Dijkstra: Initialization q Initialization: q D(i,i) = 0 and p(i) = i; q D(i,k) = c(i,k) and p(k) = i if k is a neighbor of I q D(i,k) = INFINITY and p(k) = UNKNOWN if k is not a neighbor of I q Set N = { i }, and next-hop (i) = I q Set M = { j | j is not i} q Initially set N has only the node i and set M has the rest of the nodes. q At the end of the algorithm, the set N contains all the nodes, and set M is empty

Shivkumar Kalyanaraman 48 Dijkstra: Iteration q In each iteration, a new node j is moved from set M into the set N. q Node j has the minimum distance among all current nodes in M, i.e. D(i,j) = min {l  M} D(i,l). q If multiple nodes have the same minimum distance, any one of them is chosen as j. q Next-hop(j) = the neighbor of i on the shortest path q Next-hop(j) = next-hop(p(j)) if p(j) is not i q Next-hop(j) = j if p(j) = i q Now, in addition, the distance values of any neighbor k of j in set M is reset as: q If D(i,k) < D(i,j) + c(j,k), then D(i,k) = D(i,j) + c(j,k), and p(k) = j. q This operation is called “relaxing” the edges of node j.

Shivkumar Kalyanaraman 49 Dijkstra’s algorithm: example Step set N A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity 4,E A E D CB F The shortest-paths spanning tree rooted at A is called an SPF-tree

Shivkumar Kalyanaraman 50 Miscl Issues: Transient Loops q With consistent LSDBs, all nodes compute consistent loop-free paths q Limited by Dijkstra computation overhead, space requirements q Can still have transient loops A B C D Packet from C  A may loop around BDC if B knows about failure and C & D do not X

Shivkumar Kalyanaraman 51 Dijkstra’s algorithm, discussion Algorithm complexity: n nodes  each iteration: need to check all nodes, w, not in N  n*(n+1)/2 comparisons: O(n**2)  more efficient implementations possible: O(nlogn) Oscillations possible:  e.g., link cost = amount of carried traffic A D C B 1 1+e e 0 e A D C B 2+e e 1 A D C B 0 2+e 1+e A D C B 2+e 0 e 0 1+e 1 initially … recompute routing … recompute

Shivkumar Kalyanaraman 52 Misc: How to assign the Cost Metric? q Choice of link cost defines traffic load q Low cost = high probability link belongs to SPT and will attract traffic q Tradeoff: convergence vs load distribution q Avoid oscillations q Achieve good network utilization q Static metrics (weighted hop count) q Does not take traffic load (demand) into account. q Dynamic metrics (cost based upon queue or delay etc) q Highly oscillatory, very hard to dampen (DARPAnet experience) q Quasi-static metric: q Reassign static metrics based upon overall network load (demand matrix), assumed to be quasi-stationary

Shivkumar Kalyanaraman 53 Misc: Incremental SPF Algorithms q Dijkstra algorithm is invoked whenever a new LS update is received. q Most of the time, the change to the SPT is minimal, or even nothing q If the node has visibility to a large number of prefixes, then it may see large number of updates. q Flooding bugs further exacerbate the problem q Solution: incremental SPF algorithms which use knowledge of current map and SPT, and process the delta change with lower computational complexity compared to Dijkstra q Avg case: O(logn) compared to O(nlogn) for Dijkstra q Ref: Alaettinoglu, Jacobson, Yu, “Towards Milli-Second IGP Convergence,” Internet Draft.

Shivkumar Kalyanaraman 54 q Topology information is flooded within the routing domain q Best end-to-end paths are computed locally at each router. q Best end-to-end paths determine next-hops. q Based on minimizing some notion of distance q Works only if policy is shared and uniform q Examples: OSPF, IS-IS q Each router knows little about network topology q Only best next-hops are chosen by each router for each destination network. q Best end-to-end paths result from composition of all next- hop choices q Does not require any notion of distance q Does not require uniform policies at all routers q Examples: RIP, BGP Link StateVectoring Summary: Distributed Routing Techniques

Shivkumar Kalyanaraman 55  Routing vs Forwarding  Forwarding table vs Forwarding in simple topologies  Routers vs Bridges: review  Routing Problem  Telephony vs Internet Routing  Source-based vs Fully distributed Routing  Distance vector vs Link state routing  Bellman Ford and Dijkstra Algorithms  Addressing and Routing: Scalability Where are we?

Shivkumar Kalyanaraman 56 Addressing: Objects q Address is a numerical “name” which refers to an object q There are several types of objects we’d like to refer to at the network layer… q Interface: q A place to which a producer or consumer of packets connects to the network; a network attachment point q Network: q A collection of interfaces which have some useful relationship: q Any interface can send directly to any other without going through a router q A topology aggregate

Shivkumar Kalyanaraman 57 Addressing: Objects q Route or Path: q A path from one place in the network to another q Host: q An actual machine which is the source or destination of traffic, through some interface q Router: q A device which is interconnecting various elements of the network, and forwarding traffic q Node: q A host or router

Shivkumar Kalyanaraman 58 Address Concept q Address: A structured name for a network interface or topology aggregate: q The structure is used by the routing to help it scale q Topologically related items have to be given related addresses q Topologically related addresses also: q Allow the number of destinations tracked by the routing to be minimized q Allow quick location of the named interface on a map q Provide a representation for topology distribution q Provide a framework for the abstraction process q DNS names: q A structured human usable name for a host, etc q The structure facilitates the distribution and lookup

Shivkumar Kalyanaraman 59 Flat vs Structured Addresses q Flat addresses: no structure in them to facilitate scalable routing q Eg: IEEE 802 LAN addresses q Hierarchical addresses: q Network part (prefix) and host part q Helps identify direct or indirectly connected nodes

Shivkumar Kalyanaraman 60 Tradeoffs in Large Scale Routing q Tradeoff: discard detailed routing information vs incur the overhead of large, potentially unneeded detail. q This process is called abstraction. q There are two types of abstraction for routing: q Compression, in which the same routing decision is made in all cases after the abstraction as before q Thinning, in which the routing is affected q If the prior routing was optimal, discarding routing information via thinning means non-optimal routes q Large-scale routing incurs two kinds of overhead cost: q The cost of running the routing q The cost of non-optimal routes q Challenge of routing is managing this choice of costs.

Shivkumar Kalyanaraman 61 Hierarchical Routing Example: PNNI

Shivkumar Kalyanaraman 62 Summary q Routing Concepts q DV and LS algorithms q Addressing and Hierarchy