1 CSE524: Lecture 12 Network layer Functions. 2 Where we’re at… Internet architecture and history Internet protocols in practice Application layer Transport.

Slides:



Advertisements
Similar presentations
Courtesy: Nick McKeown, Stanford
Advertisements

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.
1 Computer Networks Network Layer (Part 1). 2 Last classes Data-link layer –Functions –Specific implementations, devices.
CIS 235: Networks Fall, 2007 Western State College Computer Networks Fall, 2007 Prof Peterson.
Routing & IP Routing Protocols
Distance-Vector Routing COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Michael Freedman
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.
15-744: Computer Networking L-5 Intra-Domain Routing.
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.
15-744: Computer Networking L-5 Intra-Domain Routing.
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.
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)
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)
CS 4700 / CS 5700 Network Fundamentals Lecture 9: Intra Domain Routing Revised 7/30/13.
1 Week 6 Routing Concepts. 2 Network Layer Functions transport packet from sending to receiving hosts network layer protocols in every host, router path.
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.
Link-state routing  each node knows network topology and cost of each link  quasi-centralized: each router periodically broadcasts costs of attached.
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.
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,
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,
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.
4: Network Layer4-1 Chapter 4: Network Layer Last time: r Chapter Goals m Understand network layer principles and Internet implementation r Started routing.
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.
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
Network Layer Introduction Datagram networks IP: Internet Protocol
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Distance Vector Routing: overview
Network layer functions
Chapter 4 – The Network Layer & Routing
14: Intro to Routing Algorithms
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 640: Introduction to Computer Networks
ECE453 – Introduction to Computer Networks
Chapter 4: Network Layer
Computer Networking Lecture 10: Intra-Domain Routing
Communication Networks
ECSE-4730: Computer Communication Networks (CCN)
Network Layer (contd.) Routing
EE 122: Intra-domain routing: Distance Vector
Network Layer.
EE 122: Intra-domain routing: Link State
Presentation transcript:

1 CSE524: Lecture 12 Network layer Functions

2 Where we’re at… Internet architecture and history Internet protocols in practice Application layer Transport layer Network layer –Network-layer functions Addressing, Demux to upper layer, Error detection, Delivery semantics Security, Fragmentation, Quality of service Routing –Algorithms »Link-state (Dijkstra’s SPT) »Distance-vector (Distributed Bellman-Ford) –Hierarchies –Specific network layer protocols (IP) and devices Data-link layer Physical layer

3 Recall Link-state algorithms –Broadcast all link states to each router –Each router performs Dijkstra’s shortest-path tree calculation to generate forwarding tables per- destination Now… –Analyzing link-state algorithms

4 NL: Link State Characteristics Computation overhead –n nodes –each iteration: need to check all nodes, w, not in N n*(n+1)/2 comparisons: O(n**2) more efficient implementations possible: O(n log(n)) Space requirements Bandwidth requirements Stability –Inconsistencies can cause transient loops –Consistent LSDBs required for loop-free paths A B C D Packet from C  A may loop around BDC if B knows about failure and C & D do not X

5 NL: Link-state issues Oscillations possible: e.g., link cost = amount of carried traffic Example: path to A flaps as traffic routed clockwise and counter-clockwise Common problem in load-based link metrics –A. Khanna and J. Zinky, "The Revised ARPANET Routing Metric," in ACM SIGCOMM, 1989, pp 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

6 NL: Distance vector routing algorithms Variants used in –Early ARPAnet –RIP (intra-domain routing protocol) –BGP (inter-domain routing protocol) Distributed next hop computation –“Gossip with immediate neighbors until you find the best route” –Best route is achieved when there are no more changes Unit of information exchange –Vector of distances to destinations

7 NL: Distance vector routing algorithms Exchange known distance information iteratively Example (Bellman 1957) –Start with link table (as with Dijkstra), calculate distance table iteratively –Distance table data structure table of known distances and next hops kept per node row for each possible destination column for each directly-attached neighbor to node example: 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 = = D (Y,*) X Minimum known distance from X to Y = H (Y) X = Next hop node from X to Y

8 NL: 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! H (Y) = X

9 NL: 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 Outgoing link to use, cost destination Distance table Routing table H (Y) X

