Data Communication and Networks Lecture 8 Networks: (Routing) October 23, 2003 Joseph Conron Computer Science Department New York University

Slides:



Advertisements
Similar presentations
Data and Computer Communications
Advertisements

Data Communication and Networks Lecture 11 Internet Routing Algorithms and Protocols December 5, 2002 Joseph Conron Computer Science Department New York.
Routing - I Important concepts: link state based routing, distance vector based routing.
Network Layer-11 CSE401N: Computer Networks Lecture-9 Network Layer & Routing.
1 Dijkstra’s Shortest Path Algorithm Gordon College.
Computer Networks The Data Link / Network Layer Functions: Routing
Introduction to Networking Bin Lin TA March 3 rd, 2005 Recital 6.
Teknik Routing Pertemuan 20 Matakuliah: H0484/Jaringan Komputer Tahun: 2007.
Routing & IP Routing Protocols
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m routing (path selection) m dealing with.
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.
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.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Network Layer (Routing) Shivkumar.
1 EE 122: Shortest Path Routing Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern.
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)
Routing Algorithm March 3 rd, Routing Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links  link cost:
Data Communication and Networks Lecture 5 Networks: (Multiplexing, Circuit Switching, Packet Switching) October 2, 2003 Joseph Conron Computer Science.
4: Network Layer 4a-1 14: Intro to Routing Algorithms Last Modified: 8/8/ :41:16 PM.
Computer Networking Intra-Domain Routing, Part I RIP (Routing Information Protocol)
Data Communications & Computer Networks
Network Layer Goals: understand principles behind network layer services: –routing (path selection) –dealing with scale –how a router works –advanced topics:
1 Week 6 Routing Concepts. 2 Network Layer Functions transport packet from sending to receiving hosts network layer protocols in every host, router path.
Chapter 12 Routing in Switched Networks. Routing in Packet Switched Network  key design issue for (packet) switched networks  select route across network.
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.
4: Network Layer4a-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m routing (path selection) m dealing.
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.
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
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.
Overview of Internet Routing (I) Fall 2004 CS644 Advanced Topics in Networking Sue B. Moon Division of Computer Science Dept. of EECS KAIST.
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.
TELE202 Lecture 6 Routing in WAN 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Packet switching in Wide Area Networks »Source: chapter 10 ¥This Lecture.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Switching, Forwarding and Routing. Network layer functions r transport packet from sending to receiving hosts r network layer protocols in every host,
William Stallings Data and Computer Communications 7th Edition
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,
Teknik Routing Pertemuan 10 Matakuliah: H0524/Jaringan Komputer Tahun: 2009.
Internet and Intranet Protocols and Applications Lecture 9 Internet Routing Algorithms and Protocols March 27, 2002 Joseph Conron Computer Science Department.
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.
4: Network Layer4-1 Chapter 4: Network Layer Last time: r Chapter Goals m Understand network layer principles and Internet implementation r Started routing.
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.
Network Layer.
CS 5565 Network Architecture and Protocols
Routing: Distance Vector Algorithm
Distance Vector Routing: overview
Network layer functions
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.
ECE453 – Introduction to Computer Networks
Chapter 4: Network Layer
ECSE-4730: Computer Communication Networks (CCN)
Network Layer (contd.) Routing
Chapter 4: Network Layer
Network Layer.
Chapter 4: Network Layer
EE 122: Intra-domain routing: Link State
Presentation transcript:

Data Communication and Networks Lecture 8 Networks: (Routing) October 23, 2003 Joseph Conron Computer Science Department New York University

Some Perspective on Routing ….. zWhen we wish to take a long trip by car, we consult a road map. zThe road map shows the possible routes to our destination. zIt might show us the shortest distance, but, it can’t always tell us what we really want to know: yWhat is the fastest route! yWhy is this not always obvious? zQuestion: What’s the difference between you and network packet?

Packets are Dumb, Students are Smart! zWe adapt to traffic conditions as we go. zPackets depend on routers to choose how they get their destination. zRouters have maps just like we do. These are called routing tables. zWhat we want to know is: yHow to these tables get constructed/updated? yHow are routes chosen using these tables?

Network Information Source and Update Timing zRouting decisions usually based on knowledge of network (not always) zDistributed routing yNodes use local knowledge yMay collect info from adjacent nodes yMay collect info from all nodes on a potential route zCentral routing yCollect info from all nodes zUpdate timing yWhen is network info held by nodes updated yFixed - never updated yAdaptive - regular updates

Routing Strategies zFixed zFlooding zRandom zAdaptive

Fixed Routing zSingle permanent route for each source to destination pair zDetermine routes using a least cost algorithm (chapter 12.3) zRoute fixed, at least until a change in network topology

