1 The Network Layer Introduction  functionality and service models Theory  link state and distance vector algorithms  broadcast algorithms  hierarchical.

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.
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.
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.
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.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
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)
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.
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.
Packet-Switching Networks Routing in Packet Networks.
Link-state routing  each node knows network topology and cost of each link  quasi-centralized: each router periodically broadcasts costs of attached.
Network Layer (part 1) CPSC 363 Computer Networks Ellen Walker Hiram College (Includes figures from Computer Networking by Kurose & Ross, © Addison Wesley.
IP routing. Simple Routing Table svr 4% netstat –r n Routing tables DestinationGatewayFlagsRefcntUseInterface UGH00emd UH10lo0.
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.
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
13 – Routing Algorithms Network Layer.
The Network Layer Introduction  functionality and service models Theory  link state and distance vector algorithms  broadcast algorithms  hierarchical.
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.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
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.
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.
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.
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.
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.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
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.
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
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CPSC 335 Data Communication.
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
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 3700 Networks and Distributed Systems
ECE453 – Introduction to Computer Networks
CS 3700 Networks and Distributed Systems
Chapter 4: Network Layer
ECSE-4730: Computer Communication Networks (CCN)
Network Layer (contd.) Routing
EE 122: Intra-domain routing: Distance Vector
Chapter 4: Network Layer
EE 122: Intra-domain routing: Link State
Presentation transcript:

1 The Network Layer Introduction  functionality and service models Theory  link state and distance vector algorithms  broadcast algorithms  hierarchical routing

2 The Network Layer (cont) Case Study: IP  services  packet formats, addressing  routing protocols: RIP, OSPF, BGP  ICMP  IPV6 Case Study: ATM  services  cell formats  VP's and VC's

3 The Network Layer (cont) Routers and Switches how they work Readings  Tannenbaum: 5.1, 5.2,  Kurose Ross: ch 4

4

5 Network Layer: Introduction Network layer: a network-wide concern  transport layer: between two hosts  data link layer: between two physically connected hosts, routers  network layer: involves each and every router, host, gateway in the network

6 Network Layer Service: Virtual Circuit Virtual: looks like a circuit but isn't  generally associated with connection-oriented service  all packets within connection follow same route

7 At connection establishment time:  connection setup packet flows from sender to receiver  routing tables updated at intermediate nodes to reflect new VC  key issue: per-connection state at router  fits well with QoS guarantees: reserve resources and/or accept/reject call based on resources at this router Analogy: telephone network

8 Network Layer Service: datagrams  no notion of connection in network layer  no routes set up at connection establishment time - each packet in "connection" may follow different path  no guarantee of reliable, or in-order delivery  advantages:  no connection state in routers  robust with respect to link failures  recovery at end-systems (transport level)

9 Burning question: to VC or not to VC? Answer: support both, offering different service models:  best effort service: datagrams  service with performance guarantees: QOS

10

11 The routing function A network-layer packet contains:  transport layer packet (port, seq, ack, data, checksum, etc)  addressing info (e.g., source, dest. address or VC identifier)  other fields (e.g., version, length, time-to-live) Router/switch actions simple on packet receipt:  look up packet identifier (dest. address or VC id) in routing table and forward on appropriate out-going link (or upwards if at destination)

12 Routing Table: issues Key question: how are routing tables determined/updated?  who determines table entries?  what info used in determining table entries?  when do routing table entries change?  where is routing info stored?  how to control table size?  why are routing tables determined a particular way. What is the theoretical basis? Answer these and we are done!

13 Routing issues:  scalability: must be able to support large numbers of hosts, routers, networks  adapt to changes in topology or significant changes in traffic, quickly and efficiently  self-healing: little or not human intervention  route selection may depend on different criteria  performance: "choose route with smallest delay"  policy: "choose a route that doesn't cross a government network" (equivalently: "let no non-government traffic cross this network")

14 Classification of Routing Algorithms Centralized versus decentralized  centralized: central site computes and distributed routes (equivalently: information for computing routes known globally, each router makes same computation)  decentralized: each router sees only local information (itself and physically-connected neighbors) and computes routes on this basis  pros and cons?

15 Classification (cont) Static versus adaptive  static: routing tables change very slowly, often in response to human intervention  dynamic: routing tables change as network traffic or topology change  pros and cons? Two basic approaches adopted in practice:  link-state routing: centralized, dynamic (periodically run)  distance vector: distributed, dynamic (in direct response to changes)

16 Link-state routing  each node knows network topology and cost of each link  quasi-centralized: each router periodically broadcasts costs of attached links  cost may reflect  queueing delay on link  link bandwidth  all links with equal cost: shortest path routes  used in Internet OSPF, ISO IS-IS, DECnet, "new" (1980) ARPAnet routing algorithm Goal: find least cost path from one node (source) to all other nodes  Dijkstra's shortest path algorithm

17 Dijkstra's Shortest Path Algorithm: Definitions Define: c(i,j): cost of link from i-to-j. c(i,j) = infty if i,j not directly connected. We will assume c(i,j) equals c(j,i) but not always true in practice c(i,j): cost of link from i-to-j. c(i,j) = infty if i,j not directly connected. We will assume c(i,j) equals c(j,i) but not always true in practice D(v): cost of currently known least cost path from source, A, to node v. D(v): cost of currently known least cost path from source, A, to node v. p(v): previous node (neighbor of v) along current shortest path from source to v p(v): previous node (neighbor of v) along current shortest path from source to v N: set of nodes whose shortest path from A is definitively known N: set of nodes whose shortest path from A is definitively known Iterative: after k iterations, know paths to k "closest" (path cost) to A

18 Dijkstra's algorithm: Statement Initialization: N = {A} for all nodes v if v adjacent to A then D(v) = c(A,v) if v adjacent to A then D(v) = c(A,v) else D(v) = infty else D(v) = inftyLoop: find w not in N such that D(w) is a minimum add w to N update D(v) for all v not in N: D(v) <- min( D(v), D(w) + c(w,v) ) D(v) <- min( D(v), D(w) + c(w,v) ) /* new cost to v is either old cost to v or known shortest /* new cost to v is either old cost to v or known shortest path cost to w plus cost from w to v */ path cost to w plus cost from w to v */ until all nodes in N

19

20  example: in step 1: D(C) = D(D)+c(D,C)  for each column, last entry gives immediate neighbor on least cost path to/from A, and cost to that node  worst case running time: O(N^2)

21 Distance vector routing Asynchronous, iterative, distributed computation:  much more fun!  at each step:  receive info from neighbor or notice change in local link cost  compute  possibly send new info to adjacent neighbors Computation/communication between network layer entities!

22 Distance table:  per-node table recording cost to all other nodes via each of its neighbors  D E (A,B) gives minimum cost from E to A given that first node on path is B  D E (A,B) = c(E,B) + min D B (A,*)  minD E (A,*) gives E's minimum cost to A  routing table derived from distance table  example: D E (A,B) = 14 (note: not 15!)  example: D E (C,D) = 4, D E (C,A) = 6 BC A E D D E () A B D A A B B C C D D destination cost to dest. via

23 Distance vector algorithm  based on Bellman-Ford algorithm  used in many routing protocols: Internet BGP, ISO IDRP, Novell IPX, original ARPAnet Algorithm (at node X): Initialization: for all adjacent nodes v: D(*,v) = infty D(v,v) = c(X,v) send shortest path cost to each destination to neighbors Loop: execute distributed topology update algorithm forever

24 Update Algorithm at Node X: 1. wait (until I see a link cost change to neighbor Y or until receive update from neighbor W) or until receive update from neighbor W) 2. if (c(X,Y) changes by delta) { /* change my cost to my neighbor Y */ change all column-Y entries in distance table by delta if this changes my least cost path to Z send update wrt Z, D X (Z,*), to all neighbors } 3. if (update received from W wrt Z) { /* shortest path from W to some Z has changed */ D X (Z,W) = c(X,W) + D W (Z,*) } D X (Z,W) = c(X,W) + D W (Z,*) } if this changes my least cost path to Z send update wrt Z, D X (Z,*), to all neighbors