10 D j (k,*) NL: Bellman algorithm How to calculate best routes? i j k j’ k’ c(i,j) c(i,j’) D j’ (k,*) D i (k,*) For node i while there is a change in D { for all k not neighbor of i { for each j neighbor of i { D i (k,j) = c(i,j) + D j (k,*) if D i (k,j) < D i (k,*) { D i (k,*) = D i (k,j) H i (k) = j }

11 NL: Distributed Bellman-Ford Make Bellman algorithm distributed (Ford-Fulkerson 1962) –Each node i knows part of link table –Iterative Each node sends around and recalculates D[i,*] continues until no nodes exchange info. self-terminating: no “signal” to stop –Asynchronous nodes need not exchange info/iterate in lock step! “triggered updates” –Distributed each node communicates only with directly-attached neighbors

12 NL: Distributed Bellman-Ford overview Iterative, asynchronous: each local iteration caused by: local link cost change message from neighbor: its least cost path change from neighbor Distributed: each node notifies neighbors only when its least cost path to any destination changes –neighbors 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:

13 NL: Distributed Bellman-Ford algorithm 1 Initialization: 2 for all adjacent nodes v: 3 D X (*,v) = infinity /* the * operator means "for all rows" */ 4 D X (v,v) = c(X,v) 5 for all destinations, y 6 send min w D X (y,w) to each neighbor /* w over all X's neighbors */ At all nodes, X:

14 NL: Distributed Bellman-Ford 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 X (y,V) = D X (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 w D V (Y,w) */ 20 /* call this received new value is "newval" */ 21 for the single destination y: D X (Y,V) = c(X,V) + newval if we have a new min w D X (Y,w)for any destination Y 24 send new value of min w D X (Y,w) to all neighbors forever

15 NL: DBF example A B E C D Info at Node A B C D ABC 07~ 701 ~10 ~~ Distance to Node D ~ ~ 2 0 E18~2 1 8 ~ 2 0 E Initial Distance Vectors

16 NL: DBF example Info at Node A B C D ABC 07 ~ 701 ~ 10 ~~ 2 Distance to Node D ~ ~ 2 0 E ~ 2 0 E A B E C D E Receives D’s Routes Updates cost to C

17 NL: DBF example Info at Node A B C D ABC ~10 ~~2 Distance to Node D ~ ~ 2 0 E ~ 2 0 E A B E C D A receives B’s update Updates cost to C, but cost to E unchanged

18 NL: DBF example Info at Node A B C D ABC ~10 ~~2 Distance to Node D 3 ~ 2 0 E ~ 2 0 E A B E C D A receives E’s routes Updates cost to C (new min) and D

19 NL: DBF example Info at Node A B C D ABC Distance to Node D E E A B E C D And so on, until final distances....

20 NL: DBF example dest A B C D ABD Next hop E’s routing table A B E C D

21 NL: DBF (another example) X Z Y See book for explanation of this example

22 NL: DBF (another example) 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

23 Analyzing Distributed Bellman-Ford Continuously send local distance tables of best known routes to all neighbors until your table converges –Computation diffuses until all nodes converge –Will computation converge quickly and deterministically? Not all the time Pathologic cases possible Several algorithms for minimizing such cases

24 NL: DBF (good news example) Link cost changes: node detects local link cost change updates distance table (line 15) if cost change in least cost path, notify neighbors (lines 23,24) fast convergence (see book for details) X Z Y 1 algorithm terminates “good news travels fast”

25 NL: DBF (count-to-infinity example) Link cost changes: good news travels fast bad news travels slow - “count to infinity” problem! alternate route implicitly used link that changed X Z Y 60 algorithm continues on!

26 NL: DBF: (count-to-infinity example) A BC B C2 1 dest cost A C1 1 dest cost A B1 2 dest cost X

27 NL: DBF: (count-to-infinity example) A 25 1 BC B C2 1 dest cost A C1 ~ dest cost A B1 2 dest cost C Sends Routes to B

28 NL: DBF: (count-to-infinity example) A 25 1 BC B C2 1 dest cost A C1 3 dest cost A B1 2 dest cost B Updates Distance to A

29 NL: DBF: (count-to-infinity example) A 25 1 BC B C2 1 dest cost A C1 3 dest cost A B1 4 dest cost B Sends Routes to C

30 NL: DBF: (count-to-infinity example) A 25 1 BC B C2 1 dest cost A C1 5 dest cost A B1 4 dest cost C Sends Routes to B

31 NL: How are loops caused? Observation 1: –B’s metric increases Observation 2: –C picks B as next hop to A –But, the implicit path from C to A includes itself!

32 NL: Solutions to looping Split horizon –Do not advertise route to X to an adjacent neighbor if your route to X goes through that neighbor –If C routes through B to get to A, C does not advertise (C=>A) route to B. Poisoned reverse –Advertise an infinite distance route to X to an adjacent neighbor if your route to X goes through that neighbor –If C routes through B to get to A, C advertises to B that its distance to A is infinity Works for two node loops –Does not work for loops with more nodes

33 NL: Split-horizon with poisoned reverse 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) will this completely solve count to infinity problem? X Z Y 60 algorithm terminates new route to X not involving Y can now select and advertise route to X via Z route to X through Y goes thru Z poison it!

34 NL: Solutions to looping A X B C D

35 NL: Solutions to looping Route poisoning –Advertise infinite cost on a route to everyone (not just next hop) when lowest cost route increases –Gets rid of stale information throughout network –Used in conjunction with Path Holdown Path Holddown –Freeze route for a fixed time Do not switch to an alternate while route poisoning is happening In our example, A and B delay changing and advertising new routes A and B both set route to D to infinity after single step –Configuring holddown delay Delay too large: Slow convergence Delay too small: Count-to-infinity more probable

36 NL: Solutions to looping Path vector –Select loop-free paths –Each route advertisement carries entire path –If a router sees itself in path, it rejects the route –BGP does it this way –Space proportional to diameter of network

37 NL: Solutions to looping Do solutions completely eliminate loops? –No! Transient loops are still possible –Why? Because implicit path information may be stale –See this in BGP convergence Only way to fix this –Ensure that you have up-to-date information by explicitly querying

38 NL: Comparing Link State vs. Distance Vector Network bandwidth –DV send everything you know to your neighbors large messages, transfers only to neighbors –LS send info about your neighbors to everyone small messages, but broadcast globally

39 NL: Link State vs. Distance Vector Convergence speed: –LS faster – don’t need to process LSPs before forwarding single SPT calculation –DV fast with triggered updates count-to-infinity problem Space requirements: –LS maintains entire topology –DV maintains only neighbor state path vector maintains routes proportional to network diameter

40 NL: Link State vs. Distance Vector Robustness: –LS can broadcast incorrect/corrupted LSP Can be made robust since sources are aware of alternate paths within topology –DV can advertise incorrect paths to all destinations Incorrect calculation can spread to entire network

41 NL: DUAL Distributed Update Algorithm –Garcia-Luna-Aceves 1989 –Goal: Avoid transient loops in DV and LS algorithms Similar in flavor to route poisoning and path holddown –2 ideas A path shorter than current path cannot contain a loop Based on diffusing computation (Dijkstra-Scholten 1980) –Wait until computation completes before changing routes in response to a new update –Similar to path-holddown –3 kinds of messages Update, query, reply –2 states for routers Active (queries outstanding), passive

42 NL: DUAL On update if (lower cost) adopt else if (higher cost) { if (from next hop) { if (any path exists < old length from next hop) switch path else freeze route send query to all neighbors except next hop go into active wait for reply from all neighbors update route return to passive } send reply to all querying neighbors }

43 NL: Routing Hierarchies Flat routing doesn’t scale –Each node/router cannot be expected to store routes to every destination (or destination network) –50 million destinations –Route table exchange would swamp network Key observation –Need less information with increasing distance to destination Two radically different approaches for routing –The area hierarchy –The landmark hierarchy Covered in advanced topics at end of course...

44 NL: Areas Divide network into areas –Areas can have nested sub-areas –No path between two sub-areas of an area can exit that area –Within area, each node has routes to every other node –Outside area Each node has routes for other top-level areas only Inter-area packets are routed to nearest appropriate border router Can result in sub-optimal paths Hierarchically address nodes in a network –Sequentially number top-level areas –Sub-areas of area are labeled relative to that area –Nodes are numbered relative to the smallest containing area

45 NL: Network layer functions summary Each networking layer provides varying degrees of functionality including…. –security, delivery semantics, quality of service, demux to upper layer, error detection, fragmentation, addressing, routing Next: IP network layer –IP demux to upper layer –IP error detection –IP delivery semantics –IP security –IP fragmentation –IP quality-of-service –IP addressing –IP routing