1 Computer Networks Network Layer (Part 1). 2 Last classes Data-link layer –Functions –Specific implementations, devices.

Slides:



Advertisements
Similar presentations
Data Communication and Networks Lecture 11 Internet Routing Algorithms and Protocols December 5, 2002 Joseph Conron Computer Science Department New York.
Advertisements

Routing - I Important concepts: link state based routing, distance vector based routing.
Network Layer-11 CSE401N: Computer Networks Lecture-9 Network Layer & Routing.
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.
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 14.
10 - Network Layer. Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving.
Introduction to Networking Bin Lin TA March 3 rd, 2005 Recital 6.
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.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
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,
1 Network Layer: Host-to-Host Communication. 2 Network Layer: Motivation Can we built a global network such as Internet by extending LAN segments using.
4: Network Layer4a-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m routing (path selection) m dealing.
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.
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.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.5 Routing algorithms m Link state m Distance.
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)
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
1 Announcement #1 r Did you all receive homework #1 and #2? r Homework #3 will be available online during the day r Midterm.
Computer Networking Intra-Domain Routing, Part I RIP (Routing Information Protocol)
Network Layer Goals: understand principles behind network layer services: –routing (path selection) –dealing with scale –how a router works –advanced topics:
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.
Introduction to Network Layer. Network Layer: Motivation Can we built a global network such as Internet by extending LAN segments using bridges? –No!
1 CSE524: Lecture 11 Network Layer Functions. 2 Exam.
4: Network Layer4a-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m routing (path selection) m dealing.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 18 Omar Meqdadi Department of Computer Science and Software Engineering University.
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m network layer service models m forwarding.
IP routing. Simple Routing Table svr 4% netstat –r n Routing tables DestinationGatewayFlagsRefcntUseInterface UGH00emd UH10lo0.
7-1 Last time □ Wireless link-layer ♦ Introduction Wireless hosts, base stations, wireless links ♦ Characteristics of wireless links Signal strength, interference,
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Network Layer introduction.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
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.
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.
4: Network Layer4-1 Schedule Today: r Finish Ch3 r Collect 1 st Project r See projects run r Start Ch4 Soon: r HW5 due Monday r Last chance for Qs r First.
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.
1 Computer Networks Lecture 5: Network Layer June 2009.
Routing 1 Network Layer Network Layer goals:  understand principles behind network layer services:  routing (path selection)  how a router works  instantiation.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
Forwarding.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 20 Omar Meqdadi Department of Computer Science and Software Engineering University.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
1 CSE524: Lecture 12 Network layer Functions. 2 Where we’re at… Internet architecture and history Internet protocols in practice Application layer Transport.
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,
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.
@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.
Project 2 r DUE Wed: 02/24 Network Layer4-1. Project 2 r DUE Wed: 02/24 r DUE Mon: 02/29 Network Layer4-2.
4: Network Layer4a-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m routing (path selection) m dealing.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723
Network Layer Goals: Overview:
CS4470 Computer Networking Protocols
Distance Vector Routing: overview
Network layer functions
Chapter 4 – The Network Layer & Routing
Road Map I. Introduction II. IP Protocols III. Transport Layer
ECE453 – Introduction to Computer Networks
Chapter 4: Network Layer
ECSE-4730: Computer Communication Networks (CCN)
Chapter 4: Network Layer
Chapter 4: Network Layer
Presentation transcript:

1 Computer Networks Network Layer (Part 1)

2 Last classes Data-link layer –Functions –Specific implementations, devices

3 Next classes Network layer –Functions Addressing Security Fragmentation Delivery semantics Quality of service Routing Demux to upper layer Error detection –Specific implementations IP Router devices, implementations

4 Network layer functions Transport packet from sending to receiving hosts Network layer protocols in every host, router Important functions: –Addressing: address assignment –Security: provide privacy, authentication, etc. at the network layer –Fragmentation: break-up packets based on data-link layer properties –Delivery semantics: unicast, multicast, anycast, broadcast, ordering –Quality-of-service: provide predictable performance –Routing: path selection and packet forwarding network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical application transport network data link physical

