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

Similar documents
Content distribution networks

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

CSC 4900 Computer Networks: Multimedia Applications

Multimedia: video ... frame i+1

Week-12 (Multimedia Networking)

Mohammad Hossein Manshaei 1393

Multimedia Networking

Real-Time Control Protocol (RTCP)

Multimedia networking: outline

Multimedia networking: outline

Multimedia networking: outline

Chapter 7 Multimedia Networking

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

CSC 401 Data and Computer Communications Networks

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

Mohammad Hossein Manshaei 1393

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

Multimedia Networking

Topic 4b: QoS Principles. Chapter 9 Multimedia Networking. Computer Networking: A Top Down Approach

Multimedia

Chapter 2 Application Layer

Quality of Service (QoS)

Chapter 4 Network Layer

Improving QOS in IP Networks. Principles for QOS Guarantees

Real-Time Protocol (RTP)

Quality of Service. Qos Mechanisms. EECS 122: Lecture 15

Today. March 7, 2006 EECS122 Lecture 15 (AKP) 4. D(t) Scheduling Discipline. March 7, 2006 EECS122 Lecture 15 (AKP) 5

Master Course Computer Networks IN2097

Master Course Computer Networks IN2097

Computer Networks. Wenzhong Li. Nanjing University

Network Layer Enhancements

Digital Asset Management 5. Streaming multimedia

Mul$media Networking. #10 QoS Semester Ganjil 2012 PTIIK Universitas Brawijaya

Application-Layer Protocols Peer-to-Peer Systems, Media Streaming & Content Delivery Networks

55:054 Communication Networks 12/11/2008

Chapter 7 Multimedia Networking

Multimedia Networking

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

Week 7: Traffic Models and QoS

The Diffie-Hellman Key Exchange

of-service Support on the Internet

Video Streaming and Media Session Protocols

Mohammad Hossein Manshaei 1393

Internet Services & Protocols. Quality of Service Architecture

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

CS 457 Multimedia Applications. Fall 2014

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

Lecture 9: Media over IP

Multimedia Networking

Multimedia Applications. Classification of Applications. Transport and Network Layer

CS 3516: Advanced Computer Networks

Tema 0: Transmisión de Datos Multimedia

Chapter 7 Multimedia Networking

Chapter 7 Multimedia Networking

Chapter 6 The Link Layer and LANs

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

CSC 401 Data and Computer Communications Networks

Lecture 9 Ethernet and other Link Layer protocols

The Link Layer and LANs: Ethernet and Swiches

Master Course Computer Networks IN2097

Multimedia networking: outline

Multimedia Networking

Master Course Computer Networks IN2097

COMP6218: Content Caches. Prof Leslie Carr

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

Data Communications & Networks. Session 10 Main Theme Multimedia Networking. Dr. Jean-Claude Franchitti

Lec 17 Multimedia Transport: RTP, TCP/HTTP and QUIC

CSC 4900 Computer Networks: Link Layer (2)

Topic 4a Router Operation and Scheduling. Ch4: Network Layer: The Data Plane. Computer Networking: A Top Down Approach

Network Support for Multimedia

Multimedia Networking. Protocols for Real-Time Interactive Applications

Outline. QoS routing in ad-hoc networks. Real-time traffic support. Classification of QoS approaches. QoS design choices

Advanced Computer Networks

Principles behind data link layer services

Multimedia Networking. Network Support for Multimedia Applications

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

Telematics 2. Chapter 3 Quality of Service in the Internet. (Acknowledgement: These slides have been compiled from Kurose & Ross, and other sources)

Streaming (Multi)media

Multimedia! 23/03/18. Part 3: Lecture 3! Content and multimedia! Internet traffic!

Part 3: Lecture 3! Content and multimedia!

Chapter 7 Multimedia Networking

Chapter 4 Network Layer: The Data Plane

Chapter 5 Link Layer and LANs

Chapter 5: The Data Link Layer. Chapter 5 Link Layer and LANs. Ethernet. Link Layer. Star topology. Ethernet Frame Structure.

