EE 122: Intra-domain routing: Distance Vector

Slides:



Advertisements
Similar presentations
Lecture 9 Overview. Hierarchical Routing scale – with 200 million destinations – can’t store all dests in routing tables! – routing table exchange would.
Advertisements

Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 22 Omar Meqdadi Department of Computer Science and Software Engineering University.
Courtesy: Nick McKeown, Stanford
What is “Routing”? Routing algorithm that part of the network layer responsible for deciding on which output line to transmit an incoming packet Adaptive.
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),
Routing - I Important concepts: link state based routing, distance vector based routing.
Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer The service should be independent of the router.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Link State and Distance Vector Routing Computer Science Division Department of Electrical.
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,
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.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
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.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
1 Chapter 22 Network layer Delivery, Forwarding and Routing (part2)
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
Introduction 1 Lecture 21 Network Layer (Routing Activity) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science &
IP routing. Simple Routing Table svr 4% netstat –r n Routing tables DestinationGatewayFlagsRefcntUseInterface UGH00emd UH10lo0.
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 Algorithm Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then d x (y)
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.
1 Even More Routing EE122 Fall 2012 Scott Shenker Materials with thanks to Jennifer Rexford, Ion Stoica, Vern Paxson.
Distance Vector Routing
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Ch 22. Routing Direct and Indirect Delivery.
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.
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.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Network Layer.
CS 5565 Network Architecture and Protocols
CSE390 – Advanced Computer Networks
Routing Information Protocol (RIP)
ICMP ICMP – Internet Control Message Protocol
COMP 3270 Computer Networks
Network Layer Introduction Datagram networks IP: Internet Protocol
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Distance Vector Routing: overview
Dan LI CS Department, Tsinghua University
Network layer functions
Routing in Packet Networks Shortest Path Routing
Chapter 4 – The Network Layer & Routing
Road Map I. Introduction II. IP Protocols III. Transport Layer
CS 4700 / CS 5700 Network Fundamentals
Routers Routing algorithms
CS 3700 Networks and Distributed Systems
Intradomain Routing Outline Introduction to Routing
CS 640: Introduction to Computer Networks
ECE453 – Introduction to Computer Networks
CS4470 Computer Networking Protocols
CS 3700 Networks and Distributed Systems
COMP/ELEC 429 Introduction to Computer Networks
Chapter 4: Network Layer
Computer Networking Lecture 10: Intra-Domain Routing
Communication Networks
ECSE-4730: Computer Communication Networks (CCN)
Chapter 4: Network Layer
Network Layer (contd.) Routing
Network Layer.
Chapter 4: Network Layer
EE 122: Intra-domain routing: Link State
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Presentation transcript:

EE 122: Intra-domain routing: Distance Vector Computer Science Division Department of Electrical Engineering and Computer Science University of California, Berkeley, Berkeley, CA 94720-1776 September 16, 2004 (* based partially on Kurose & Ross’ slides)

Problem How is a packet transmitted from source to destination in the Internet? Example: how does packet sent by B reaches D Host C Host D Host A Node 1 Node 2 Node 3 Node 5 Host B Host E Node 7 Node 6 Node 4

Forwarding vs. Routing Forwarding: the process by which a router sends an arriving packet to the next router towards final destination Routing: the process by which a router acquires the information to perform packet forwarding (e.g., routing tables)

IP Packet Forwarding Each router maintains a mapping of address prefixes to output ports Upon receiving a packet, a router performs the longest prefix matching on packet’s destination address and forwards it to corresponding output Prefix interface 128.16.120.xxx 1 12.82.xxx.xxx 3 12.82.100.xxx 2 … … 128.16.120.111 12.82.100.101 1 2

Internet Routing Internet organized as a two level hierarchy First level – autonomous systems (AS’s) AS – region of network under a single administrative domain ASes run an intra-domain routing protocols Distance Vector, e.g., Routing Information Protocol (RIP) Link State, e.g., Open Shortest Path First (OSPF) Between ASes runs inter-domain routing protocols, e.g., Border Gateway Routing (BGP) De facto standard today, BGP-4

