Chapter 4: Network Layer

Similar documents
Chapter 4: Network Layer

Announcement. Project 2 extended to 2/20 midnight Project 3 available this weekend Homework 3 available today, will put it online

Network service model. Network service model. Network Layer (part 1) Virtual circuits. By the end of this lecture, you should be able to.

EE 122: Intra-domain routing

What s a protocol? CE80N Introduction to Networks & The Internet. Communication Protocol. Protocol Layers. Dr. Chane L. Fullmer UCSC Winter 2002

Network Routing. Packet Routing, Routing Algorithms, Routers, Router Architecture

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

Initialization: Loop until all nodes in N

CS 457 Networking and the Internet. Shortest-Path Problem. Dijkstra s Shortest-Path Algorithm 9/29/16. Fall 2016

Routing Algorithm Classification. A Link-State Routing Algorithm

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Chapter 4: Network Layer

Internet Architecture. Network Layer Overview. Fundamental Network Layer Function. Protocol Layering and Data. Computer Networks 9/23/2009

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat no true in practice. administrative autonomy

DATA COMMUNICATOIN NETWORKING

CSC 4900 Computer Networks: Routing Algorithms

Network layer. Network Layer 4-1. application transport network data link physical. network data link physical. network data link physical

Network Layer: Internet Protocol

Chapter 4 Network Layer. Network Layer 4-1

Network layer functions

Shortest Paths Algorithms and the Internet: The Distributed Bellman Ford Lecturer: Prof. Chiara Petrioli

Chapter 4: Network Layer, partb

Routing. 9: Intro to Routing Algorithms. Routing. Roadmap. Routing Algorithm classification: Static or Dynamic?

CSCE 463/612 Networks and Distributed Processing Spring 2018

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 12

Network Layer: Routing. Routing. Routing protocol. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links

COMP/ELEC 429/556 Introduction to Computer Networks

Lecture 5 The Network Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CSC 401 Data and Computer Communications Networks

What is Routing? EE 122: Shortest Path Routing. Example. Internet Routing. Ion Stoica TAs: Junda Liu, DK Moon, David Zats

Data Communication & Networks G Session 7 - Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

Foundations of Telematics

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

COMP 3331/9331: Computer Networks and Applications

CMSC 332 Computer Networks Network Layer

Chapter 4 Network Layer

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

More on Network Routing and Internet Protocol

Lecture 4 - Network Layer. Transport Layer. Outline. Introduction. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

Interplay between routing, forwarding

Chapter 4: network layer

Chapter 4: Network Layer. TDTS06 Computer networks. Subnets. Subnets. Subnets. IP Addressing: introduction

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 14

Lecture 7. Network Layer. Network Layer 1-1

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 13

Network layer: Overview. Network layer functions Routing IP Forwarding

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access

Network layer: Overview. Network layer functions Routing IP Forwarding

HW3 and Quiz. P14, P24, P26, P27, P28, P31, P37, P43, P46, P55, due at 3:00pm with both soft and hard copies, 11/11/2013 (Monday) TCP), 20 mins

UNIT III THE NETWORK LAYER

Network Layer: Routing

Chapter 5 Network Layer: The Control Plane

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2017

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

Network layer overview

Agenda. distance-vector (what you invented last Friday) hierarchical routing routing in the Internet. v DNS assignment Q&A v Routing Algorithms

CSE 3214: Computer Network Protocols and Applications Network Layer

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

Master Course Computer Networks IN2097

Chapter 4 Network Layer

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Chapter 4 Network Layer

Chapter 4. Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, sl April 2009.

Review: Routing in Packet Networks Shortest Path Algorithms: Dijkstra s & Bellman-Ford. Routing: Issues

CMPE 80N: Introduction to Networking and the Internet. Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 20

Computer Networking Introduction

Internet rou)ng. V. Arun CS491G: Computer Networking Lab University of MassachuseFs Amherst

Chapter IV: Network Layer

Lecture 9. Network Layer (cont d) Network Layer 1-1

Announcements. CS 5565 Network Architecture and Protocols. Count-To-Infinity. Poisoned Reverse. Distance Vector: Link Cost Changes.