5 NL: Addressing Hierarchical vs. flat –Routing table size Global vs. local –Applications (NAT) –Processing speed Variable-length vs. fixed-length –Flexibility –Processing costs –Header size

6 NL: Security Secrecy –No eavesdropping Integrity –No man-in-the-middle attacks Authenticity –Ensure identity of source If time permits, we will look at network security at the end of course…..

7 NL: Fragmentation Different link-layers have different MTUs Split packets into multiple fragments Where to do reassembly? –End nodes – avoids unnecessary work –Dangerous to do at intermediate nodes Buffer space Must assume single path through network May be re-fragmented later on in the route again Path MTU Discovery –Network layer does no fragmentation –Host does Path MTU discovery

8 NL: Fragmentation is Harmful Uses resources poorly –Forwarding costs per packet –Best if we can send large chunks of data –Worst case: packet just bigger than MTU Poor end-to-end performance –Loss of a fragment Reassembly is hard –Buffering constraints

9 NL: Fragmentation References –Characteristics of Fragmented IP Traffic on Internet Links. Colleen Shannon, David Moore, and k claffy -- CAIDA, UC San Diego. ACM SIGCOMM Internet Measurement Workshop program.htmlCharacteristics of Fragmented IP Traffic on Internet Linkshttp:// program.html –C. A. Kent and J. C. Mogul, "Fragmentation considered harmful," in Proceedings of the ACM Workshop on Frontiers in Computer Communications Technology, pp , Aug

10 NL: Delivery semantics Communication modes –Unicast (One source to one destination) –Anycast (One source to any of a set of destinations) –Multicast (One or more sources to a set of destinations) –Broadcast (One source to all destinations) Ordering –In-order vs. out-of-order delivery If time permits, we will look at multicast at the end of the course.

11 NL: Quality-of-Service Q: What service model for “channel” transporting packets from sender to receiver? guaranteed bandwidth? preservation of inter-packet timing (no jitter)? loss-free delivery? in-order delivery? congestion feedback to sender? ? ? ? virtual circuit or datagram? The most important abstraction provided by network layer: service abstraction

12 NL: Virtual circuits call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host OD) every router on source-dest path s maintain “state” for each passing connection –transport-layer connection only involved two end systems link, router resources (bandwidth, buffers) may be allocated to VC –to get circuit-like perf. “source-to-dest path behaves much like telephone circuit” –performance-wise –network actions along source-to-dest path

13 NL: Virtual circuits: signaling protocols used to setup, maintain teardown VC used in ATM, frame-relay, X.25 not used in today’s Internet on an end-to-end basis application transport network data link physical application transport network data link physical 1. Initiate call 2. incoming call 3. Accept call 4. Call connected 5. Data flow begins 6. Receive data

14 NL: Datagram networks: the Internet model no call setup at network layer routers: no state about end-to-end connections –no network-level concept of “connection” packets typically routed using destination host ID –packets between same source-dest pair may take different paths application transport network data link physical application transport network data link physical 1. Send data 2. Receive data

15 NL: Network layer service models: Network Architecture Internet ATM Service Model best effort CBR VBR ABR UBR Bandwidth none constant rate guaranteed rate guaranteed minimum none Loss no yes no Order no yes Timing no yes no Congestion feedback no (inferred via loss) no congestion no congestion yes no Guarantees ? Internet model being extended: Intserv, Diffserv –Chapter 6

16 NL: Datagram or VC network: why? Internet data exchange among computers –“elastic” service, no strict timing req. “smart” end systems (computers) –can adapt, perform control, error recovery –simple inside network, complexity at “edge” many link types –different characteristics –uniform service difficult ATM evolved from telephony human conversation: –strict timing, reliability requirements –need for guaranteed service “dumb” end systems –telephones –complexity inside network

17 NL: Routing Routing algorithms and architectures –Link state algorithms –Distance vector algorithms Routing hierarchies –Area routing –Landmark routing

18 NL: Routing algorithms Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links –link 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 “good” path: –typically means minimum cost path –other def’s possible

19 NL: Routing algorithms Global or decentralized information? 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 Static or dynamic? Static: routes change slowly over time Dynamic: routes change more quickly –periodic update –in response to link cost changes