Example Interior router BGP router AS-1 AS-3 AS-2

Intra-domain Routing Protocols Based on UDP (unreliable datagram delivery) Distance vector Routing Information Protocol (RIP), based on Bellman-Ford Each neighbor periodically exchange reachability information to its neighbors Minimal communication overhead, but it takes long to converge, i.e., in proportion to the maximum path length Link state Open Shortest Path First (OSPF), based on Dijkstra Each network periodically floods immediate reachability information to other routers Fast convergence, but high communication and computation overhead

Routing Goal: determine a “good” path through the network from source to destination Good means usually the shortest path Network modeled as a graph Routers  nodes Link edges Edge cost: delay, congestion level,… A E D C B F 2 1 3 5

Distance Vector Routing Algorithm Iterative: continues until no nodes exchange info Asynchronous: nodes need not exchange info/iterate in lock steps Distributed: each node communicates only with directly-attached neighbors Each router maintains Row for each possible destination Column for each directly-attached neighbor to node Entry in row Y and column Z of node X  best known distance from X to Y, via Z as next hop (remember this !) Note: for simplicity in this lecture examples we show only the shortest distances to each destination

Distance Vector Routing Each node: wait for (change in local link cost or msg from neighbor) recompute distance table if least cost path to any dest has changed, notify neighbors Each local iteration caused by: Local link cost change Message from neighbor: its least cost path change from neighbor to destination Each node notifies neighbors only when its least cost path to any destination changes Neighbors then notify their neighbors if necessary

Distance Vector Algorithm (cont’d) 1 Initialization: 2 for all neighbors V do 3 if V adjacent to A 4 D(A, V) = c(A,V); 5 else 6 D(A, V) = ∞; 7 loop: 8 wait (until A sees a link cost change to neighbor V or until A receives update from neighbor V) 9 if (c(A,V) changes by d) 10 for all destinations Y through V do 11 D(A,Y) = D(A,Y) + d 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else /* update D(A, Y) if there is a shorter path through V */ 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for destination Y) 19 send D(A, Y) to all neighbors 20 forever

Example: Distance Vector Algorithm Node A Node B Dest. Cost NextHop B 2 C 7 D ∞ - Dest. Cost NextHop A 2 C 1 D 3 3 B D 2 1 1 A C 7 Node C Node D 1 Initialization: 2 for all neighbors V do 3 if V adjacent to A 4 D(A, V) = c(A,V); 5 else 6 D(A, V) = ∞; … Dest. Cost NextHop A 7 B 1 D Dest. Cost NextHop A ∞ - B 3 C 1

Example: 1st Iteration (C  A) Node A Node B Dest. Cost NextHop B 2 C 7 D ∞ - Dest. Cost NextHop A 2 C 1 D 3 3 B D 2 1 1 A C 7 (D(C,A), D(C,B), D(C,D)) … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever Node C Node D Dest. Cost NextHop A 7 B 1 D Dest. Cost NextHop A ∞ - B 3 C 1