Computer Networking. Intra-Domain Routing. RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)

Chapter 4: Network Layer

Network layer functions. Chapter 4 Network Layer. Network layer functions. Network layer functions

Network layer: Overview. Network Layer Functions

Computer Networking. Rou1ng Algorithms. Rou1ng Algorithms. Interplay between rou1ng, forwarding. routing algorithm

Chapter 4: Network Layer

Course on Computer Communication and Networks. Lecture 7 Network Layer, Chapter 4 (6/e) - Part B (7/e Ch5)

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network layer. Chapter goals:

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

CSCE 463/612 Networks and Distributed Processing Spring 2018

Telematics I. Chapter 7 Network Layer

Computer Networks. Instructor: Niklas Carlsson

Lecture 4. The Network Layer (cont d)

Routing. Jens A Andersson Communication Systems

Computer Networks. Instructor: Niklas Carlsson

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 11

Module 3 Network Layer CS755! 3-1!

WANs and Long Distance Connectivity. Introduction

Δίκτυα Υπολογιστών ΙΙ. Κώστας Μαγκούτης Επίκουρος Καθηγητής Τμήμα Μηχανικών Η/Υ και Πληροφορικής Πανεπιστήμιο Ιωαννίνων

CSCE 463/612 Networks and Distributed Processing Spring 2017

Chapter IV: Network Layer

Router Architecture Overview

55:134/22C:134 Summer, Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4 roadmap. Jon Kuhl. Network layer functions

Lecture 17: Network Layer Addressing, Control Plane, and Routing

How to deal with large numbers (millions) of entities in a system? IP devices in the internet (0.5 billion) Users in P2P network (millions)

Routing Unicast routing protocols

Transcription:

hapter 4: Network Layer hapter goals: understand principles behind layer services: routing (path selection) dealing with scale how a router works advanced topics: IPv6, multicast instantiation and implementation in the Internet Overview: layer services routing principle: path selection hierarchical routing IP Internet routing protocols reliable transfer intra-domain inter-domain what s inside a router? IPv6 multicast routing 4: Network Layer 4a- Network layer functions transport packet from sending to receiving hosts layer protocols in every host, router application transport three important functions: path determination: route taken by packets from source to dest. Routing algorithms switching: move packets from router s input to appropriate router output call setup: some architectures require router call setup along path before data flows application transport 4: Network Layer 4a-

Network service model service abstraction 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? The most important abstraction provided by layer:??? virtual circuit or datagram? 4: Network Layer 4a-3 Virtual circuits source-to-dest path behaves much like telephone circuit performance-wise actions along source-to-dest path call setup, teardown for each call before data can flow each packet carries V 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 V to get circuit-like perf. 4: Network Layer 4a-4

Virtual circuits: signaling protocols used to setup, maintain teardown V used in TM, frame-relay,.5 not used in today s Internet application transport 5. Data flow begins 6. Receive data 4. all connected 3. ccept call. Initiate call. incoming call application transport 4: Network Layer 4a-5 Datagram s: the Internet model no call setup at layer routers: no state about end-to-end connections no -level concept of connection packets typically routed using destination host ID packets between same source-dest pair may take different paths application transport. Send data. Receive data application transport 4: Network Layer 4a-6

Network layer service models: Network rchitecture Service Model andwidth Guarantees? Loss Order Timing ongestion feedback Internet TM TM TM TM best effort R VR R UR none constant rate guaranteed rate guaranteed minimum none no yes yes no no no yes yes yes yes no yes yes no no no (inferred via loss) no congestion no congestion yes no Internet model being extented: Intserv, Diffserv hapter 6 4: Network Layer 4a-7 Datagram or V : why? Internet data exchange among computers elastic service, no strict timing req. smart end systems (computers) can adapt, perform control, error recovery simple inside, complexity at edge many link types different characteristics uniform service difficult TM evolved from telephony human conversation: strict timing, reliability requirements need for guaranteed service dumb end systems telephones complexity inside 4: Network Layer 4a-8

