Distance-Vector Routing COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Michael Freedman

Slides:



Advertisements
Similar presentations
13 –Routing Protocols Network Layer4-1. Network Layer4-2 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd.
Advertisements

Professor Yashar Ganjali Department of Computer Science University of Toronto
Data Communication and Networks Lecture 11 Internet Routing Algorithms and Protocols December 5, 2002 Joseph Conron Computer Science Department New York.
1 LINK STATE PROTOCOLS (contents) Disadvantages of the distance vector protocols Link state protocols Why is a link state protocol better?
Distance-Vector and Path-Vector Routing Sections , 4.3.2, COS 461: Computer Networks Spring 2011 Mike Freedman
Routing - I Important concepts: link state based routing, distance vector based routing.
Network Layer-11 CSE401N: Computer Networks Lecture-9 Network Layer & Routing.
CIS 235: Networks Fall, 2007 Western State College Computer Networks Fall, 2007 Prof Peterson.
Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer The service should be independent of the router.
Data Communication and Networks Lecture 7 Networks: Part 2 Routing Algorithms October 27, 2005.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Link State and Distance Vector Routing Computer Science Division Department of Electrical.
4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side, delivers.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
Computer Networking Lecture 9: Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First) Basically ripped off from.
Distance-Vector and Path-Vector Routing COS 461: Computer Networks Spring 2009 (MW 1:30-2:50 in COS 105) Michael Freedman Teaching Assistants: Wyatt Lloyd.
Announcement r Project 2 extended to 2/20 midnight r Project 3 available this weekend r Homework 3 available today, will put it online.
1 EE 122: Shortest Path Routing Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern.
Lecture 7 Overview. Two Key Network-Layer Functions forwarding: move packets from router’s input to appropriate router output routing: determine route.
4: Network Layer4a-1 14: Intro to Routing Algorithms Last Modified: 7/12/ :17:44 AM.
Announcement r Project 2 Extension ? m Previous grade allocation: Projects 40% –Web client/server7% –TCP stack21% –IP routing12% Midterm 20% Final 20%
Announcement r Project 2 due next week! r Homework 3 available soon, will put it online r Recitation tomorrow on Minet and project 2.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 18.
1 Distance Vector Routing Protocols Dr. Rocky K. C. Chang 14 November 2006.
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.
Distance Vector Routing EE 122, Fall 2013 Sylvia Ratnasamy
CS 640: Introduction to Computer Networks Aditya Akella Lecture 10 - Intra-Domain Routing.
Intra-Domain Routing D.Anderson, CMU Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)
Computer Networking Lecture 10: Intra-Domain Routing
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.
Link-state routing  each node knows network topology and cost of each link  quasi-centralized: each router periodically broadcasts costs of attached.
Network Layer4-1 Chapter 4 Network Layer Part 3: Routing Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March.
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.
13 – Routing Algorithms Network Layer.
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)
The Network Layer & Routing
Routing 2 CS457 Fall 2010.
Overview of Internet Routing (I) Fall 2004 CS644 Advanced Topics in Networking Sue B. Moon Division of Computer Science Dept. of EECS KAIST.
Distance Vector Routing
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.
Routing 1 Network Layer Network Layer goals:  understand principles behind network layer services:  routing (path selection)  how a router works  instantiation.
Introduction 1 Lecture 19 Network Layer (Routing Algorithms) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley Chapter4_3.
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.
Computer Networking Lecture 11: Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Application Layer 2-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
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.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
Network Layer4-1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol.
Routing algorithms. D(v): the cost from the source node to destination that has currently the least cost. p(v): previous node along current least.
Network Layer.
CS 5565 Network Architecture and Protocols
Network Layer Introduction Datagram networks IP: Internet Protocol
Routing: Distance Vector Algorithm
Distance Vector Routing: overview
Chapter 4 – The Network Layer & Routing
Road Map I. Introduction II. IP Protocols III. Transport Layer
Lecture 10 Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CS3516: These slides are generated from.
CS 3700 Networks and Distributed Systems
CS 640: Introduction to Computer Networks
CS 3700 Networks and Distributed Systems
Communication Networks
Chapter 4: Network Layer
Network Layer (contd.) Routing
EE 122: Intra-domain routing: Distance Vector
Chapter 4: Network Layer
Presentation transcript:

Distance-Vector Routing COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Michael Freedman 1

Shortest-Path Routing Path-selection model – Destination-based – Load-insensitive (e.g., static link weights) – Minimum hop count or sum of link weights