25 Distance Vector Routing: Example X Y Z 2 1 7

26 D X Y Z Y 2 infty Z infty 7 D Y X Z X 2 infty Z infty 1 D Z X Y X 7 infty Y infty 1 D X Y Z Y Z D Y X Z X Z D Z X Y X Y D X Y Z Y Z D Y X Z X Z D Z X Y X Y

27 Distance Vector Routing: Recovery from Link Failure  if link XY fails, set c(X,Y) to infty and run topology update algorithm  example (next page)  good news travels fast, bad news travels slow  looping:  inconsistent routing tables: to get to A, D routes through E, but E routes through D  loops eventually disappear (after enough iterations)  loops result in performance degradation, out-of- order delivery

28 Distance Vector Routing: Example of Recovery

29 Distance Vector Routing: Solving the Looping Problem Count to infinity problem: loops will exist in tables until table values "count up" to cost of alternate route Split Horizon Algorithm:  rule: if A routes traffic to Z via B then A tells B its distance to Z is infinity  example: B will never route its traffic to Z via A  does not solve the count to infinity problem (why)? ABZ

30 More problems: Oscillations A reasonable scenario  cost of link depends on amount of traffic carried  nodes exchange link costs every T  suppose:  A is destination for all traffic  B,D send 1 unit of traffic to A  C sends e units of traffic (e<<1) to A Entire network may "oscillate" Possible solutions:  avoid periodic exchange (randomization)  don't let link costs be increasing functions of load

31 Distance Vector Oscillations

32 Comparison of LS and DV algorithms Message complexity:  "LS is better": DV requires iteration with msg exchange at each iteration  "DV is better": if link changes don't affect shortest cost path, no msg exchange Robustness: what happens if router fails, misbehaves or is sabotaged? LS could :  report incorrect distance to connected neighbors  corrupt/lose any LS broadcast msgs passing through  report incorrect neighbor DV could:  advertise incorrect shortest path costs to any/all destinations (caused ARPAnet crash: "I have zero cost to everyone")

33 Comparison of LS and DV (cont) Speed of convergence DV:  may iterate many times while converging  loops, count-to-infinity, oscillations  cannot propagate new info until recomputes its own routes LS:  requires 1 broadcast per node per recomputation  can suffer from oscillations both have strengths and weakness  one or the other used in almost every network

34 2nd Try (at LS Broadcast Distribution) Each router puts a sequence number on its LSP's  upon receiving LSP(R) from R if (seq # > seq # of stored copy ) of LSP(R) if (seq # > seq # of stored copy ) of LSP(R) then store LSP(R), update LS info for R, and flood LSP(R) then store LSP(R), update LS info for R, and flood LSP(R) else ignore duplicate else ignore duplicate How can this protocol fail?