Routing Routing protocol Goal: determine good path (sequence of routers) thru from source to dest. Graph abstraction for routing algorithms: graph nodes are routers graph edges are links link cost: delay, $ cost, or congestion level 5 D 3 3 good path: E 5 F typically means minimum cost path other def s possible 4: Network Layer 4a-9 Routing lgorithm classification Global or decentralized information? Global: all routers have complete topology, link cost info link state algorithms Decentralized: router knows lyconnected 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 4: Network Layer 4a-0

Link-State Routing lgorithm Dijkstra s algorithm net topology, link costs known to all nodes accomplished via link state broadcast 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 dest. s 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 4: Network Layer 4a- Dijsktra s lgorithm Initialization: N = {} 3 for all nodes v 4 if v adjacent to 5 then D(v) = c(,v) 6 else D(v) = infty 7 8 Loop 9 find w not in N such that D(w) is a minimum 0 add w to N update D(v) for all v adjacent to w and not in N: D(v) = min( D(v), D(w) + c(w,v) ) 3 /* new cost to v is either old cost to v or known 4 shortest path cost to w plus cost from w to v */ 5 until all nodes in N 4: Network Layer 4a-

Dijkstra s algorithm: example Step 0 3 4 5 start N D DE DE DE DEF D(),p(),,, D(),p() 5, 4,D 3,E 3,E D(D),p(D), D(E),p(E) infinity,d D(F),p(F) infinity infinity 4,E 4,E 4,E 5 D 3 3 E 5 F 4: Network Layer 4a-3 Dijkstra s algorithm, discussion lgorithm complexity: n nodes each iteration: need to check all nodes, w, not in N n*(n+)/ comparisons: O(n**) more efficient implementations possible: O(nlogn) Oscillations possible: e.g., link cost = amount of carried traffic +e D 0 0 0 e e initially +e 0 D 0 +e 0 recompute routing 0 +e D 0 0 +e recompute +e 0 D 0 +e e recompute 4: Network Layer 4a-4

Distance Vector Routing lgorithm iterative: continues until no nodes exchange info. self-terminating: no signal to stop asynchronous: nodes need not exchange info/iterate in lock step! distributed: each node communicates only with directly-attached neighbors Distance Table data structure each node has its own row for each possible destination column for each directlyattached neighbor to node example: in node, for dest. Y via neighbor Z: D (Y,Z) = = distance from to Y, via Z as next hop Z c(,z) + min {D (Y,w)} w 4: Network Layer 4a-5 Distance Table: example 7 E D (,D) E D (,D) E D (,) E 8 D D = c(e,d) + min {D (,w)} w = + = 4 D = c(e,d) + min {D (,w)} w = +3 = 5 loop! = c(e,) + min {D (,w)} w = 8+6 = 4 loop! destination E D () D cost to destination via 7 6 4 4 8 9 D 5 5 4 4: Network Layer 4a-6

Distance table gives routing table E D () cost to destination via D Outgoing link to use, cost 4 5, destination 7 6 8 9 5 4 destination D,5 D,4 D 4 D D,4 Distance table Routing table 4: Network Layer 4a-7 Distance Vector Routing: 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 Each node: 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 4: Network Layer 4a-8

Distance Vector lgorithm: t all nodes, : Initialization: for all adjacent nodes v: 3 D (*,v) = infty /* the * operator means "for all rows" */ 4 D (v,v) = c(,v) 5 for all destinations, y 6 send min D (y,w) to each neighbor /* w over all 's neighbors */ w 4: Network Layer 4a-9 Distance Vector lgorithm (cont.): 8 loop 9 wait (until I see a link cost change to neighbor V 0 or until I receive update from neighbor V) if (c(,v) changes by d) 3 /* change cost to all dest's via neighbor v by d */ 4 /* note: d could be positive or negative */ 5 for all destinations y: D (y,v) = D (y,v) + d 6 7 else if (update received from V wrt destination Y) 8 /* shortest path from V to some Y has changed */ 9 /* V has sent a new value for its min wdv(y,w) */ 0 /* call this received new value is "newval" */ for the single destination y: D (Y,V) = c(,v) + newval 3 if we have a new min w D (Y,w)for any destination Y 4 send new value of min D (Y,w) to all neighbors w 5 6 forever 4: Network Layer 4a-0