Shortest-Path Problem Compute: path costs to all nodes – From a given source u to all other nodes – Cost of the path through each outgoing link – Next hop along the least-cost path to s u s 6

Bellman-Ford Algorithm Define distances at each node x – d x (y) = cost of least-cost path from x to y Update distances based on neighbors – d x (y) = min {c(x,v) + d v (y)} over all neighbors v u v w x y z s t d u (z) = min{c(u,v) + d v (z), c(u,w) + d w (z)}

Distance Vector Algorithm c(x,v) = cost for direct link from x to v – Node x maintains costs of direct links c(x,v) D x (y) = estimate of least cost from x to y – Node x maintains distance vector D x = [D x (y): y є N ] Node x maintains its neighbors’ distance vectors – For each neighbor v, x maintains D v = [D v (y): y є N ] Each node v periodically sends D v to its neighbors – And neighbors update their own distance vectors – D x (y) ← min v {c(x,v) + D v (y)} for each node y ∊ N Over time, the distance vector D x converges 5

Distance Vector Algorithm 6 Iterative, asynchronous: each local iteration caused by: Local link cost change Distance vector update message from neighbor Distributed: Each node notifies neighbors only when its DV changes Neighbors then notify their neighbors if necessary wait for (change in local link cost or message from neighbor) recompute estimates if distance to any destination has changed, notify neighbors Each node:

Distance Vector Example: Step 1 7 A E F C D B Table for A DstCstHop A0A B4B C  – D  – E2E F6F Table for B DstCstHop A4A B0B C  – D3D E  – F1F Table for C DstCstHop A  – B  – C0C D1D E  – F1F Table for D DstCstHop A  – B3B C1C D0D E  – F  – Table for E DstCstHop A2A B  – C  – D  – E0E F3F Table for F DstCstHop A6A B1B C1C D  – E3E F0F Optimum 1-hop paths

Distance Vector Example: Step 2 8 Table for A DstCstHop A0A B4B C7F D7B E2E F5E Table for B DstCstHop A4A B0B C2F D3D E4F F1F Table for C DstCstHop A7F B2F C0C D1D E4F F1F Table for D DstCstHop A7B B3B C1C D0D E  – F2C Table for E DstCstHop A2A B4F C4F D  – E0E F3F Table for F DstCstHop A5B B1B C1C D2C E3E F0F Optimum 2-hop paths A E F C D B

Distance Vector Example: Step 3 9 Table for A DstCstHop A0A B4B C6E D7B E2E F5E Table for B DstCstHop A4A B0B C2F D3D E4F F1F Table for C DstCstHop A6F B2F C0C D1D E4F F1F Table for D DstCstHop A7B B3B C1C D0D E5C F2C Table for E DstCstHop A2A B4F C4F D5F E0E F3F Table for F DstCstHop A5B B1B C1C D2C E3E F0F Optimum 3-hop paths A E F C D B

Distance Vector: Link Cost Changes 10 Link cost changes: Node detects local link cost change Updates the distance table If cost change in least cost path, notify neighbors X Z Y 1 algorithm terminates “good news travels fast”

Distance Vector: Link Cost Changes 11 Link cost changes: Good news travels fast Bad news travels slow - “count to infinity” problem! X Z Y 60 algorithm continues on!

Distance Vector: Poison Reverse 12 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) Still, can have problems when more than 2 routers are involved X Z Y 60 algorithm terminates

Routing Information Protocol (RIP) Distance vector protocol – Nodes send distance vectors every 30 seconds – … or, when an update causes a change in routing Link costs in RIP – All links have cost 1 – Valid distances of 1 through 15 – … with 16 representing infinity – Small “infinity”  smaller “counting to infinity” problem RIP is limited to fairly small networks – E.g., used in the Princeton campus network 13

Comparison of LS and DV Routing Message complexity LS: with n nodes, E links, O(nE) messages sent DV: exchange between neighbors only Speed of Convergence LS: relatively fast DV: convergence time varies – May be routing loops – Count-to-infinity problem Robustness: what happens if router malfunctions? LS: – Node can advertise incorrect link cost – Each node computes only its own table DV: – DV node can advertise incorrect path cost – Each node’s table used by others (error propagates) 14

Similarities of LS and DV Routing Shortest-path routing – Metric-based, using link weights – Routers share a common view of how good a path is As such, commonly used inside an organization – RIP and OSPF are mostly used as intradomain protocols – E.g., Princeton uses RIP, and AT&T uses OSPF But the Internet is a “network of networks” – How to stitch the many networks together? – When networks may not have common goals – … and may not want to share information 15