Skip to content
BoKSA

07: Multimedia Networking: Streaming, VoIP, CDN and QoS

07: Multimedia Networking: Streaming, VoIP, CDN and QoS

Course: Networking - Security Advanced · Updated: October 2026 Literature: K&R chapter 2: video streaming and content distribution networks; K&R chapter 4: scheduling and network neutrality. Note: the separate multimedia chapter (chapter 9 in the 7th edition) was removed from the 8th and 9th editions. The core material now sits in chapter 2 (streaming and CDNs) and chapter 4 (scheduling). Related lab: Solutions: Lab Multimedia networking

Learning objectives

After studying this article you can:

  • describe the three types of multimedia applications and their network requirements
  • explain how video streaming works: client buffering, playout delay, adaptive bitrate (DASH/HLS)
  • explain the challenges of Voice over IP: delay, jitter and packet loss, and how they are handled
  • explain how Content Distribution Networks (CDNs) work
  • explain the approaches to network support for multimedia: dimensioning, classes of service (DiffServ), scheduling (FIFO, priority, round robin, WFQ), policing (token bucket)
  • name current technologies such as WebRTC, QUIC/HTTP/3 streaming and low-latency streaming

1. Multimedia applications

Type Examples Main requirement
Streaming stored video/audio Netflix, YouTube, Spotify, podcasts High average throughput. A delay of a few seconds at the start is acceptable.
Conversational (interactive) voice/video Teams, Zoom, WhatsApp calls, VoIP phones Low delay (< 150 ms is good, > 400 ms is unusable), but tolerant of a little loss
Streaming live video Twitch, live sports, news Low-to-moderate delay, many viewers at the same time (scale)

Video dominates Internet traffic: it makes up around 65–80% of all downstream traffic.

Video basics

  • A video is a sequence of images (e.g. 30 or 60 frames per second).
  • Compression uses redundancy within an image (spatial) and between images (temporal).
  • Codecs: H.264/AVC (the "classic"), H.265/HEVC, VP9, and the royalty-free AV1, which in 2026 is used by YouTube, Netflix and most browsers. VVC/H.266 is the newest.
  • CBR (constant bit rate) vs VBR (variable bit rate).
  • Typical bit rates: 1–3 Mbit/s (SD/720p), 5–8 Mbit/s (1080p), 15–25 Mbit/s (4K).

2. Streaming stored video

2.1 Client buffering and playout delay

The network adds variable delay (jitter). The client solves this by buffering: it waits until it has received a few seconds of video before it starts playback.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
cumulative
 data
  ^                         constant playout rate
  |                    ___/      /
  |              ____/         /   ← if the playout line goes past the
  |         ____/            /       received line: buffer empty → "stalling"
  |    ____/  received     /
  |___/       (variable)  /
  +--------------------+------------------> time
                       ^
                  playout delay

2.2 From UDP to HTTP to DASH

  • Early streaming used UDP (RTP/RTSP): low overhead, but blocked by firewalls and NAT.
  • Then came HTTP streaming over TCP: it passes through all firewalls and works with normal web servers and caches.
  • Now DASH (Dynamic Adaptive Streaming over HTTP, ISO/IEC 23009-1) and Apple's HLS (HTTP Live Streaming, RFC 8216):
  • The video is encoded at several quality levels (bitrates).
  • Each version is cut into chunks (segments) of 2–10 seconds.
  • A manifest file (.mpd for DASH, .m3u8 for HLS) lists all versions and their URLs.
  • The client measures the available bandwidth and chooses the quality per chunk (adaptive bitrate, ABR).
1
2
3
4
5
6
Client                                 Server / CDN
  | --- GET manifest.mpd ------------>  |
  | <-- list: 480p, 720p, 1080p, 4K --  |
  | --- GET 1080p/chunk_001.m4s ----->  |   bandwidth OK
  | --- GET 1080p/chunk_002.m4s ----->  |
  | --- GET  720p/chunk_003.m4s ----->  |   bandwidth dropped → lower quality

CMAF (Common Media Application Format) lets DASH and HLS use the same media files. Low-latency HLS/DASH cuts the delay of live streams to 2–5 seconds.

3. Voice over IP (VoIP)

3.1 Challenges

Problem Cause Effect
Network loss Router buffer overflow Missing pieces of audio
Delay loss A packet arrives too late to be played Same effect as loss
End-to-end delay Transmission, propagation, queuing, processing > 150 ms is noticeable, > 400 ms makes conversation hard
Jitter Varying queuing delays Without a buffer, the audio is choppy