Fixed Routing Tables

Flooding zNo network info required zPacket sent by node to every neighbor zIncoming packets retransmitted on every link except incoming link zEventually a number of copies will arrive at destination zEach packet is uniquely numbered so duplicates can be discarded zNodes can remember packets already forwarded to keep network load in bounds zCan include a hop count in packets

Flooding Example

Properties of Flooding zAll possible routes are tried yVery robust zAt least one packet will have taken minimum hop count route yCan be used to set up virtual circuit zAll nodes are visited yUseful to distribute information (e.g. routing)

Random Routing zNode selects one outgoing path for retransmission of incoming packet zSelection can be random or round robin zCan select outgoing path based on probability calculation zNo network info needed zRoute is typically not least cost nor minimum hop

Adaptive Routing zUsed by almost all packet switching networks zRouting decisions change as conditions on the network change yFailure yCongestion zRequires info about network zDecisions more complex zTradeoff between quality of network info and overhead zReacting too quickly can cause oscillation zToo slowly to be relevant

Adaptive Routing - Advantages zImproved performance zAid congestion control (See chapter 13) zComplex system yMay not realize theoretical benefits

Classification zBased on information sources yLocal (isolated) xRoute to outgoing link with shortest queue xCan include bias for each destination xRarely used - do not make use of easily available info yAdjacent nodes yAll nodes

Isolated Adaptive Routing

ARPANET Routing Strategies(1) zFirst Generation y1969 yDistributed adaptive yEstimated delay as performance criterion yBellman-Ford algorithm (chapter 12.3) yNode exchanges delay vector with neighbors yUpdate routing table based on incoming info yDoesn't consider line speed, just queue length yQueue length not a good measurement of delay yResponds slowly to congestion

ARPANET Routing Strategies(2) zSecond Generation y1979 yUses delay as performance criterion yDelay measured directly yUses Dijkstra’s algorithm (Chapter 12.3) yGood under light and medium loads yUnder heavy loads, little correlation between reported delays and those experienced

ARPANET Routing Strategies(3) zThird Generation y1987 yLink cost calculations changed yMeasure average delay over last 10 seconds yNormalize based on current value and previous results

Static Vs. Dynamic Routing zRoutes are static if they do not change. yRoute table is loaded once at startup and all changes are manual yComputers at the network edge use static routing. zRoutes are dynamic if the routing table information can change over time (without human intervention. yInternet routers use dynamic routing.

Routing Table Example

Dynamic Routing and Routers zTo insure that routers know how to reach all possible destinations, routers exchange information using a routing protocol. zBut, we cannot expect every router to know about every other router. yToo much Internet traffic would be generated. yTables would be huge (10 6 routers) yAlgorithms to choose “best” path would never terminate. z How to handle this?

Autonomous Systems (AS) zRouters are divided into groups known as an autonomous systems (AS). zASs communicate using an Exterior Routing Protocol (Intra-AS Routing) zRouters within an AS communicate using an Interior Routing Protocol (Inter-AS Routing)

Interior and Exterior Routing

Why different Intra and Inter-AS routing ? Policy: zInter-AS: admin wants control over how its traffic routed, who routes through its net. zIntra-AS: single admin, so no policy decisions needed Scale: zhierarchical routing saves table size, reduced update traffic Performance: zIntra-AS: can focus on performance zInter-AS: policy may dominate over performance

Routing Algorithms Graph abstraction for routing algorithms: zgraph nodes are routers zgraph edges are physical links ylink cost: delay, $ cost, or congestion level Goal: determine “good” path (sequence of routers) thru network from source to dest. Routing protocol A E D CB F z“good” path: ytypically means minimum cost path yother def’s possible

Routing Algorithm classification Static or dynamic? zStatic: yroutes change slowly over time zDynamic: yroutes change more quickly xperiodic update xin response to link cost changes

Routing Algorithm classification Global or decentralized? Global: all routers have complete topology, link cost info “link state” algorithms Decentralized: router knows physically-connected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors “distance vector” algorithms

A Link-State Routing Algorithm Dijkstra’s algorithm znet topology, link costs known to all nodes yaccomplished via “link state broadcast” yall nodes have same info zcomputes least cost paths from one node (‘source”) to all other nodes ygives routing table for that node zIterative yafter k iterations, know least cost path to k dest.’s

A Link-State Routing Algorithm Notation: c(i,j): link cost from node i to j. cost infinite if not direct neighbors D(v): current value of cost of path from source to dest. V p(v): predecessor node along path from source to v, that is next v N: set of nodes whose least cost path definitively known

Dijsktra’s Algorithm 1 Initialization: 2 N = {A} 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v) 6 else D(v) = infty 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N: 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N

Dijkstra’s algorithm: example Step start 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