20 NL: What to look for in routing algorithms Communication costs Processing costs Optimality Stability –Convergence time –Loop freedom –Oscillation damping

21 NL: Link state routing algorithms Used in OSPF (intra-domain routing protocol) Basic steps Start condition –Each node assumed to know state of links to its neighbors Step 1 –Each node broadcasts its state to all other nodes –Reliable flooding mechanism Step 2 –Each node locally computes shortest paths to all other nodes from global state –Dijkstra’s shortest path tree (SPT) algorithm

22 NL: Step 1 Link State Packets (LSPs) to broadcast state to all nodes Periodically, each node creates a link state packet containing: –Node ID –List of neighbors and link cost –Sequence number –Time to live (TTL) –Node outputs LSP on all its links

23 NL: Step 1 Reliable Flooding –When node J receives LSP from node K If LSP is the most recent LSP from K that J has seen so far, J saves it in database and forwards a copy on all links except link LSP was received on Otherwise, discard LSP –How to tell more recent Use sequence numbers Same method as sliding window protocols Needed to avoid stale information from flood Sequence number wrap-around Lollipop sequence space

24 NL: Step 1 and wrapped sequence numbers Wrapped sequence numbers –0-N where N is large –If difference between numbers is large, assume a wrap –A is older than B if…. A < B and |A-B| < N/2 or… A > B and |A-B| > N/2 What about new nodes out of sync with sequence number space? Lollipop sequence (Perlman 1983)

25 NL: Step 1 and lollipop sequence numbers Divide sequence number space Special negative sequence for recovering from reboot When receiving an old number, nodes inform new node of current sequence number A older than B if –A < 0 and A < B –A > 0, A < B and (B – A) < N/4 –A > 0, A > B and (A – B) > N/4 0 -N/2 N/2 - 1

26 NL: Step 2 Dijkstra’s algorithm all link costs on the network are known all nodes have same info computes least cost paths from one node (‘source”) to all other nodes –gives routing table for that node iterative: after k iterations, know least cost path to k destinations 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 A Link-state routing algorithm

27 NL: Step 2 (Dijkstra’s algorithm example) 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) = infinity 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

28 NL: Step 2 (Dijkstra’s algorithm example) AF B DE C B CDEF

29 NL: Step 2 (Dijkstra’s algorithm example) AF B DE C B CDEF

30 NL: Step 2 (Dijkstra’s algorithm example) AF B DE C B CDEF

31 NL: Step 2 (Dijkstra’s algorithm example) AF B DE C B CDEF

32 NL: Step 2 (Dijkstra’s algorithm example) AF B DE C B CDEF

33 NL: Step 2 (Dijkstra’s algorithm example) AF B DE C B CDEF

34 NL: Link State Characteristics With consistent LSDBs, all nodes compute consistent loop-free paths Limited by Dijkstra computation overhead, space requirements Can still have transient loops A B C D Packet from C  A may loop around BDC if B knows about failure and C & D do not X

35 NL: Dijkstra’s algorithm, discussion Algorithm complexity: 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(nlogn) Oscillations possible: e.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

36 NL: Distance vector routing algorithms Variants used in –Early ARPAnet –RIP (intra-domain routing protocol) –BGP (inter-domain routing protocol) Distributed next hop computation Unit of information exchange –Vector of distances to destinations

37 NL: Distance vector routing algorithms Exchange known distance information iteratively Example (Bellman 1957) –Start with link table (as with Dijkstra), calculate distance table iteratively through table exchanges with adjacent nodes –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

38 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

39 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

40 D j (k,*) NL: Bellman algorithm ij k j’ k’ c(i,j) c(i,j’) 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 } D j’ (k,*) D i (k,*)

41 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

42 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:

43 NL: Distributed Bellman-Ford algorithm 1 Initialization: 2 for all adjacent nodes v: 3 D (*,v) = infinity /* 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:

44 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 (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 D V (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

45 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

46 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

47 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; Updates Cost

48 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 Costs

49 NL: DBF example Info at Node A B C D ABC Distance to Node D E E A B E C D Final Distances

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

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

52 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

53 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) See book for explanation of this example X Z Y 1 algorithm terminates “good news travels fast”