Chapter 4 Network Layer

Similar documents
internet technologies and standards

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

Chapter 4: network layer. Network service model. Two key network-layer functions. Network layer. Input port functions. Router architecture overview

Content distribution networks

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane

Router Architecture Overview

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

internet technologies and standards

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

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

Chapter 4: Network Layer

Lecture 3. The Network Layer (cont d) Network Layer 1-1

Network layer: Overview. Network Layer Functions

Network Layer: Internet Protocol

Master Course Computer Networks IN2097

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

Network Layer: Router Architecture, IP Addressing

COMP211 Chapter 4 Network Layer: The Data Plane

Review is pretty much complete! Please help formatting review (indenting). - Jorden

Chapter 4 Network Layer

TDTS06: computer Networks

Subnets. IP datagram format. The Internet Network layer. IP Fragmentation and Reassembly. IP Fragmentation & Reassembly. IP Addressing: introduction

Chapter 5 Link Layer. Down Approach. Computer Networking: A Top. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

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

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

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

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

CSC 401 Data and Computer Communications Networks

Computer Networking Introduction

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

Multimedia Networking

Chapter 9. Multimedia Networking. Computer Networking: A Top Down Approach

Chapter 4: network layer

Chapter 4 Network Layer: The Data Plane

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

CS 3516: Advanced Computer Networks

Chapter 4 Network Layer: The Data Plane

Chapter 4: Network Layer

CSC 401 Data and Computer Communications Networks

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

Module 3 Network Layer CS755! 3-1!

Lecture 16: Network Layer Overview, Internet Protocol

HY 335 Φροντιστήριο 8 ο

Chapter 4 Network Layer: The Data Plane

CSC358 Week 6. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

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

Chapter 4 Network Layer

Quiz. Segment structure and fields Flow control (rwnd) Timeout interval. Phases transition ssthresh setting Cwnd setting

Review. Some slides are in courtesy of J. Kurose and K. Ross

Network Layer: Data Plane 4-2

Computer Networks LECTURE 10 ICMP, SNMP, Inside a Router, Link Layer Protocols. Assignments INTERNET CONTROL MESSAGE PROTOCOL

CSCE 463/612 Networks and Distributed Processing Spring 2018

The Link Layer and LANs: Ethernet and Swiches

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Chapter 4 Network Layer

Chapter 6 The Link Layer and LANs

Lecture 9 Ethernet and other Link Layer protocols

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

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

1-1. Switching Networks (Fall 2010) EE 586 Communication and. October 25, Lecture 24

CSC 401 Data and Computer Communications Networks

Chapter 4 Network Layer

MULTIMEDIA I CSC 249 APRIL 26, Multimedia Classes of Applications Services Evolution of protocols

IPv4 addressing, NAT. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

Chapter 4 Network Layer

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

Chapter 4 Network Layer

Network Layer: Chapter 4. The Data Plane. Computer Networking: A Top Down Approach

Mohammad Hossein Manshaei 1393

ECE 4450:427/527 - Computer Networks Spring 2017

NETWORK LAYER DATA PLANE

Chapter 4 Network Layer. Network Layer 4-1

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

Internet protocol stack

Data Communications & Networks. Session 7 Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

CMPE 80N: Introduction to Networking and the Internet

CSC 4900 Computer Networks: Network Layer

Different Layers Lecture 20

CSC 4900 Computer Networks: Link Layer (2)

CSC 4900 Computer Networks: Network Layer

Network Layer: Control/data plane, addressing, routers

Network Layer. CMPS 4750/6750: Computer Networks

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

Chapter 4. DataLink Layer. Reference: Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Principles behind data link layer services

Summary of MAC protocols

CS 3516: Computer Networks

CS118 Discussion 1A, Week 6. Zengwen Yuan Dodd Hall 78, Friday 10:00 10:50 a.m.

Chapter 4 Network Layer

CS 3516: Advanced Computer Networks

Computer Network Architectures and Multimedia. Guy Leduc. Chapter 2 MPLS networks. Chapter 2: MPLS

Introduction to Computer Networking. Guy Leduc. Chapter 4 Network Layer: The Data Plane. Chapter 4: Network Layer Data Plane

Networking: Network layer

Principles behind data link layer services:

Principles behind data link layer services:

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Review for Chapter 4 R1,R2,R3,R7,R10,R11,R16,R17,R19,R22,R24, R26,R30 P1,P2,P4,P7,P10,P11,P12,P14,P15,P16,P17,P22,P24,P29,P30

Transcription:

Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Slides adopted from original ones provided by the textbook authors. Network Layer 4-1