3.2 Solutions

  • Sequence numbers and timestamps in each packet (by RTP, Real-time Transport Protocol, RFC 3550)
  • Playout delay:
  • fixed: play every packet at its timestamp + q milliseconds
  • adaptive: estimate the delay and jitter (like TCP's RTT estimate, see article 01) and adjust between talk spurts
  • Recovery from packet loss (retransmission is too slow):
  • FEC (Forward Error Correction): send redundant information, e.g. a low-quality copy of the previous packet with each packet
  • Interleaving: spread small units of audio over several packets, so one loss produces many small gaps instead of one large one
  • Error concealment: repeat or interpolate the previous audio

3.3 Protocols

  • SIP (Session Initiation Protocol, RFC 3261): sets up, changes and ends calls (like HTTP for phone calls). It runs on port 5060 (TCP/UDP) or 5061 (TLS).
  • SDP: describes the media (codec, ports) inside SIP or WebRTC
  • RTP / RTCP: carry the media itself, plus quality reports
  • WebRTC: real-time audio and video inside the browser (Google Meet, Teams web, Discord). It uses ICE/STUN/TURN for NAT traversal and is always encrypted (DTLS-SRTP).
  • Codecs: Opus (the standard for WebRTC; it handles loss and variable bandwidth well), G.711, G.722, AMR-WB/EVS (mobile).

Case study, Skype (in the 7th edition of K&R): Skype used a proprietary peer-to-peer architecture. Microsoft moved it to a centralised cloud architecture, and Skype itself was shut down in May 2025 in favour of Microsoft Teams. This shows how real-time communication has moved to cloud services and WebRTC.

4. Content Distribution Networks (CDNs)

Challenge: how do you stream content (selected from millions of videos) to hundreds of thousands of simultaneous users all over the world?

  • Option 1: one huge "mega-server": a single point of failure, network congestion near the server, far away from most users. This doesn't scale.
  • Option 2: a CDN. Store and serve copies of the content at many geographically distributed sites.
  • Enter deep: put CDN servers inside ISP access networks, close to users (Akamai has servers in thousands of locations, and Netflix Open Connect places appliances inside ISP networks).
  • Bring home: a smaller number of large clusters at Internet Exchange Points (IXPs).

How does a client find the nearest CDN server?

  1. Bob requests https://video.netcinema.com/6Y7B23V.
  2. Bob's DNS resolver asks netcinema's DNS server, which answers with a CNAME pointing to the CDN (e.g. a1105.kingcdn.com).
  3. The CDN's DNS server chooses the "best" server for Bob, based on location, server load and network conditions, and returns its IP address.
  4. Bob fetches the video from that server. Often this is DASH/HLS over HTTPS.

Server selection is done with DNS-based redirection and/or anycast (the same IP announced from many locations through BGP, see article 04).

Large CDNs in 2026: Akamai, Cloudflare, Amazon CloudFront, Fastly, Google, plus private CDNs from Netflix, Meta and Apple.

5. Network support for multimedia

The Internet is best effort. There are three ways to deal with that:

Approach Description Complexity
1. Dimensioning ("throw bandwidth at it") Deploy enough capacity that congestion hardly ever occurs Low (but expensive). This is what most of the Internet does today.
2. Multiple classes of service Divide traffic into classes and treat each class differently (DiffServ) Medium. Common inside company networks and ISPs.
3. Per-connection QoS guarantees Reserve resources per flow (IntServ / RSVP) with call admission High. Rarely used on the Internet.

5.1 Classes of service: the principles

Example: a 1 Mbit/s VoIP stream and HTTP share a 1.5 Mbit/s link. HTTP bursts can fill the router's queue and cause audio loss.

  1. Marking: packets have to be marked so the router can tell the classes apart. In IP this is the DSCP field (Differentiated Services Code Point, RFC 2474). Example: EF (Expedited Forwarding, DSCP 46) for voice.
  2. Isolation / policing: one class must not use up all the resources of another. A misbehaving application has to be limited.
  3. Efficiency: unused capacity of one class should still be usable by others.

5.2 Scheduling mechanisms

The scheduler decides which queued packet is sent next:

Scheduler Operation
FIFO First in, first out. When the queue is full, drop: tail drop, priority drop, or random drop (RED/AQM).
Priority queuing High-priority packets always go first. Low priority can be starved.
Round Robin Visit the class queues in turn
Weighted Fair Queuing (WFQ) Round robin where each class i gets a guaranteed share wᵢ / Σw of the bandwidth

Modern Active Queue Management (AQM): CoDel and FQ-CoDel (the default in Linux and many home routers) fight bufferbloat, the extreme delay caused by very large buffers. L4S (see article 01) takes this further.

5.3 Policing: the token bucket

The token bucket limits how much traffic a source can send:

  • Tokens are added to a bucket at rate r tokens per second.
  • The bucket holds at most b tokens.
  • A packet may be sent only if there is a token, which it uses up.
  • Result: the amount of traffic in any interval t is at most r·t + b. So the average rate is r and the maximum burst is b.

Token bucket + WFQ together give a guaranteed upper limit on the delay.

5.4 Network neutrality

Should ISPs be allowed to treat traffic from certain applications or companies differently? The EU has strict net-neutrality rules (Regulation 2015/2120, with BEREC guidelines). Traffic management may be used for technical reasons, not for commercial discrimination. The Netherlands was one of the first countries to make net neutrality law (2012). In the US the rules have changed several times; in January 2025 a court struck down the FCC's net-neutrality rules.

6. Summary

  • Multimedia has different needs: throughput (streaming) or low delay (conversational).
  • Streaming uses buffering and adaptive bitrate over HTTP (DASH/HLS).
  • VoIP handles delay, jitter and loss with RTP timestamps, adaptive playout, FEC and interleaving. WebRTC brings this to the browser.
  • CDNs bring content close to users through DNS redirection and anycast.
  • QoS = marking (DSCP) + scheduling (priority, WFQ) + policing (token bucket). On the open Internet, dimensioning is the usual approach.

References

Videos

Articles

Standards

  • RFC 3550: RTP · RFC 3261: SIP · RFC 8216: HTTP Live Streaming · ISO/IEC 23009-1: MPEG-DASH
  • RFC 2474 / 2475: Differentiated Services · RFC 3246: Expedited Forwarding
  • RFC 8289: CoDel · RFC 8290: FQ-CoDel
  • RFC 8825: WebRTC overview

Tools


Cyber Security

Why it matters

  • VoIP fraud and abuse: badly secured SIP servers (e.g. Asterisk/FreePBX with weak passwords) are scanned constantly. Attackers use them to make expensive international calls (toll fraud, International Revenue Share Fraud). Losses can reach tens of thousands of euros in a weekend.
  • Eavesdropping: unencrypted RTP can be captured and played back directly with Wireshark (Telephony → RTP → Play Streams).
  • Caller ID spoofing: SIP lets the caller choose their own number. Criminals use this for phone scams (e.g. "bank employee" fraud, very common in the Netherlands), increasingly combined with AI voice cloning.
  • SIP/VoIP DoS: floods of INVITE or REGISTER messages make a phone system unreachable, which is critical for emergency services.
  • CDNs and security: CDNs hide the real server (origin) and absorb DDoS attacks. But they also see all the decrypted traffic (they terminate TLS), so they are a high-value target with a big impact when they fail, as the large Cloudflare outage of November 2025 showed.
  • Video conferencing: "Zoombombing" (2020) and meeting-ID guessing, plus questions about end-to-end encryption and recording.
  • QoS abuse: an attacker who marks their traffic as high priority (DSCP EF) can push out legitimate traffic, or bypass rate limits.
  • Malicious media files: parsing bugs in codecs and media libraries (e.g. libwebp CVE-2023-4863, BLASTPASS) have been used in zero-click exploits against phones.

How to make it safe

  1. Encrypt media and signalling: use SRTP (RFC 3711) for media and SIP over TLS (port 5061) for signalling. WebRTC does this by default (DTLS-SRTP).
  2. Harden SIP servers: strong, unique passwords per extension, fail2ban against brute-force attacks, restrict international and premium-number destinations, set spending limits, and don't expose the SIP port to the whole Internet (use a VPN or an IP allow list, or a Session Border Controller).
  3. Use caller authentication: STIR/SHAKEN (RFC 8224, 8588) cryptographically signs the caller ID. It is mandatory in the US. In the EU, operators block spoofed numbers more and more, and several countries, including the Netherlands, have taken measures against calls from abroad that pretend to come from a domestic number.
  4. Use a CDN/DDoS service in front of public services, and hide the origin server: accept traffic only from the CDN's IP ranges or through an authenticated tunnel.
  5. Re-mark DSCP at the network edge: don't trust QoS markings from end users. The router classifies traffic itself (trust boundary).
  6. Secure meetings: waiting rooms, passcodes, end-to-end encryption where available, and keep conference clients updated.
  7. Patch media libraries and apps quickly, and turn on features such as Apple's Lockdown Mode for high-risk users.

Extra references