Summary of MAC protocols

Chapter 7 Multimedia Networking. Chapter 7 outline. Chapter 7: goals. Multimedia and Quality of Service: What is it? QoS

ETSF10 Internet Protocols Transport Layer Protocols

Common network/protocol functions

Multimedia Applications over Packet Networks

Chapter 7 Multimedia Networking

Principles behind data link layer services:

Principles behind data link layer services:

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Multicast and Quality of Service. Internet Technologies and Applications

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CS 455/555 Intro to Networks and Communications. Link Layer Addressing, Ethernet, and a Day in the Life of a Web Request

Part1: Lecture 4 QoS

Multimedia Networking and Quality of Service

Kommunikationssysteme [KS]

Module objectives. Integrated services. Support for real-time applications. Real-time flows and the current Internet protocols

Transcription:

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-2

MAC addresses and ARP v MAC (or LAN or physical or Ethernet) address: function: used locally to get frame from one interface to another physically-connected interface (same network, in IPaddressing sense) 48 bit MAC address (for most LANs) burned in NIC ROM, also sometimes software settable v ARP: mapping IP to MAC A broadcasts ARP query packet, containing B's IP address B replies to A with its MAC address A caches IP-to-MAC address pair in its ARP table Link Layer 5-3

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-4

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-5

Ethernet: physical topology v bus: popular through mid 90s all nodes in same collision domain (can collide with each other) v 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-6

Ethernet v 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 v features: Connectionless Unreliable MAC protocol: unslotted CSMA/CD wth binary backoff Link Layer 5-7

Ethernet CSMA/CD algorithm 1. NIC receives datagram from network layer, creates frame 2. If NIC senses channel idle, starts frame transmission. If NIC senses channel busy, waits until channel idle, then transmits. 3. If NIC transmits entire frame without detecting another transmission, NIC is done with frame! 4. If NIC detects another transmission while transmitting, aborts and sends jam signal 5. After aborting, NIC enters binary (exponential) backoff: after mth collision, NIC chooses K at random from {0,1,2,, 2 m -1}. NIC waits K 512 bit times, returns to Step 2 longer backoff interval with more collisions Link Layer 5-8

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-9

Ethernet switch v 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 v transparent hosts are unaware of presence of switches v plug-and-play, self-learning switches do not need to be configured Link Layer 5-10

Switch: self-learning v 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 v forwarding packet frame destination unknown: flood destination location known: selectively send Link Layer 5-11

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-12

VLANs: motivation v Motivation Lack of traffic isolation Inefficient use of switches Managing users v 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-13

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-14

Multiprotocol label switching (MPLS) v 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-15

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 v IP routing: path to destination determined by destination address alone v MPLS routing: path to destination can be based on source and dest. address fast reroute: precompute backup routes in case of link failure D A IP-only router MPLS and IP router Link Layer 5-16

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-17

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 Multmedia Networking 7-18

Multimedia: audio v v analog audio signal sampled at constant rate telephone: 8,000 samples/sec CD music: 44,100 samples/sec each sample quantized, i.e., rounded e.g., 2 8 =256 possible quantized values each quantized value represented by bits, e.g., 8 bits for 256 values audio signal amplitude quantization error sampling rate (N sample/sec) quantized value of analog value analog signal time Multmedia Networking 7-19

Multimedia: audio v v example: 8,000 samples/sec, 256 quantized values: 64,000 bps receiver converts bits back to analog signal: some quality reduction example rates v v v CD: 1.411 Mbps MP3: 96, 128, 160 kbps Internet telephony: 5.3 kbps and up audio signal amplitude quantization error sampling rate (N sample/sec) quantized value of analog value analog signal time Multmedia Networking 7-20