Chapter 4: outline 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer 4-2

Key Network-Layer Functions forwarding: move packets from router s input to appropriate router output routing: determine route taken by packets from source to dest. connection management: for connection based networklayer protocols Network Layer 4-3

Chapter 4: outline 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer 4-4

Virtual circuits vs. datagram networks Virtual circuits: connection service call setup, teardown for each call before data can flow each packet carries VC identifier link, router resources (bandwidth, buffers) allocated to VC Datagram networks: connectionless service no call setup at network layer routers: no state about end-to-end connections packets forwarded using destination host address Network Layer 4-5

Longest prefix matching longest prefix matching when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. Given address range, calculate prefix. Given prefix, calculate address range. Given address, find outgoing interface. Network Layer 4-6

Chapter 4: outline 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer 4-7

Router architecture overview two key router functions: run routing algorithms/protocol (RIP, OSPF, BGP) forwarding datagrams from incoming to outgoing link forwarding tables computed, pushed to input ports routing processor routing, management control plane (software) forwarding data plane (hardware) high-seed switching fabric router input ports router output ports Network Layer 4-8

Switching fabrics transfer packet from input buffer to appropriate output buffer three types of switching fabrics memory: two memory accesses per packet bus: exclusive access by single sender crossbar: supporting multiple transmission pairs memory memory bus crossbar Network Layer 4-9

Chapter 4: outline 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer 4-10

IP datagram format IP protocol version number header length (bytes) type of data max number remaining hops (decremented at each router) upper layer protocol to deliver payload to ver head. len 16-bit identifier time to live type of service upper layer 32 bits flgs length fragment offset header checksum 32 bit source IP address 32 bit destination IP address options (if any) data (variable length, typically a TCP or UDP segment) total datagram length (bytes) for fragmentation/ reassembly e.g. timestamp, record route taken, specify list of routers to visit. Network Layer 4-11

IP fragmentation, reassembly network links have MTU (max.transfer size) - largest possible link-level frame different link types, different MTUs large IP datagram divided ( fragmented ) within net one datagram becomes several datagrams reassembled only at final destination IP header bits used to identify, order related fragments reassembly fragmentation: in: one large datagram out: 3 smaller datagrams Network Layer 4-12

IPv4 Addressing Classful addressing Fixed subnet/host address length Inflexible CIDR: Classless InterDomain Routing subnet portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in subnet portion of address 13

DHCP: Dynamic Host Configuration Protocol goal: allow host to dynamically obtain its IP address from network server when it joins network can renew its lease on address in use allows reuse of addresses (only hold address while connected/ on ) support for mobile users who want to join network (more shortly) DHCP overview: host broadcasts DHCP discover msg [optional] DHCP server responds with DHCP offer msg [optional] host requests IP address: DHCP request msg DHCP server sends address: DHCP ack msg Network Layer 4-14

NAT: network address translation implementation: NAT router must: outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #)... remote clients/servers will respond using (NAT IP address, new port #) as destination addr remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair incoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table Network Layer 4-15

ICMP: internet control message protocol used by hosts & routers to communicate networklevel information error reporting: unreachable host, network, port, protocol echo request/reply (used by ping) network-layer above IP: ICMP msgs carried in IP datagrams ICMP message: type, code plus first 8 bytes of IP datagram causing error traceroute case study Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header Network Layer 4-16

IPv6 datagram format initial motivation: 32-bit address space soon to be completely allocated. additional motivation: header format helps speed processing/forwarding header changes to facilitate QoS ver pri flow label payload len next hdr hop limit source address (128 bits) destination address (128 bits) data 32 bits Network Layer 4-17

Chapter 4: outline 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer 4-18

Dijsktra s Algorithm 1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = 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' Network Layer 4-19

Distance vector algorithm Bellman-Ford equation d x (y) = min {c(x,v) + d v (y) } iterative, asynchronous: each local iteration caused by: local link cost change DV update message from neighbor distributed: v each node notifies neighbors only when its DV changes neighbors then notify their neighbors if necessary each node: wait for (change in local link cost or msg from neighbor) recompute estimates if DV to any dest has changed, notify neighbors Network Layer 4-20

Hierarchical Routing aggregate routers into regions: autonomous systems (AS) intra-as routing routers in same AS run same routing protocol routers in different AS can run different intra-as routing protocol inter-as routing Gateway router connecting another AS Network Layer 4-21

Chapter 4: outline 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer 4-22

RIP ( Routing Information Protocol) distance vector algorithm, based on # of hops distance vectors: exchanged among neighbors every 30 sec poison reverse used to prevent ping-pong loops application-level process implemented on UDP Network Layer 4-23