Distance Vector lgorithm: example Y 7 Z 4: Network Layer 4a- Distance Vector lgorithm: example Y 7 Z Z D (Y,Z) = c(,z) + min {D (Y,w)} w = 7+ = 8 Y D (Z,Y) = c(,y) + min {D (Z,w)} w = + = 3 4: Network Layer 4a-

Distance Vector: link cost changes Link cost changes: node detects local link cost change updates distance table (line 5) if cost change in least cost path, notify neighbors (lines 3,4) 4 Y 50 Z good news travels fast algorithm terminates 4: Network Layer 4a-3 Distance Vector: link cost changes Link cost changes: good news travels fast bad news travels slow - count to infinity problem! 60 4 Y 50 Z algorithm continues on! 4: Network Layer 4a-4

Distance Vector: poisoned reverse If Z routes through Y to get to : Z tells Y its (Z s) distance to is infinite (so Y won t route to via Z) will this completely solve count to infinity problem? 60 4 Y 50 Z algorithm terminates 4: Network Layer 4a-5 omparison of LS and DV algorithms Message complexity LS: with n nodes, E links, O(nE) msgs sent each DV: exchange between neighbors only convergence time varies Speed of onvergence LS: O(n**) algorithm requires O(nE) msgs may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem 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 propagate thru 4: Network Layer 4a-6

Hierarchical Routing Our routing study thus far - idealization all routers identical flat nottrue in practice scale: with 50 million destinations: can t store all dest s in routing tables! routing table exchange would swamp links! administrative autonomy internet = of s each admin may want to control routing in its own 4: Network Layer 4a-7 Hierarchical Routing aggregate routers into regions, autonomous systems (S) routers in same S run same routing protocol intra-s routing protocol routers in different S can run different intra- S routing protocol gateway routers special routers in S run intra-s routing protocol with all other routers in S also responsible for routing to destinations outside S run inter-s routing protocol with other gateway routers 4: Network Layer 4a-8

Intra-S and Inter-S routing a.b b d.a a b.c c.a a c Gateways: perform inter-s routing amongst themselves b perform intra-s routers with other routers in their S inter-s, intra-s routing in gateway.c layer link layer layer 4: Network Layer 4a-9 Intra-S and Inter-S routing a Host h.b b.a Inter-S routing between and.c a d b c Intra-S routing within S.a Host c h a b Intra-S routing within S We ll examine specific inter-s and intra-s Internet routing protocols shortly 4: Network Layer 4a-30

The Internet Network layer Host, router layer functions: Transport layer: TP, UDP Network layer Routing protocols path selection RIP, OSPF, GP routing table IP protocol addressing conventions datagram format packet handling conventions IMP protocol error reporting router signaling Link layer layer 4: Network Layer 4a-3 IP ddressing: introduction IP address: 3-bit identifier for host, router interface interface: connection between host, router and link router s typically have multiple interfaces host may have multiple interfaces IP addresses associated with interface, not host, router 3... 3... 3... 3...4 3...9 3...3 3..3. 3..3.7 3... 3..3. 3... = 0 0000000 0000000 0000000 3 4: Network Layer 4a-3

IP ddressing IP address: part (high order bits) host part (low order bits) What s a? (from IP address perspective) device interfaces with same part of IP address can ly reach each other without intervening router 3... 3... 3... 3...4 3...9 3...3 3..3. 3..3.7 LN 3... 3..3. consisting of 3 IP s (for IP addresses starting with 3, first 4 bits are address) 4: Network Layer 4a-33 IP ddressing How to find the s? Detach each interface from router, host create islands of isolated s 3... 3... 3...4 3...3 3..9. 3..7.0 3..9. 3..7. 3..8. 3..8.0 3...6 3..3.7 Interconnected system consisting of six s 3... 3... 3..3. 3..3. 4: Network Layer 4a-34