v v v Multimedia: video video: sequence of images displayed at constant rate e.g. 24 images/sec digital image: array of pixels each pixel represented by bits coding: use redundancy within and between images to decrease # bits used to encode image spatial (within image) temporal (from one image to next) spatial coding example: instead of sending N values of same color (all purple), send only two values: color value (purple) and number of repeated values (N)...... frame i temporal coding example: instead of sending complete frame at i+1, send only differences from frame i frame i+1 Multmedia Networking 7-21

v v v Multimedia: video CBR: (constant bit rate): video encoding rate fixed VBR: (variable bit rate): video encoding rate changes as amount of spatial, temporal coding changes examples: MPEG 1 (CD-ROM) 1.5 Mbps MPEG2 (DVD) 3-6 Mbps MPEG4 (often used in Internet, < 1 Mbps) spatial coding example: instead of sending N values of same color (all purple), send only two values: color value (purple) and number of repeated values (N)...... frame i temporal coding example: instead of sending complete frame at i+1, send only differences from frame i frame i+1 Multmedia Networking 7-22

Multimedia networking: 3 application types v 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 v conversational voice/video over IP interactive nature of human-to-human conversation limits delay tolerance e.g., Skype v streaming live audio, video real-time e.g., live sporting event Multmedia Networking 7-23

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 Multmedia Networking 7-24

Streaming stored video: challenges v continuous playout constraint: once client playout begins, playback must match original timing but network delays are variable (jitter), so will need client-side buffer to match playout requirements v other challenges: client interactivity: pause, fast-forward, rewind, jump through video video packets may be lost, retransmitted Multmedia Networking 7-25

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

Client-side buffering, playout variable fill rate, x(t) buffer fill level, Q(t) playout rate, e.g., CBR r video server client application buffer, size B client Multmedia Networking 7-27

Client-side buffering, playout variable fill rate, x(t) buffer fill level, Q(t) playout rate, e.g., CBR r video server client application buffer, size B client 1. Initial fill of buffer until playout begins at t p 2. playout begins at t p, 3. buffer fill level varies over time as fill rate x(t) varies and playout rate r is constant Multmedia Networking 7-28

Streaming multimedia: UDP v server sends at rate appropriate for client often: send rate = encoding rate = constant rate transmission rate can be oblivious to congestion levels v short playout delay (2-5 seconds) to remove network jitter v error recovery: application-level, time-permitting v RTP [RFC 2326]: multimedia payload types v UDP may not go through firewalls Multmedia Networking 7-29

Streaming multimedia: HTTP v multimedia file retrieved via HTTP GET v send at maximum possible rate under TCP variable rate, x(t) video file TCP send buffer server TCP receive buffer client application playout buffer v fill rate fluctuates due to TCP congestion control, retransmissions (in-order delivery) v larger playout delay: smooth TCP delivery rate v HTTP/TCP passes more easily through firewalls Multmedia Networking 7-30

Streaming multimedia: DASH v DASH: Dynamic, Adaptive Streaming over HTTP v server: divides video file into multiple chunks each chunk stored, encoded at different rates manifest file: provides URLs for different chunks v 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) Multmedia Networking 7-31

Content distribution networks v challenge: how to stream content (selected from millions of videos) to hundreds of thousands of simultaneous users? v option 1: single, large mega-server single point of failure point of network congestion long path to distant clients multiple copies of video sent over outgoing link.quite simply: this solution doesn t scale Multmedia Networking 7-32

Content distribution networks v challenge: how to stream content (selected from millions of videos) to hundreds of thousands of simultaneous users? v option 2: store/serve multiple copies of videos at multiple geographically distributed sites (CDN) enter deep: push CDN servers deep into many access networks close to users used by Akamai, 1700 locations bring home: smaller number (10 s) of larger clusters in POPs near (but not within) access networks used by Limelight Multmedia Networking 7-33

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 2 1 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 Multmedia Networking 7-34

Case study: Netflix v 30% downstream US traffic in 2011 v owns very little infrastructure, uses 3 rd party services: own registration, payment servers Amazon (3 rd party) cloud services: Netflix uploads studio master to Amazon cloud create multiple version of movie (different endodings) in cloud upload versions from cloud to CDNs Cloud hosts Netflix web pages for user browsing three 3 rd party CDNs host/stream Netflix content: Akamai, Limelight, Level-3 Multmedia Networking 7-35

