Distance-Vector and Path-Vector Routing Sections 4.2.2., 4.3.2, 4.3.3 COS 461: Computer Networks Spring 2011 Mike 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

Lecture 8 Overview. Graph abstraction u y x wv z Graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v),
1 LINK STATE PROTOCOLS (contents) Disadvantages of the distance vector protocols Link state protocols Why is a link state protocol better?
Routing - I Important concepts: link state based routing, distance vector based routing.
CIS 235: Networks Fall, 2007 Western State College Computer Networks Fall, 2007 Prof Peterson.
Distance-Vector Routing COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Michael Freedman
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.
Link-State Routing Reading: Sections 4.2 and COS 461: Computer Networks Spring 2011 Mike Freedman
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.
Routing.
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.
Interdomain Routing and the Border Gateway Protocol (BGP) Reading: Section COS 461: Computer Networks Spring 2011 Mike Freedman
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 ON THE INTERNET COSC Aug-15. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
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.
Distance Vector Routing
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.
Network Layer4-1 Routing Algorithm Classification Global or decentralized information? Global: r all routers have complete topology, link cost info r “link.
1 Agenda for Today’s Lecture The rationale for BGP’s design –What is interdomain routing and why do we need it? –Why does BGP look the way it does? How.
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.
Computer Networking Lecture 11: Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)
Distance Vector and Link State Routing Pragyaditya Das.
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.
CS 5565 Network Architecture and Protocols
CSE390 – Advanced Computer Networks
Network Layer Introduction Datagram networks IP: Internet Protocol
Routing: Distance Vector Algorithm
Distance Vector Routing: overview
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 4700 / CS 5700 Network Fundamentals
CS 3700 Networks and Distributed Systems
CS 640: Introduction to Computer Networks
CS 3700 Networks and Distributed Systems
Communication Networks
COS 461: Computer Networks
Network Layer (contd.) Routing
EE 122: Intra-domain routing: Distance Vector
Chapter 4: Network Layer
Presentation transcript:

Distance-Vector and Path-Vector Routing Sections , 4.3.2, COS 461: Computer Networks Spring 2011 Mike Freedman 1

Goals of Today’s Lectures Distance-vector routing – Pro: Less information than link state – Con: Slower convergence Path-vector routing – Faster convergence than distance vector – More flexibility in selecting paths Different goals / metrics if inter- or intra-domain 2

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

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 Shortest-Path Problem 4 u s v(u,v) w(u,w) x y(u,v) z link s(u,w) t Ex) Forwarding table at u

Comparison of Protocols Link State Knowledge of every router’s links (entire graph) Every router has O(# edges) Trust a peer’s info, do routing computation yourself Use Dijkstra’s algorithm Send updates on any link- state changes Ex: OSPF, IS-IS Adv: Fast to react to changes Distance Vector Knowledge of neighbors’ distance to destinations Every router has O (#neighbors * #nodes) Trust a peer’s routing computation Use Bellman-Ford algorithm Send updates periodically or routing decision change Ex: RIP, IGRP Adv: Less info & lower computational overhead 5

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 Node x maintains state: – c(x,v) = cost for direct link from x to neighbor v – Distance vector D x (y) (estimate of least cost x to y) for all nodes y – Distance vector D v (y) for each neighbor v, for all y Node x periodically sends D x to its neighbors v – Neighbors update their own distance vectors: D v (y) ← min x {c(v,x) + D x (y)} for each node y ∊ N Over time, the distance vector D x converges 7

Distance Vector Algorithm 8 Iterative, asynchronous: Each local iteration 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 msg from neighbor) recompute estimates if distance to any destination has changed, notify neighbors Each node:

Distance Vector Example: Step 1 9 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 A A E E F F C C D D B B

Distance Vector Example: Step 2 10 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 A E E F F C C D D B B

Distance Vector Example: Step 3 11 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 A E E F F C C D D B B

Distance Vector: Link Cost Changes 12 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” View of X (about neighbor y and z’s routing tables) Circled entry is least cost

Distance Vector: Link Cost Changes 13 Link cost changes: Good news travels fast Bad news travels slow - “count to infinity” problem! X Z Y 60 algorithm continues on! View of X (about neighbor y and z’s routing tables)

Distance Vector: Poison Reverse 14 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 View of X (about neighbor y and z’s routing tables)

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 15

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) 16

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 intra-domain 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 17

Path-Vector Routing 18

Shortest-Path Routing is Restrictive All traffic must travel on shortest paths All nodes need common notion of link costs Incompatible with commercial relationships 19 Regional ISP1 Regional ISP2 Regional ISP3 Cust1 Cust3 Cust2 National ISP1 National ISP2 YES NO

Link-State Routing is Problematic Topology information is flooded – High bandwidth and storage overhead – Forces nodes to divulge sensitive information Entire path computed locally per node – High processing overhead in a large network Minimizes some notion of total distance – Works only if policy is shared and uniform Typically used only inside an AS – E.g., OSPF and IS-IS 20

Distance Vector is on the Right Track Advantages – Hides details of the network topology – Nodes determine only “next hop” toward the dest Disadvantages – Minimizes some notion of total distance, which is difficult in an interdomain setting – Slow convergence due to the counting-to-infinity problem (“bad news travels slowly”) Idea: extend the notion of a distance vector – To make it easier to detect loops 21

Path-Vector Routing Extension of distance-vector routing – Support flexible routing policies – Avoid count-to-infinity problem Key idea: advertise the entire path – Distance vector: send distance metric per dest d – Path vector: send the entire path for each dest d 22 d “d: path (2,1)” “d: path (1)” data traffic 2 1 3

Faster Loop Detection Node can easily detect a loop – Look for its own node identifier in the path – E.g., node 1 sees itself in the path “3, 2, 1” Node can simply discard paths with loops – E.g., node 1 simply discards the advertisement “d: path (2,1)” “d: path (1)” “d: path (3,2,1)” 3

Flexible Policies Each node can apply local policies – Path selection: Which path to use? – Path export: Which paths to advertise? Examples – Node 2 may prefer the path “2, 3, 1” over “2, 1” – Node 1 may not let node 3 hear the path “1, 2”

Conclusions Distance-vector routing – Pro: Less information and computation than link state – Con: Slower convergence (e.g., count to infinity) Path-vector routing – Share entire path, not distance: faster convergence – More flexibility in selecting paths Different goals / metrics if inter- or intra-domain Next week: BPG (path-vector protocol b/w ASes) 25