OSPF (Open Shortest Path First) open protocol, based on Link State algorithm advertisements disseminated to entire AS (via flooding) password based authentication ECMP: equal-cost multiple paths hierarchical OSPF in large domains Network Layer 4-24

BGP (Border Gateway Protocol) two types of BGP (TCP) sessions ebgp: between neighboring ASs ibgp: inside same AS router may learn about more than 1 route to destination AS, selects route based on: 1. local preference value attribute: policy decision 2. shortest AS-PATH 3. closest NEXT-HOP router: hot potato routing 4. additional criteria Network Layer 4-25

Chapter 4: outline 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer 4-26

Approaches for building mcast trees approaches: source-based tree: one tree per source shortest path trees reverse path forwarding group-shared tree: group uses one tree minimal spanning (Steiner) center-based trees Network Layer 4-27

Shortest path tree mcast forwarding tree: tree of shortest path routes from source to all receivers Dijkstra s algorithm s: source LEGEND R1 1 2 R4 router with attached group member R3 R2 3 4 R6 6 R7 5 R5 i router with no attached group member link used for forwarding, i indicates order link added by algorithm Network Layer 4-28

Reverse path forwarding s: source R3 R2 R1 R6 R4 R7 R5 LEGEND router with attached group member router with no attached group member datagram will be forwarded datagram will not be forwarded if (mcast datagram received on incoming link on shortest path back to center) then flood datagram onto all outgoing links else ignore datagram Network Layer 4-29

Reverse path forwarding: pruning forwarding tree contains subtrees with no mcast group members no need to forward datagrams down subtree prune msgs sent upstream by router with no downstream group members s: source R3 R2 R1 R6 P R4 P R5 R7 LEGEND P router with attached group member router with no attached group member prune message links with multicast forwarding Network Layer 4-30

Center-based trees single delivery tree shared by all one router identified as center of tree to join: edge router sends unicast join-msg addressed to center router join-msg processed by intermediate routers and forwarded towards center join-msg either hits existing tree branch for this center, or arrives at center path taken by join-msg becomes new branch of tree for this router Network Layer 4-31

Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Slides adopted from original ones provided by the textbook authors.

Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs addressing, ARP Ethernet switches VLANS 5.5 link virtualization: MPLS 5.6 data center networking 5.7 a day in the life of a web request Link Layer 5-33

Link layer services framing link access error detection and correction Link Layer 5-34

Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs addressing, ARP Ethernet switches VLANS 5.5 link virtualization: MPLS 5.6 data center networking 5.7 a day in the life of a web request Link Layer 5-35

Parity checking single bit parity: detect single bit errors two-dimensional bit parity: detect and correct single bit errors Even parity: parity bit chosen for even # of 1s Odd parity: parity bit chose for odd # of 1s 0 0 Link Layer 5-36

CRC calculation want: D. 2 r XOR R = ng equivalently: D. 2 r = ng XOR R equivalently: if we divide D. 2 r by G, want remainder R to satisfy: R = remainder[ ] D. 2 r G Link Layer 5-37

Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs addressing, ARP Ethernet switches VLANS 5.5 link virtualization: MPLS 5.6 data center networking 5.7 a day in the life of a web request Link Layer 5-38

Summary of MAC protocols channel partitioning, by time, frequency or code Time Division Frequency Division Code Division random access (dynamic), ALOHA, S-ALOHA carrier sensing: easy in some technologies (wire), hard in others (wireless) CSMA/CD used in Ethernet taking turns polling from central site used in bluetooth token passing used in FDDI, token ring Link Layer 5-39

Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs addressing, ARP Ethernet switches VLANS 5.5 link virtualization: MPLS 5.6 data center networking 5.7 a day in the life of a web request Link Layer 5-40

ARP: mapping IP to MAC A wants to send datagram to B B s MAC address not in A s ARP table. A broadcasts ARP query packet, containing B's IP address dest MAC address = FF-FF- FF-FF-FF-FF all nodes on LAN receive ARP query B receives ARP packet, replies to A with its (B's) MAC address frame sent to A s MAC address (unicast) A caches (saves) IP-to- MAC address pair in its ARP table until information becomes old (times out) soft state: information that times out (goes away) unless refreshed ARP is plug-and-play : nodes create their ARP tables without intervention from net administrator Link Layer 5-41