IP ddresses given notion of, let s re-examine IP addresses: class-full addressing: class 0 host 0 host 0 host D 0 multicast address.0.0.0 to 7.55.55.55 8.0.0.0 to 9.55.55.55 9.0.0.0 to 3.55.55.55 4.0.0.0 to 39.55.55.55 3 bits 4: Network Layer 4a-35 IP addressing: IDR classful addressing: inefficient use of address space, address space exhaustion e.g., class net allocated enough addresses for 65K hosts, even if only K hosts in that IDR: lassless InterDomain Routing portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in portion of address part 00000 0000 0000000 00000000 00.3.6.0/3 host part 4: Network Layer 4a-36

IP addresses: how to get one? Hosts (host portion): hard-coded by system admin in a file DHP: Dynamic Host onfiguration Protocol: dynamically get address: plug-and-play host broadcasts DHP discover msg DHP server responds with DHP offer msg host requests IP address: DHP request msg DHP server sends address: DHP ack msg 4: Network Layer 4a-37 IP addresses: how to get one? Network ( portion): get allocated portion of ISP s address space: ISP's block 00000 0000 0000000 00000000 00.3.6.0/0 Organization 0 00000 0000 0000000 00000000 00.3.6.0/3 Organization 00000 0000 000000 00000000 00.3.8.0/3 Organization 00000 0000 000000 00000000 00.3.0.0/3....... Organization 7 00000 0000 0000 00000000 00.3.30.0/3 4: Network Layer 4a-38

Hierarchical addressing: route aggregation Hierarchical addressing allows efficient advertisement of routing information: Organization 0 00.3.6.0/3 Organization 00.3.8.0/3 Organization 00.3.0.0/3 Organization 7 00.3.30.0/3.... Fly-y-Night-ISP Send me anything with addresses beginning 00.3.6.0/0 Internet ISPs-R-Us Send me anything with addresses beginning 99.3.0.0/6 4: Network Layer 4a-39 Hierarchical addressing: more specific routes ISPs-R-Us has a more specific route to Organization Organization 0 00.3.6.0/3 Organization 00.3.0.0/3 Organization 7 00.3.30.0/3.... Organization 00.3.8.0/3 Fly-y-Night-ISP ISPs-R-Us Send me anything with addresses beginning 00.3.6.0/0 Send me anything with addresses beginning 99.3.0.0/6 or 00.3.8.0/3 Internet 4: Network Layer 4a-40

IP addressing: the last word... Q: How does an ISP get block of addresses? : INN: Internet orporation for ssigned Names and Numbers allocates addresses manages DNS assigns domain names, resolves disputes 4: Network Layer 4a-4 Getting a datagram from source to dest. IP datagram: misc fields source IP addr dest IP addr data datagram remains unchanged, as it travels source to destination addr fields of interest here routing table in Dest. Net. next router Nhops 3.. 3.. 3...4 3..3 3...4 3... 3... 3... 3...4 3...9 3...3 3..3. 3..3.7 3... 3..3. E 4: Network Layer 4a-4

Getting a datagram from source to dest. misc fields 3... 3...3 data Starting at, given IP datagram addressed to : look up net. address of find is on same net. as link layer will send datagram directly to inside link-layer frame and are directly connected Dest. Net. next router Nhops 3.. 3.. 3...4 3..3 3...4 3... 3... 3... 3...4 3...9 3...3 3..3. 3..3.7 3... 3..3. E 4: Network Layer 4a-43 Getting a datagram from source to dest. misc fields 3... 3...3 data Starting at, dest. E: look up address of E E on different, E not directly attached routing table: next hop router to E is 3...4 link layer sends datagram to router 3...4 inside linklayer frame datagram arrives at 3...4 continued.. Dest. Net. next router Nhops 3.. 3.. 3...4 3..3 3...4 3... 3... 3... 3...4 3...9 3...3 3..3. 3..3.7 3... 3..3. E 4: Network Layer 4a-44

Getting a datagram from source to dest. Dest. next misc fields 3... 3...3 data router Nhops interface 3.. - 3...4 rriving at 3..4, 3.. - 3...9 3..3-3..3.7 destined for 3... look up address of E 3... E on same as router s 3... interface 3...9 3... router, E directly attached 3...4 3...9 link layer sends datagram to 3... 3... inside link-layer 3...3 3..3.7 E frame via interface 3...9 3..3. 3..3. datagram arrives at 3...!!! (hooray!) 4: Network Layer 4a-45