Case study: Netflix Amazon cloud upload copies of multiple versions of video to CDNs Akamai CDN Netflix registration, accounting servers 1 1. Bob manages Netflix account 2. Bob browses Netflix video 2 3 3. Manifest file returned for requested video 4. DASH streaming Limelight CDN Level-3 CDN Multmedia Networking 7-36

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 Multmedia Networking 7-37

Voice-over-IP (VoIP) v VoIP end-end-delay requirement: needed to maintain conversational aspect higher delays noticeable, impair interactivity < 150 msec: good > 400 msec bad includes application-level (packetization,playout), network delays Multmedia Networking 7-38

VoIP characteristics v speaker s audio: alternating talk spurts, silent periods. 64 kbps during talk spurt pkts generated only during talk spurts 20 msec chunks at 8 Kbytes/sec: 160 bytes of data v application-layer header added to each chunk v chunk+header encapsulated into UDP or TCP segment v application sends segment into socket every 20 msec during talkspurt Multmedia Networking 7-39

VoIP: packet loss, delay v network loss: IP datagram lost due to network congestion (router buffer overflow) v delay loss: IP datagram arrives too late for playout at receiver delays: processing, queueing in network; end-system (sender, receiver) delays typical maximum tolerable delay: 400 ms v loss tolerance: depending on voice encoding, loss concealment, packet loss rates between 1% and 10% can be tolerated Multmedia Networking 7-40

Delay jitter constant bit rate transmission variable network delay (jitter) client reception buffered data constant bit rate playout at client client playout delay time v end-to-end delays of two consecutive packets: difference can be more or less than 20 msec (transmission time difference) Multmedia Networking 7-41

VoIP: fixed playout delay v receiver attempts to playout each chunk exactly q msecs after chunk was generated. chunk has time stamp t: play out chunk at t+q chunk arrives after t+q: data arrives too late for playout: data lost v tradeoff in choosing q: large q: less packet loss small q: better interactive experience Multmedia Networking 7-42

VoIP: fixed playout delay sender generates packets every 20 msec during talk spurt. first packet received at time r first playout schedule: begins at p second playout schedule: begins at p packets packets generated packets received loss playout schedule p' - r playout schedule p - r time r p p' Multmedia Networking 5-43