Addressing: routing to another LAN walkthrough: send datagram from A to B via R focus on addressing at IP (datagram) and MAC layer (frame) assume A knows B s IP address assume A knows IP address of first hop router, R (how?) assume A knows R s MAC address (how?) A 111.111.111.111 74-29-9C-E8-FF-55 111.111.111.112 CC-49-DE-D0-AB-7D R 111.111.111.110 E6-E9-00-17-BB-4B 222.222.222.220 1A-23-F9-CD-06-9B B 222.222.222.222 49-BD-D2-C7-56-2A 222.222.222.221 88-B2-2F-54-1A-0F Link Layer 5-42

Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs addressing, ARP Ethernet switches VLANS 5.5 link virtualization: MPLS 5.6 data center networking 5.7 a day in the life of a web request Link Layer 5-43

Ethernet: physical topology bus: popular through mid 90s all nodes in same collision domain (can collide with each other) star: prevails today active switch in center each spoke runs a (separate) Ethernet protocol (nodes do not collide with each other) bus: coaxial cable star switch Link Layer 5-44

Ethernet frame structure: sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame type preamble dest. address source address data (payload) CRC features: Connectionless Unreliable MAC protocol: unslotted CSMA/CD wth binary backoff Link Layer 5-45

Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs addressing, ARP Ethernet switches VLANS 5.5 link virtualization: MPLS 5.6 data center networking 5.7 a day in the life of a web request Link Layer 5-46

Ethernet switch link-layer device: takes an active role store, forward Ethernet frames examine incoming frame s MAC address, selectively forward frame to one-or-more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment transparent hosts are unaware of presence of switches plug-and-play, self-learning switches do not need to be configured Link Layer 5-47

Switch: self-learning switch learns which hosts can be reached through which interfaces when frame received, switch learns location of sender records sender/location pair in switch table forwarding packet frame destination unknown: flood destination location known: selective send Link Layer 5-48

VLANs: motivation Motivation Lack of traffic isolation Inefficient use of switches Managing users Virtual Local Area Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure. trunk port: carries frames between VLANS defined over multiple physical switches via the 802.1q protocol Link Layer 5-49

Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs addressing, ARP Ethernet switches VLANS 5.5 link virtualization: MPLS 5.6 data center networking 5.7 a day in the life of a web request Link Layer 5-50

Multiprotocol label switching (MPLS) initial goal: high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address! PPP or Ethernet header MPLS header IP header remainder of link-layer frame label Exp S TTL 20 3 1 5 Link Layer 5-51

MPLS versus IP paths R6 R5 R4 entry router (R4) can use different MPLS routes to A based, e.g., on source address R2 R3 D A IP routing: path to destination determined by destination address alone MPLS routing: path to destination can be based on source and dest. address fast reroute: precompute backup routes in case of link failure IP-only router MPLS and IP router Link Layer 5-52

Chapter 7 Multimedia Networking Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Slides adopted from original ones provided by the textbook authors. Multimedia Networking 7-53

Multimedia networking: outline 7.1 multimedia networking applications 7.2 streaming stored video 7.3 voice-over-ip 7.4 protocols for real-time conversational applications 7.5 network support for multimedia Multimedia Networking 7-54

Multimedia networking: 3 application types streaming, stored audio, video streaming: can begin playout before downloading entire file stored (at server): can transmit faster than audio/video will be rendered (implies storing/buffering at client) e.g., YouTube, Netflix, Hulu conversational voice/video over IP interactive nature of human-to-human conversation limits delay tolerance e.g., Skype streaming live audio, video e.g., live sporting event Multimedia Networking 7-55

Multimedia networking: outline 7.1 multimedia networking applications 7.2 streaming stored video 7.3 voice-over-ip 7.4 protocols for real-time conversational applications 7.5 network support for multimedia Multimedia Networking 7-56

buffered video Streaming stored video constant bit rate video transmission variable network delay client video reception constant bit rate video playout at client client playout delay time client-side buffering and playout delay: compensate for network-added delay, delay jitter Multimedia Networking 7-57

Streaming multimedia: UDP server sends at rate appropriate for client often: send rate = encoding rate = constant rate transmission rate can be oblivious to congestion levels short playout delay (2-5 seconds) to remove network jitter error recovery: application-level, timeipermitting Multimedia Networking 7-58

Streaming multimedia: DASH DASH: Dynamic, Adaptive Streaming over HTTP server: divides video file into multiple chunks each chunk stored, encoded at different rates manifest file: provides URLs for different chunks client: periodically measures server-to-client bandwidth consulting manifest, requests one chunk at a time chooses maximum coding rate sustainable given current bandwidth can choose different coding rates at different points in time (depending on available bandwidth at time) Multimedia Networking 7-59