Example: 1st Iteration (C  A) Node A Node B Dest. Cost NextHop B 2 C 7 D 8 Dest. Cost NextHop A 2 C 1 D 3 3 B D 2 1 1 A C 7 D(A, D) = min(D(A, D), D(A, C) + D(C,D) = min(∞ , 7 + 1) = 8 … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever (D(C,A), D(C,B), D(C,D)) Node C Node D Dest. Cost NextHop A 7 B 1 D Dest. Cost NextHop A ∞ - B 3 C 1

Example: 1st Iteration (C  A) Node A Node B Dest. Cost NextHop B 2 C 7 D 8 Dest. Cost NextHop A 2 C 1 D 3 3 B D 2 1 1 A C 7 … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever Node C Node D Dest. Cost NextHop A 7 B 1 D Dest. Cost NextHop A ∞ - B 3 C 1

Example: 1st Iteration (BA, CA) Node A Node B Dest. Cost NextHop B 2 C 3 D 5 Dest. Cost NextHop A 2 C 1 D 3 3 B D 2 1 1 A C 7 … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever D(A,D) = min(D(A,D), D(A,B) + D(B,D)) = min(8, 2 + 3) = 5 D(A,C) = min(D(A,C), D(A,B) + D(B,C)) = min(7, 2 + 1) = 3 Node C Node D Dest. Cost NextHop A 7 B 1 D Dest. Cost NextHop A ∞ - B 3 C 1

Example: End of 1st Iteration Node A Node B Dest. Cost NextHop B 2 C 3 D 5 Dest. Cost NextHop A 2 C 1 D 3 B D 2 1 1 A C 7 … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever Node C Node D Dest. Cost NextHop A 3 B 1 D Dest. Cost NextHop A 2 B 3 C 1

Example: End of 3nd Iteration Node A Node B Dest. Cost NextHop B 2 C 3 D 4 Dest. Cost NextHop A 2 C 1 D 3 B D 2 1 1 A C 7 … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever Node C Node D Dest. Cost NextHop A 3 B 1 D Dest. Cost NextHop A 4 C B 2 1 Nothing changes  algorithm terminates

Link Cost Changes “good news travels fast” B A C 1 4 1 50 Node B D C N 7 loop: 8 wait (link cost update or update message) 9 if (c(A,V) changes by d) 10 for all destinations Y through V do 11 D(A,Y) = D(A,Y) + d 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for destination Y) 19 send D(A, Y) to all neighbors 20 forever 1 B 4 1 A C 50 Node B D C N A 4 1 B D C N A 1 B D C N A 1 B D C N A 1 B “good news travels fast” Node C D C N A 5 B 1 D C N A 5 B 1 D C N A 2 B 1 D C N A 2 B 1 time Link cost changes here Algorithm terminates

Count-to-Infinity Problem 7 loop: 8 wait (link cost update or update message) 9 if (c(A,V) changes by d) 10 for all destinations Y through V do 11 D(A,Y) = D(A,Y) + d 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for destination Y) 19 send D(A, Y) to all neighbors 20 forever 60 B 4 1 A C 50 Node B D C N A 4 1 B D C N A 6 1 B D C N A 6 1 B D C N A 8 1 B “bad news travels slowly” Node C D C N A 5 B 1 D C N A 5 B 1 D C N A 7 B 1 D C N A 2 B 1 … time Link cost changes here; recall that B also maintains shortest distance to A through C, which is 6. Thus D(B, A) becomes 6 !

Split Horizon Don’t send the routes learned from each neighbor to that neighbor A C 1 4 50 B 60 Node B D C N A 4 1 B D C N A 60 1 B D C N A 60 1 B D C N A 51 1 B D C N A 51 1 B Node C D C N A 5 B 1 D C N A 5 B 1 D C N A 50 B 1 D C N A 50 B 1 D C N A 50 B 1 time Link cost changes here; C won’t sent to B, D(C, A) = 5 since C has learned about this path from B itself. Thus D(B,A) becomes 60. Algorithm terminates

Poison Reverse Stronger version of split horizon: if a node X has learned a route to Y from V, it sends to V, D(X, Y) = ∞  make sure that V won’t use X to reach Y! Does this completely solve the count to infinity problem?

Is “Count To Infinity” Solved? 60 No! Split horizon and poison reverse only work for loops involving two nodes. B 4 1 A C 1 50 2 Node B D D C N D 1 C 8 A N 2 B 5 A 4 A C 1 C D 1 D Exercise: continue… Note: you need also to write C’s routing table Node D D C N A 5 B B 1 B C 2 C time Link cost changes here; in a previous iteration D told B that it can reach A through B with cost 7 (split-horizon is not invoked!) so B concludes that it can reach A through D with cost 8!