Chapter 4 Distance Vector Problems, and Link-State Routing Professor Rick Han University of Colorado at Boulder

Slides:



Advertisements
Similar presentations
CSCI-1680 Network Layer: Intra-domain Routing Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

4/12/2015© 2009 Raymond P. Jefferis IIILect Internet Protocol - Continued.
CSE 561 – Bridging and Routing David Wetherall Spring 2000.
Chapter 4 Distributed Bellman-Ford Routing
Courtesy: Nick McKeown, Stanford
Distance-Vector and Path-Vector Routing Sections , 4.3.2, COS 461: Computer Networks Spring 2011 Mike Freedman
1 Comnet 2010 Communication Networks Recitation 6 Routing.
Routing So how does the network layer do its business?
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 22 Introduction to Computer Networks.
Chapter 4 IP Multicast Professor Rick Han University of Colorado at Boulder
15-744: Computer Networking L-5 Intra-Domain Routing.
Chapter 4 IP Routing Professor Rick Han University of Colorado at Boulder
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Link State and Distance Vector Routing Computer Science Division Department of Electrical.
1 ELEN 602 Lecture 19 Routing. 2 Overview Forwarding vs Routing –forwarding: to select an output port based on destination address and routing table –routing:
CSE 461: Distance Vector Routing. Next Topic  Focus  How do we calculate routes for packets?  Routing is a network layer function  Routing Algorithms.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
CSE 461: Link State Routing. Link State Routing  Same assumptions/goals, but different idea than DV:  Tell all routers the topology and have each compute.
Computer Networking Intra-Domain Routing, Part I RIP (Routing Information Protocol)
CS 4700 / CS 5700 Network Fundamentals Lecture 9: Intra Domain Routing Revised 7/30/13.
Routing Protocols and the IP Layer CS244A Review Session 2/01/08 Ben Nham Derived from slides by: Paul Tarjan Martin Casado Ari Greenberg.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
1 Routing Protocols. 2 Distributed Routing Protocols Rtrs exchange control info Use it to calculate forwarding table Two basic types –distance vector.
Intra-Domain Routing D.Anderson, CMU Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)
Review: routing algorithms. –Choose the appropriate paths. –Routing algorithms Flooding Shortest path routing (example). –Dijkstra algorithm. –Bellman-Ford.
CS551: Unicast Routing Christos Papadopoulos (
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
Spring 2008CS 3321 Intradomain Routing Outline Algorithms Scalability.
Packet-Switching Networks Routing in Packet Networks.
Link-state routing  each node knows network topology and cost of each link  quasi-centralized: each router periodically broadcasts costs of attached.
TCOM 515 Lecture 2. Lecture 2 Objectives Dynamic Routing Distance Vector Routing Link State Routing Interior vs Exterior RIP - Routing Information Protocol.
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.
Network Layer4-1 Distance Vector: link cost changes Link cost changes: r node detects local link cost change r updates distance table (line 15) r if cost.
Distance Vector Local Signpost Direction Distance Routing Table For each destination list: Next Node Distance Table Synthesis Neighbors exchange table.
Lecture 17 November 8Intra-domain routing November 13Internet routing 1 November 15Internet routing 2 November 20End-to-end protocols 1 November 22End-to-end.
Spring 2006CS 3321 Intradomain Routing Outline Algorithms Scalability.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
TCOM 515 Lecture 2. Lecture 2 Objectives Dynamic Routing Distance Vectore Routing Link State Routing Interior vs Exterior RIP - Routing Information Protocol.
Interior Gateway Protocols (RIP, OSPF) continued….
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Ch 22. Routing Direct and Indirect Delivery.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
Graph Algorithms Why graph algorithms ? It is not a “graph theory” course! Many problems in networks can be modeled as graph problems. Note that -The topology.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
Lecture 7. Building Forwarding Tables There are several methods Static Method Dynamic Methods Centralized Distributed Distance Vector Link State.
Distance Vector Routing
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
CEN 5501C - Computer Networks - Spring UF/CISE - Newman1 Computer Networks Chapter 12 – Routing Algorithm Concepts.
4. Interconnecting Networks: Routers. © Tallal Elshabrawy 2 Bridges Vs Routers BRIDGES DO WELL IN SMALL (FEW HUNDRED HOSTS) WHILE ROUTERS USED IN LARGE.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 10: Intra-domain routing Slides used with.
Chapter 7 Packet-Switching Networks Shortest Path Routing.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
CS 5565 Network Architecture and Protocols
Centralized vs Distributed Routing
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Routing in Packet Networks Shortest Path Routing
CS 3700 Networks and Distributed Systems
Intradomain Routing Outline Introduction to Routing
Communication Networks NETW 501
CS 3700 Networks and Distributed Systems
Communication Networks
Advanced Computer Networks
Network Layer (contd.) Routing
Communication Networks
Routing Outline Algorithms Scalability Spring 2003 CS 332.
CSE 461: Link State Routing
Presentation transcript:

Chapter 4 Distance Vector Problems, and Link-State Routing Professor Rick Han University of Colorado at Boulder

Prof. Rick Han, University of Colorado at Boulder Announcements Handing back HW #1, TA OH, solutions online later today Homework #2 available on Web site, due Feb. 26 Last week’s lectures are now on Web site Midterm for the week of March 12 Next, Distance vector problems, and link- state routing, …

Prof. Rick Han, University of Colorado at Boulder Recap of Previous Lecture Distributed Bellman-Ford = Distance Vector Bellman-Ford Equation D(i,j) = min {d(i,k) + D(k,j)} for all i<>j k neighbors Bellman-Ford Algorithm [Ford & Fulkerson] D(i,j)[h+1] = min {d(i,k) + D(k,j)[h]} for all i<>j, h=0,1, … k neighbors Distributed Bellman-Ford Algorithm Physically distribute the calculation of D(i,j)[h] to router i only, and Exchange the results of your D(i,j)[h] with neighboring routers at each iteration h

Prof. Rick Han, University of Colorado at Boulder RIP is simple 1.At each step, exchange distance vectors with each neighbor 2.Update distance table with new distance vector, adding one (all link costs are one) 3.Calculate minimum hop path to each destination by looking at minimum in the row A C B Aa Bb Cc Aa Bb Cc DestABC Aa++---a++ Bb++---b++ Cc++---c++ Distance table at B Via Port/Link

Prof. Rick Han, University of Colorado at Boulder Link Failure Causes “Bouncing” Effect A B C B C2 1 destcost X B B via A C1 1 destcost C A via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder B Notices A-B Link Failure A 25 1 B C B notices failure, resets cost via A to infinity in distance table (not shown), & knows cost via C is 26 B C2 1 destcost B B via A C1 26 destcost C C via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder C Sends Dist. Vector to B A 25 1 B C B C2 1 destcost B B via A C1 3 destcost C C via A B1 2 destcost B B via C sends routing update to B

Prof. Rick Han, University of Colorado at Boulder B Updates Distance to A A 25 1 B C Packet sent from C to A bounces between C and B until TTL=0! B C2 1 destcost B B via A C1 3 destcost C C via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder B Sends Dist. Vector to C A 25 1 B C C adds one to B’s advertised distance to A. (Why does C override its stored distance of 2 to A with 4, larger value?) B C2 1 destcost B B via A C1 3 destcost C C via A B1 4 destcost B B via

Prof. Rick Han, University of Colorado at Boulder C Sends Dist. Vector to B A 25 1 B C B adds one to C’s advertised distance to A. (overrides its stored distance of 3 to A with 5, larger value) B C2 1 destcost B B via A C1 5 destcost C C via A B1 4 destcost B B via

Prof. Rick Han, University of Colorado at Boulder Link Failure: Bad News Travels Slowly A 25 1 B C After 20+ exchanges, routing tables look like this: B C25 26 destcost C C via A C1 25 destcost C C via A B1 24 destcost B B via Assume A has advertised its link cost of 25 to C during B C exchanges. C stores this cost in its distance table (not shown)

Prof. Rick Han, University of Colorado at Boulder Bad News Travels Slowly (2) A 25 1 B C C increments B’s update by 1, and chooses 25 via A to A, instead of 26 Via B to A B C25 26 destcost C C via A C1 25 destcost C C via A B1 25 destcost B A via

Prof. Rick Han, University of Colorado at Boulder Bad News Travels Slowly (3) A 25 1 B C After 25 B-C exchanges, finally converge to stable routing B C25 26 destcost C C via A C1 26 destcost C C via A B1 25 destcost B A via

Prof. Rick Han, University of Colorado at Boulder Link Failure Causes “Counting to Infinity” Effect A B C B C2 1 destcost X B B via A C1 1 destcost C A via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder B Notices A-B Link Failure A 25 1 B C B notices failure, resets cost to 26 B C2 1 destcost B B via A C1 26 destcost C C via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder C Sends Dist. Vector to B A 25 1 B C B C2 1 destcost B B via A C1 3 destcost C C via A B1 2 destcost B B via C sends routing update to B

Prof. Rick Han, University of Colorado at Boulder A-C Link Fails A 1 B C C detects link to A has failed, but no change in C’s routing table (why?) A C1 3 destcost C C via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder Now, B and C Count to Infinity A 1 B C A C1 3 destcost C C via A B1 4 destcost B B via

Prof. Rick Han, University of Colorado at Boulder B and C Count to Infinity (2) A 1 B C A C1 5 destcost C C via A B1 4 destcost B B via

Prof. Rick Han, University of Colorado at Boulder Some “Solutions” Split horizon –C does not advertise route to B when it sends its distance vector Poisoned reverse –C advertises route to B with infinite distance in its distance vector Works for two node loops –Does not work for loops with more nodes

Prof. Rick Han, University of Colorado at Boulder B Notices A-B Link Failure A 25 1 B C B notices failure, resets cost to 26 B C2 1 destcost B B via A C1 26 destcost C C via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder Split Horizon A 25 1 B C B C2 1 destcost B B via A C1 26 destcost C C via A B1 2 destcost B B via C sends routing update to B B1 destcost No need to send dest A via B, since B should already know this

Prof. Rick Han, University of Colorado at Boulder Split Horizon With Poisoned Reverse A 25 1 B C B C2 1 destcost B B via A C1 ~ destcost C -- via A B1 2 destcost B B via C sends routing update to B A B1 ~ destcost If lowest cost path is via B, then when updating B send infinite cost

Prof. Rick Han, University of Colorado at Boulder Example Where Split Horizon Fails A When link breaks, C marks D as unreachable and reports that to A and B Suppose A learns it first –A now thinks best path to D is through B – A reports D unreachable to B and a route of cost=3 to C C thinks D is reachable through A at cost 4 and reports that to B B reports a cost 5 to A who reports new cost to C etc... X B C D

Prof. Rick Han, University of Colorado at Boulder Alternative Shortest Path Calc. Compute a shortest path tree Observation: shortest path to nodes further from the root must go through a branch of the shortest path tree closer to the root Strategy: expand outwards, calculating the shortest path tree from the root (B)

Prof. Rick Han, University of Colorado at Boulder Dijkstra’s Shortest Path Algorithm Let N = set of nodes in graph l(i,j) = link cost between i,j (= infinity if not neighbors) SPT = set of nodes in shortest path tree thus far S = source node C(n) = cost of path from S to node n

Prof. Rick Han, University of Colorado at Boulder Dijkstra’s Shortest Path Algorithm (2) Initialize shortest path tree SPT = {S} For each n not in SPT, C(n) = l(s,n) While (SPT<>N) SPT = SPT U {w} such that C(w) is minimum for all w in (N-SPT) For each n in (N-SPT) C(n) = MIN (C(n), C(w) + l(w,n))

Prof. Rick Han, University of Colorado at Boulder Dijkstra’s Shortest Path Algorithm (3) Initialize shortest path tree SPT = {B} For each n not in SPT, C(n) = l(s,n) C(E) = 1, C(A) = 3, C(C) = 4, C(others) = infinity Add closest node to the tree: SPT = SPT U {E} since C(E) is minimum for all w not in SPT. No shorter path to E can ever be found via some other roundabout path. Shortest path tree SPT = {B, E}

Prof. Rick Han, University of Colorado at Boulder Dijkstra’s Shortest Path Algorithm (4) Recalculate C(n) = MIN (C(n), C(E) + l(E,n)) for all nodes n not yet in SPT C(A) = MIN( C(A)=3, 1 + 1) = MIN(3,2) = 2 C(D) = MIN( infinity, 1 + 1) = 2 C(F) = MIN( infinity, 1 + 2) = 3 C(C ) = MIN( 4, 1 + infinity) = 4 Each new node in tree, could create a lower cost path, so redo costs

Prof. Rick Han, University of Colorado at Boulder Dijkstra’s Shortest Path Algorithm (5) Loop again, select node with the lowest cost path: C(A) = 2, C(D) = 2, C(F) = 3, C(C ) = 4 SPT = SPT U {A} = {B, E, A} No shorter path can be found from B to A, regardless of any new nodes added to tree Recalc: C(n) = MIN (C(n), C(A) + l(A,n)) for all n not yet in SPT C(D) = MIN(2, 2+inf) = 2 C(F) = 3, C(C) = 4

Prof. Rick Han, University of Colorado at Boulder Dijkstra’s Shortest Path Algorithm (6) Continue to loop, adding lowest cost node at each step and updating costs SPT crawls outward Remember to store the links in SPT as they are added (each node’s predecessor is stored) Each node has to store the entire topology, or database of link costs

Prof. Rick Han, University of Colorado at Boulder Link-State Routing = Reliable Flooding + Dijkstra SPT Start condition –Each node assumed to know state of links to its neighbors Step 1 –Each node broadcasts its state to all other nodes –Reliable flooding mechanism Step 2 –Each node locally computes shortest paths to all other nodes from global state –Dijkstra’s shortest path tree (SPT) algorithm

Prof. Rick Han, University of Colorado at Boulder Link State Packets (LSPs) Periodically, each node creates a link state packet containing: –Node ID –List of neighbors and link cost –Sequence number Needed to avoid stale information from flood –Time to live (TTL) –Node outputs LSP on all its links

Prof. Rick Han, University of Colorado at Boulder Reliable Flooding of LSPs When node J receives LSP from node K –If LSP is the most recent LSP from K that J has seen so far, J saves it in database and forwards a copy on all links except link LSP was received on –Otherwise, discard LSP How to tell more recent –Use sequence numbers –Same method as sliding window protocols

Prof. Rick Han, University of Colorado at Boulder OSPF – Open Shortest Path First A particular realization of link-state routing, used for intra-domain routing in the Internet Additional support for: –Authentication of routing updates –Support for broadcast networks –Different cost metrics Periodic and event-triggered flooding of LSP routing updates, like RIP