CDN: simple content access scenario Bob (client) requests video http://netcinema.com/6y7b23v video stored in CDN at http://kingcdn.com/netc6y&b23v 1. Bob gets URL for for video http://netcinema.com/6y7b23v from netcinema.com web page 1 2 6. request video from 5 KINGCDN server, streamed via HTTP netcinema.com 3. netcinema s DNS returns URL http://kingcdn.com/netc6y&b23v 3 2. resolve http://netcinema.com/6y7b23v via Bob s local DNS 4 4&5. Resolve http://kingcdn.com/netc6y&b23 via KingCDN s authoritative DNS, which returns IP address of KIingCDN server with video netcinema s authorative DNS KingCDN.com KingCDN authoritative DNS Multimedia Networking 7-60

Multimedia networking: outline 7.1 multimedia networking applications 7.2 streaming stored video 7.3 voice-over-ip 7.4 protocols for real-time conversational applications 7.5 network support for multimedia Multimedia Networking 7-61

Adaptive playout delay goal: low playout delay, low late loss rate approach: adaptive playout delay adjustment: estimate network delay, adjust playout delay at beginning of each talk spurt silent periods compressed and elongated chunks still played out every 20 msec during talk spurt adaptively estimate packet delay: (EWMA - exponentially weighted moving average, recall TCP RTT estimate): d i = (1-a)d i-1 + a (r i t i ) delay estimate after ith packet small constant, e.g. 0.1 time received - time sent (timestamp) measured delay of ith packet Multimedia Networking 7-62

VoIP: recovery from packet loss (1) Challenge: recover from packet loss given small tolerable delay between original transmission and playout each ACK/NAK takes ~ one RTT alternative: Forward Error Correction (FEC) send enough bits to allow recovery without retransmission (recall two-dimensional parity in Ch. 5) simple FEC for every group of n chunks, create redundant chunk by exclusive OR-ing n original chunks send n+1 chunks, increasing bandwidth by factor 1/n can reconstruct original n chunks if at most one lost chunk from n+1 chunks, with playout delay Multimedia Networking 7-63

VoiP: recovery from packet loss (2) another FEC scheme: piggyback lower quality stream send lower resolution audio stream as redundant information e.g., nominal stream PCM at 64 kbps and redundant stream GSM at 13 kbps non-consecutive loss: receiver can conceal loss Multimedia Networking 7-64

VoiP: recovery from packet loss (3) interleaving to conceal loss: audio chunks divided into smaller units, e.g. four 5 msec units per 20 msec audio chunk packet contains small units from different chunks if packet lost, still have most of every original chunk no redundancy overhead, but increases playout delay Multimedia Networking 7-65

Multimedia networking: outline 7.1 multimedia networking applications 7.2 streaming stored video 7.3 voice-over-ip 7.4 protocols for real-time conversational applications 7.5 network support for multimedia Multimedia Networking 7-66

Scheduling and policing mechanisms scheduling: choose next packet to send on link FIFO (first in first out) scheduling: send in order of arrival to queue real-world example? discard policy: if packet arrives to full queue: who to discard? tail drop: drop arriving packet priority: drop/remove on priority basis random: drop/remove randomly packet arrivals queue (waiting area) link (server) packet departures Multimedia Networking 7-67

Scheduling policies: priority priority scheduling: send highest priority queued packet multiple classes, with different priorities class may depend on marking or other header info, e.g. IP source/dest, port numbers, etc. real world example? arrivals arrivals packet in service classify departures high priority queue (waiting area) 2 1 3 low priority queue (waiting area) link (server) 5 1 3 2 4 5 1 4 3 2 4 departures 5 Multimedia Networking 7-68

Scheduling policies: still more Round Robin (RR) scheduling: multiple classes cyclically scan class queues, sending one complete packet from each class (if available) real world example? arrivals 2 1 3 4 5 packet in service 1 3 2 4 5 departures 1 3 3 4 5 Multimedia Networking 7-69

Scheduling policies: still more Weighted Fair Queuing (WFQ): generalized Round Robin each class gets weighted amount of service in each cycle real-world example? Multimedia Networking 7-70

Policing mechanisms: implementation token bucket: limit input to specified burst size and average rate bucket can hold b tokens tokens generated at rate r token/sec unless bucket full over interval of length t: number of packets admitted less than or equal to (r t + b) Multimedia Networking 7-71

Principles for QOS Guarantees resource reservation: routers maintain state info of allocated resources RSVP: Resource Reservation Protocol allows applications to reserve bandwidth for their data flows. admit/deny new call setup requests Multimedia Networking 7-72