Adaptive playout delay v goal: low playout delay, low late loss rate v 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 v adaptively estimate packet delay: (EWMA - exponentially weighted moving average, recall TCP RTT estimate): d i = (1 α)d i-1 + α (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 Multmedia Networking 7-44

VoiP: recovery from packet loss (1) Challenge: recover from packet loss given small tolerable delay between original transmission and v v 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 v for every group of n chunks, create redundant chunk by exclusive OR-ing n original chunks v send n+1 chunks, increasing bandwidth by factor 1/n v can reconstruct original n chunks if at most one lost chunk from n+1 chunks, with playout delay Multmedia Networking 7-45

VoiP: recovery from packet loss (2) another FEC scheme: v piggyback lower quality stream v send lower resolution audio stream as redundant information v e.g., nominal stream PCM at 64 kbps and redundant stream GSM at 13 kbps v non-consecutive loss: receiver can conceal loss v generalization: can also append (n-1)st and (n-2)nd low-bit rate chunk Multmedia Networking 7-46

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

Example v Suppose the first scheme generates a redundant chunk for every four original chunks. Suppose the second scheme uses a low-bit rate encoding whose transmission rate is 25% of the transmission rate of the nominal stream. a. How much additional bandwidth does each scheme require? How much play back delay does each scheme add? b. How do the two schemes perform if the first packet is lost in every group of five packets? Which scheme will have better audio quality? c. How do the two schemes perform if the first packet is lost in every group of two packets? Which scheme will have better audio quality? Multimedia Networking 7-48

Voice-over-IP: Skype v v proprietary applicationlayer protocol (inferred via reverse engineering) encrypted msgs P2P components: clients: skype peers connect directly to each other for VoIP call super nodes (SN): skype peers with special functions Skype login server Skype clients (SC) supernode (SN) supernode overlay network overlay network: among SNs to locate SCs login server Application Layer 2-49

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: RTP, SIP 7.5 network support for multimedia Multimedia Networking 7-50

Multimedia protocols v Real-Time Protocol (RTP): specifies packet structure for packets carrying audio, video data v Real-Time Control Protocol (RTCP): provides statistics (# packets sent, # packets lost, interarrival jitter, etc.) and control information for an RTP session. v Session Initiation Protocol (SIP): signaling protocol to control multimedia communication sessions. Multimedia Networking 7-51

Example: setting up call to known IP address Alice Bob 167.180.112.24 INVITE bob@193.64.210.89 c=in IP4 167.180.112.24 m=audio 38060 RTP/AVP 0 port 5060 port 5060 200 OK c=in IP4 193.64.210.89 m=audio 48753 RTP/AVP 3 ACK port 5060 193.64.210.89 Bob's terminal rings v Alice s SIP invite message indicates her port number, IP address, encoding she prefers to receive (PCM µlaw) v Bob s 200 OK message indicates his port number, IP address, preferred encoding (GSM) port 38060 GSM µ Law audio port 48753 v SIP messages can be sent over TCP or UDP; here sent over UDP time time v default SIP port number is 5060 Multimedia Networking 7-52

Example of SIP message INVITE sip:bob@domain.com SIP/2.0 Via: SIP/2.0/UDP 167.180.112.24 From: sip:alice@hereway.com To: sip:bob@domain.com Call-ID: a2e3a@pigeon.hereway.com Content-Type: application/sdp Content-Length: 885 c=in IP4 167.180.112.24 m=audio 38060 RTP/AVP 0 Notes: v HTTP message syntax v sdp = session description protocol v Call-ID is unique for every call v Here we don t know Bob s IP address intermediate SIP servers needed v Alice sends, receives SIP messages using SIP default port 5060 v Alice specifies in header that SIP client sends, receives SIP messages over UDP 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

Network support for multimedia Multimedia Networking 7-55

Dimensioning best effort networks v approach: deploy enough link capacity so that congestion doesn t occur, multimedia traffic flows without delay or loss low complexity of network mechanisms (use current best effort network) high bandwidth costs v challenges: network dimensioning: how much bandwidth is enough? estimating network traffic demand: needed to determine how much bandwidth is enough (for that much traffic) Multimedia Networking 7-56

Fluctuating traffic patterns v Weekly and daily peaks Multimedia Networking 7-57

Providing multiple classes of service v thus far: making the best of best effort service one-size fits all service model v alternative: multiple classes of service partition traffic into classes network treats different classes of traffic differently (analogy: VIP service versus regular service) v granularity: differential service among multiple classes, not among individual connections v history: ToS bits 0111 Multimedia Networking 7-58

Multiple classes of service: scenario H1 R1 R2 H3 H2 R1 output interface queue 1.5 Mbps link H4 Multimedia Networking 7-59

Scenario 1: mixed HTTP and VoIP v example: 1Mbps VoIP, HTTP share 1.5 Mbps link. HTTP bursts can congest router, cause audio loss want to give priority to audio over HTTP R1 R2 Principle 1 packet marking needed for router to distinguish between different classes;; and new router policy to treat packets accordingly Multimedia Networking 7-60

Principles for QOS guarantees (more) v what if applications misbehave (VoIP sends higher than declared rate) policing: force source adherence to bandwidth allocations v marking, policing at network edge 1 Mbps phone R1 R2 1.5 Mbps link packet marking and policing Principle 2 provide protection (isolation) for one class from others Multimedia Networking 7-61

Principles for QOS guarantees (more) v allocating fixed (non-sharable) bandwidth to flow: inefficient use of bandwidth if flows doesn t use its allocation 1 Mbps phone R1 1 Mbps logical link R2 1.5 Mbps link 0.5 Mbps logical link Principle 3 while providing isolation, it is desirable to use resources as efficiently as possible Multimedia Networking 7-62

Scheduling and policing mechanisms v scheduling: choose next packet to send on link v 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-63

Scheduling policies: priority priority scheduling: send highest priority queued packet v 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 high priority queue (waiting area) 2 1 3 departures low priority queue (waiting area) link (server) 5 1 3 2 4 5 1 4 3 2 4 departures 5 Multimedia Networking 7-64

Scheduling policies: still more Round Robin (RR) scheduling: v multiple classes v cyclically scan class queues, sending one complete packet from each class (if available) v 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-65

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

Example v Consider the following figure. v a. Assuming FIFO service, indicate the time that packet 2 through 12 each leave the queue. For each packet, what is the delay between its arrival and the beginning of the slot in which it is transmitted? What is the average of this delay over 12 packets? Multimedia Networking 7-67

Example v b. Now assume a priority service, and assume that odd-numbered packets are high priority, and even numbered packets are low priority. Indicate v c. Now assume round robin service. Assume that packets 1,2,3,6,11, and 12 are from class 1, and packets 4,5,7,8,9, and 10 are from class 2. Indicate v d. Now assume weighted fair queueing (WFQ) service. Assume that odd-numbered packets are from class 1, and even-numbered packets are from class 2. Class 1 has a WFQ weight of 2, while class 2 has a WFQ weight of 1. Indicate Multimedia Networking 7-68

Policing mechanisms goal: limit traffic to not exceed declared parameters Three common-used criteria: v (long term) average rate: how many pkts can be sent per unit time (in the long run) crucial question: what is the interval length: 100 packets per sec or 6000 packets per min have same average! v (max.) burst size: max number of pkts sent consecutively (with no intervening idle) Multimedia Networking 7-69

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

Example v Consider the following leaky bucket. The token buffer can hold at most two tokens, and is initially full at t=0. New tokens arrive at rate of one token per slot. The output link speed is such that if two packets obtain tokens at the beginning of a time slot, they can both go to the output link in the same time slot. The timing details are as follows: packet arrival -> packet departure -> add tokens - > next time slot Multimedia Networking 7-71

Example a. For each time slot, identify the packets that are in the queue and the number of tokens in the bucket, immediately after the arrivals have been processed but before any of the packets have passed through the queue and removed a token. b. For each time slot, indicate which packets appear on the output after the token(s) have been removed from the queue. Multimedia Networking 7-72

Policing and QoS guarantees v token bucket, WFQ combine to provide guaranteed upper bound on delay, i.e., QoS guarantee! arriving traffic token rate, r bucket size, b WFQ per-flow rate, R arriving traffic D = b/r max Multimedia Networking 7-73

Differentiated services v want qualitative service classes behaves like a wire relative service distinction: Platinum, Gold, Silver v scalability: simple functions in network core, relatively complex functions at edge routers (or hosts) signaling, maintaining per-flow router state difficult with large number of flows v don t define service classes, provide functional components to build service classes Multimedia Networking 7-74

Diffserv architecture edge router: v per-flow traffic management v marks packets as in-profile and out-profile marking b r scheduling... core router: v per class traffic management v buffering and scheduling based on marking at edge v preference given to in-profile packets over out-of-profile packets Multimedia Networking 7-75

Per-connection QOS guarantees v basic fact of life: can not support traffic demands beyond link capacity 1 Mbps phone R1 R2 1 Mbps phone 1.5 Mbps link Principle 4 call admission: flow declares its needs, network may block call (e.g., busy signal) if it cannot meet needs Multimedia Networking 7-76

QoS guarantee scenario v resource reservation call setup, signaling (RSVP allows applications to reserve bandwidth for their data flows.) traffic, QoS declaration per-element admission control QoS-sensitive scheduling (e.g., WFQ) request/ reply Multimedia Networking 7-77