Dijkstra’s algorithm, discussion Algorithm complexity: n nodes zeach iteration: need to check all nodes, w, not in N zn*(n+1)/2 comparisons: O(n**2) zmore efficient implementations possible: O(nlogn) Oscillations possible: ze.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

Distance Vector Routing Algorithm iterative: zcontinues until no nodes exchange info. zself-terminating: no “signal” to stop asynchronous: znodes need not exchange info/iterate in lock step! distributed: zeach node communicates only with directly-attached neighbors Distance Table data structure zeach node has its own zrow for each possible destination zcolumn for each directly-attached neighbor to node zexample: in node X, for dest. Y via neighbor Z: D (Y,Z) X distance from X to Y, via Z as next hop c(X,Z) + min {D (Y,w)} Z w = =

Distance Table: example A E D CB D () A B C D A1764A1764 B D5542D5542 E cost to destination via destination D (C,D) E c(E,D) + min {D (C,w)} D w = = 2+2 = 4 D (A,D) E c(E,D) + min {D (A,w)} D w = = 2+3 = 5 D (A,B) E c(E,B) + min {D (A,w)} B w = = 8+6 = 14 loop!

Distance table gives routing table D () A B C D A1764A1764 B D5542D5542 E cost to destination via destination ABCD ABCD A,1 D,5 D,4 D,2 Outgoing link to use, cost destination Distance table Routing table

Distance Vector Routing: overview Iterative, asynchronous: each local iteration caused by: zlocal link cost change zmessage from neighbor: its least cost path change from neighbor Distributed: zeach node notifies neighbors only when its least cost path to any destination changes yneighbors then notify their neighbors if necessary wait for (change in local link cost of msg from neighbor) recompute distance table if least cost path to any dest has changed, notify neighbors Each node:

Distance Vector Algorithm: 1 Initialization: 2 for all adjacent nodes v: 3 D (*,v) = infty /* the * operator means "for all rows" */ 4 D (v,v) = c(X,v) 5 for all destinations, y 6 send min D (y,w) to each neighbor /* w over all X's neighbors */ X X X w At all nodes, X:

Distance Vector Algorithm (cont.): 8 loop 9 wait (until I see a link cost change to neighbor V 10 or until I receive update from neighbor V) if (c(X,V) changes by d) 13 /* change cost to all dest's via neighbor v by d */ 14 /* note: d could be positive or negative */ 15 for all destinations y: D (y,V) = D (y,V) + d else if (update received from V wrt destination Y) 18 /* shortest path from V to some Y has changed */ 19 /* V has sent a new value for its min DV(Y,w) */ 20 /* call this received new value is "newval" */ 21 for the single destination y: D (Y,V) = c(X,V) + newval if we have a new min D (Y,w)for any destination Y 24 send new value of min D (Y,w) to all neighbors forever w X X X X X w w

Distance Vector Algorithm: example X Z Y

X Z Y D (Y,Z) X c(X,Z) + min {D (Y,w)} w = = 7+1 = 8 Z D (Z,Y) X c(X,Y) + min {D (Z,w)} w = = 2+1 = 3 Y

Distance Vector: link cost changes Link cost changes: znode detects local link cost change zupdates distance table (line 15) zif cost change in least cost path, notify neighbors (lines 23,24) X Z Y 1 algorithm terminates “good news travels fast”

Distance Vector: link cost changes Link cost changes: zgood news travels fast zbad news travels slow - “count to infinity” problem! X Z Y 60 algorithm continues on!

Distance Vector: poisoned reverse If Z routes through Y to get to X : zZ tells Y its (Z’s) distance to X is infinite (so Y won’t route to X via Z) zwill this completely solve count to infinity problem? X Z Y 60 algorithm terminates

Comparison of LS and DV algorithms Message complexity zLS: with n nodes, E links, O(nE) msgs sent each zDV: exchange between neighbors only yconvergence time varies Speed of Convergence zLS: O(n**2) algorithm requires O(nE) msgs ymay have oscillations zDV: convergence time varies ymay be routing loops ycount-to-infinity problem

Comparison of LS and DV algorithms 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 thru network

RIP ( Routing Information Protocol) zDistance vector algorithm zIncluded in BSD-UNIX Distribution in 1982 zDistance metric: # of hops (max = 15 hops) yCan you guess why? zDistance vectors: exchanged every 30 sec via Response Message (also called advertisement) zEach advertisement: route to up to 25 destination nets

OSPF (Open Shortest Path First) z“open”: publicly available zUses Link State algorithm yLS packet dissemination yTopology map at each node yRoute computation using Dijkstra’s algorithm zOSPF advertisement carries one entry per neighbor router zAdvertisements disseminated to entire AS (via flooding)