0% found this document useful (0 votes)
3 views44 pages

CNS - Module 5 Notes - Multimedia Networking

Module 5 covers multimedia networking, focusing on properties of video and audio, types of multimedia applications, and streaming techniques. It discusses VoIP, real-time protocols, and network support for multimedia, emphasizing the importance of Quality of Service (QoS). Additionally, it explains Content Delivery Networks (CDNs) and their strategies for efficient video delivery.

Uploaded by

dsaclassespart1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views44 pages

CNS - Module 5 Notes - Multimedia Networking

Module 5 covers multimedia networking, focusing on properties of video and audio, types of multimedia applications, and streaming techniques. It discusses VoIP, real-time protocols, and network support for multimedia, emphasizing the importance of Quality of Service (QoS). Additionally, it explains Content Delivery Networks (CDNs) and their strategies for efficient video delivery.

Uploaded by

dsaclassespart1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Computer Networks and Security – 21CD61 Module 5

MODULE 5: MULTIMEDIA NETWORKING

MODULE 5: MULTIMEDIA NETWORKING

1. Multimedia Networking
 Properties of Video
 Properties of Audio
 Types of Multimedia Network Applications
2. Streaming Stored Video
 UDP Streaming
 HTTP Streaming
 Adaptive Streaming and DASH
 Content Distribution Networks (CDNs)
3. Voice over IP (VoIP)
 Limitations of the Best-Effort IP Service
 Removing Jitter at the Receiver for Audio
 Recovering from Packet Loss
4. Protocols for Real-Time Conversational Applications
 Real-time Transport Protocol (RTP)
 Session Initiation Protocol (SIP)
5. Network Support for Multimedia
 Determining the best-effort networks
 Providing multiple classes of service
 Policing
 DiffServ
 Per-Connection QoS Guarantees

Karthik M N, CS&D, MUSE, University of Mysore 1


Computer Networks and Security – 21CD61 Module 5

MODULE 5: MULTIMEDIA NETWORKING AND VOIP

5.1 MULTIMEDIA NETWORKING APPLICATIONS


A multimedia networking application refers to any application that transmits audio or video over a
network. Examples include:

 Streaming services like YouTube or Netflix


 VoIP services like Skype, Zoom
 Live broadcasting platforms like Facebook Live, Twitch

1. Properties of Video
1. High Bit Rate

 Video requires significantly more bandwidth than audio.


 Low-quality video conferencing: ~100 kbps
 HD video streaming: ~3 Mbps or more
 Higher bit rate = Better image quality and smoother playback

2. Video Compression

Compression reduces file size while maintaining acceptable quality.

Uncompressed Video

 Composed of a sequence of digital images (frames) shown at 24–30 frames/sec


 Each image = grid of pixels (with colour and brightness info)

Types of Redundancy

1. Spatial Redundancy
 Repetition within the same image
 Example: A scene with a blank wall, only needs to store one pixel and replicate
 Helps reduce file size without visible loss
2. Temporal Redundancy
 Repetition across sequential images (frames)
 Example: A person speaking with static background
 Instead of storing background each time, reuse it

Real-world Example:

 A YouTube video may use H.264 encoding to compress a 1080p HD video to stream at ~5
Mbps without quality loss to the viewer.

Karthik M N, CS&D, MUSE, University of Mysore 2


Computer Networks and Security – 21CD61 Module 5

2. Properties of Audio

Pulse Code Modulation (PCM)

PCM is the process of converting analog audio signals to digital format.

PCM Encoder Workflow

1. Sampling: Analog audio is sampled at a fixed rate


 Example: 8000 samples/sec
2. Quantization: Each sample is mapped to a finite set of values
 Example: 256 levels → represented by 8 bits/sample
3. Encoding: Bit values are concatenated to form a digital stream
 Data Rate = Samples/sec × Bits/sample
 Ex: 8000 × 8 = 64 kbps

PCM Decoder

 Converts digital data back to analog


 Higher sampling rate + quantization levels → better quality
 Trade-off: Better quality = Higher storage and bandwidth needs

Summary Table: PCM Parameters

Parameter Value
Sampling Rate 8000 samples/sec
Quantization Levels 256 (8 bits)
Bit Rate 64 kbps
Trade-off Quality vs Bitrate

3. Types of Multimedia Network Applications


1. Streaming Stored Audio/Video

Examples:

 Netflix, YouTube, Amazon Prime

Key Characteristics:

1. Streaming
Karthik M N, CS&D, MUSE, University of Mysore 3
Computer Networks and Security – 21CD61 Module 5

Playout starts before entire file is downloaded


 Data is fetched ahead (buffering)
2. Interactivity
 Users can pause, rewind, fast-forward
3. Continuous Playout
 Must maintain original timing
 Packet delay can lead to frame skipping or freezing

2. Conversational Voice/Video-over-IP (VoIP)

Examples:

 Skype, Zoom, WhatsApp Video Call, Google Meet

Key Features:

 Two-way real-time communication


 Supports audio + video + text/chat

Important QoS (Quality of Service) Aspects:

Factor Explanation
Timing Delay-sensitive; must arrive in real time
Loss Tolerance Occasional packet loss is acceptable (brief audio glitches)

Real-world Tools:

 Skype: Supports voice, video, and group conferencing


 Google Meet: Used for educational and enterprise meetings

4. Streaming Live Audio/Video


Examples:

 Live Sports Broadcast, Online Radio, Webinars, Twitch

Key Characteristics:

 Like broadcast TV/radio, but over Internet


 Requires real-time delivery
 Listeners/viewers receive same data at the same time

Karthik M N, CS&D, MUSE, University of Mysore 4


Computer Networks and Security – 21CD61 Module 5

Example:

 A live cricket match stream viewed simultaneously by users around the world.

Additional Examples of Multimedia Apps

Application Type Examples


Stored Streaming YouTube, Netflix, Amazon Prime
Conversational VoIP Skype, Zoom, WhatsApp Call
Live Streaming Twitch, Facebook Live, Hotstar

Summary Points
 Video requires high bandwidth and uses compression to reduce data.
 Audio uses PCM, with trade-offs between quality and bandwidth.
 Multimedia apps fall into three main categories:
 Stored streaming
 Conversational VoIP
 Live streaming
 VoIP and video calls are delay-sensitive but loss-tolerant.
 Live broadcasts demand high throughput and synchronized delivery.

5.2 STREAMING STORED VIDEO


Overview

 Streaming stored video refers to playing pre-recorded videos directly from a server without
downloading the entire file first.
 Examples: YouTube, Netflix, Amazon Prime Video
 Users can pause, seek, or fast-forward due to the pre-recorded nature of content.

Key Concepts:

 Client-side buffering is used extensively


 Helps handle:
 Delay variation (jitter)
 Bandwidth fluctuation

Karthik M N, CS&D, MUSE, University of Mysore 5


Computer Networks and Security – 21CD61 Module 5

Categories of Streaming Applications

1. UDP Streaming
2. HTTP Streaming
3. Adaptive HTTP Streaming (DASH)

1. UDP Streaming

Working:

 Server sends video at the same rate the client consumes it.
 Uses UDP for data transmission
 RTSP (Real-Time Streaming Protocol) used for control commands (pause, resume, seek)
 Video chunks are wrapped in RTP (Real-time Transport Protocol) packets.

Advantages:

 Low latency
 Real-time video delivery

Disadvantages:

Issue Explanation

Unreliability UDP doesn't guarantee delivery; leads to missing frames

Complexity Needs separate media control server to manage RTSP sessions

Firewall issues UDP is often blocked by firewalls and NATs

2. HTTP Streaming
Karthik M N, CS&D, MUSE, University of Mysore 6
Computer Networks and Security – 21CD61 Module 5

Working:

 Video stored on a regular HTTP server


 Client:
1. Establishes TCP connection
2. Sends HTTP GET request for video file
3. Receives video in chunks
 Playback begins after initial buffering threshold is met

Advantages:

Feature Benefit

No special server No need for RTSP—simple deployment

Firewall friendly HTTP over TCP passes through firewalls/NAT

Prefetching Client downloads data faster than playback, stores it in buffer

Repositioning & Early Termination

 Byte-range requests in HTTP GET allow:


 Jumping to a specific time/position in the video
 Fetching only relevant data chunks

Disadvantage:

 Perfected data wasted if user jumps to a different section mid-playback → wasted


bandwidth.

3. Adaptive Streaming (DASH)

Problem with Standard HTTP Streaming:

 All clients receive same quality video, regardless of their available bandwidth.

DASH – Dynamic Adaptive Streaming over HTTP

Key Concept:

 Server stores multiple versions of each video (different bitrates/resolutions)


 Client selects version dynamically based on its measured network speed

Karthik M N, CS&D, MUSE, University of Mysore 7


Computer Networks and Security – 21CD61 Module 5

Files Stored on Server:

1. Video Chunks at different qualities (with different URLs)


2. Manifest File (MPD) listing:
 All available versions
 Bitrates
 URLs for chunks

How DASH Works:

Step Operation

1 Client requests manifest file

2 Chooses version based on bandwidth

3 Sends HTTP GET for specific chunk + byte range

4 Monitors bandwidth while downloading

5 Switches to higher/lower quality chunk as bandwidth changes

Especially useful for:

 Mobile devices, where network speed can fluctuate due to movement

Advantages of DASH:

Feature Explanation

Continuous Playout Avoids stalling/freeze by adapting to bandwidth

Client Intelligence Client decides what to fetch; reduces server load

Fine-grained Control Client controls how much to prefetch (via byte-range requests)

Example:

A mobile user watching Netflix:

 Starts watching at 720p over Wi-Fi


 Moves outdoors → bandwidth drops
 DASH shifts playback to 480p automatically
 Video never pauses or buffers excessively

Karthik M N, CS&D, MUSE, University of Mysore 8


Computer Networks and Security – 21CD61 Module 5

Summary Table

Feature UDP Streaming HTTP Streaming DASH (Adaptive HTTP)

Transport Protocol UDP TCP TCP

Control Protocol RTSP HTTP HTTP

Buffering Small client buffer Large client buffer Adaptive client buffer

Dynamic based on
Quality Adaptation Not adaptive Fixed video version
bandwidth

Firewall
Limited Excellent Excellent
Compatibility

Modern streaming
Use Case Specialized low-latency Standard web streaming
platforms

Points to Remember

 Client-side buffering smooths playback under varying network conditions


 UDP Streaming offers low latency but is unreliable and firewall-unfriendly
 HTTP Streaming is simple and reliable but non-adaptive
 DASH is the modern standard, offers adaptive quality, efficient buffering, and good scalability

4. Content Delivery Networks (CDNs)

Motivation for CDN

Traditional Streaming Setup:

 A single massive data center stores and serves videos to all users.

Limitations of Single Data Center Model:

Problem Explanation

Throughput over distant or weak links may drop below video consumption
Delay Issues
rate → playback stalls

Karthik M N, CS&D, MUSE, University of Mysore 9


Computer Networks and Security – 21CD61 Module 5

Problem Explanation

Bandwidth
Same popular video sent repeatedly over same long-distance links
Wastage

Single Point of
Entire service fails if the central server crashes or becomes unreachable
Failure

Solution: Content Delivery Network (CDN)

 A CDN is a geographically distributed system of servers designed to:


 Cache and deliver content (especially video) more efficiently
 Reduce latency
 Improve reliability and scalability

Types of CDN

Definition:

 A CDN manages multiple distributed servers that cache videos and redirects user requests to
the best server.

Two Types of CDN:

1. Private CDN

 Owned and operated by the content provider itself.


 Example:
Google’s CDN used for YouTube content delivery.

Karthik M N, CS&D, MUSE, University of Mysore 10


Computer Networks and Security – 21CD61 Module 5

2. Third-party CDN

 Managed by companies serving multiple content providers.


 Examples: Cloudflare, Akamai, Fastly

CDN Server Placement Strategies:

1. Enter Deep

 Deploy server clusters deep inside ISPs’ access networks around the world.
 Goal: Get physically close to users
 Improves delay & throughput
 High maintenance cost (due to scattered deployments)

2. Bring Home

 Place large server clusters at key Internet exchange points (near major ISP PoPs)
 Lower operational overhead
 Slightly higher delay for end-users (since not embedded deep)

CDN Operation

General Workflow:

CDN Workflow Example: "NetCinema" uses "KingCDN"

Request: [Link]

Karthik M N, CS&D, MUSE, University of Mysore 11


Computer Networks and Security – 21CD61 Module 5

DNS Redirection Steps:

Step Description

1 User visits NetCinema's webpage

2 User clicks video URL ([Link])

Local DNS sends query → NetCinema’s authoritative DNS returns CDN alias (e.g.,
3
[Link])

4 Local DNS queries [Link] → KingCDN returns IP of closest cluster

5 IP sent to user → client connects via TCP

6 Client sends HTTP GET to the selected CDN server for video content

CDN Cluster Selection Strategies

To optimize delivery, CDNs must decide which cluster will serve each request.

1. Geographically Closest Strategy

 Use GeoIP databases to match LDNS IP to user location.


 Assign user to the nearest CDN cluster.
Karthik M N, CS&D, MUSE, University of Mysore 12
Computer Networks and Security – 21CD61 Module 5

Pros:

 Simple and works well in many cases

Cons:

 Physical closeness ≠ path closeness


 LDNS may not represent the user's exact location

2. Traffic-Aware Strategy

 CDN servers probe LDNSs worldwide to measure:


 Latency
 Packet loss
 Choose cluster based on real-time network performance

Limitation:

 Many DNS servers are configured not to respond to such probes → reduces effectiveness

3. IP Anycast

 All CDN clusters share the same IP address


 CDN advertises the same IP using BGP (Border Gateway Protocol) from multiple
locations

Working:

1. Assign same IP to all CDN clusters


2. Advertise routes from different locations
3. BGP routers choose the "best" (usually closest) route

Advantage:

 Simple and efficient routing by the network infrastructure

Summary Table

Feature Private CDN Third-Party CDN

Ownership By content provider External company

Karthik M N, CS&D, MUSE, University of Mysore 13


Computer Networks and Security – 21CD61 Module 5

Feature Private CDN Third-Party CDN

Examples Google (YouTube) Akamai, Cloudflare

Control Full control Shared control

Scalability Medium High

Setup Cost High Lower (outsourced infra)

Strategy Methodology Pros Cons

Geolocation Uses location of LDNS Simple, fast lookup Inaccuracy if LDNS ≠ client

Traffic-
Uses real-time probing Can deliver better performance LDNS may block probes
aware

Same IP advertised via


IP Anycast Simple routing, no probing needed Less fine-grained control
BGP

Real-world Examples:

 YouTube:
 Uses private CDN with deep placement
 Netflix:
 Uses Open Connect (custom CDN)
 Cloudflare CDN:
 Third-party CDN serving millions of websites

Key Takeaways

 CDNs reduce delay, bandwidth usage, and server load


 Two main server deployment models: Enter Deep and Bring Home
 Cluster selection can be based on geography, performance metrics, or IP anycast
 DNS plays a central role in redirecting client requests
 CDNs are essential for scalable and smooth video delivery

5.3 VOICE-OVER-IP (VOIP)


Introduction to VoIP

 VoIP (Voice over Internet Protocol) allows real-time voice communication over the Internet.
 Also called Internet Telephony.
 Unlike traditional phone networks, VoIP transmits voice as data packets.

Karthik M N, CS&D, MUSE, University of Mysore 14


Computer Networks and Security – 21CD61 Module 5

5.3.1 Limitations of Best-Effort IP Service


The Internet’s IP protocol provides best-effort service, meaning:

 No guarantee of delivery
 No guarantee on delay
 No guarantee on bandwidth

Three Major Challenges for VoIP:

1. Packet Loss

 VoIP uses UDP (User Datagram Protocol), which:


 Does not guarantee delivery
 Has no retransmission or acknowledgment
 When router buffers overflow, IP datagrams may be dropped.
 Packet loss reduces audio quality, causes gaps or silences.

Why not TCP?

 Though TCP ensures reliability, retransmissions cause delays, unacceptable in real-time


audio.

2. End-to-End Delay

Delays accumulate from:

Type of Delay Source

Transmission Delay Time to push packet onto the link

Processing Delay Time for routers to process packet

Queuing Delay Time in router queues

Propagation Delay Time to travel through physical media

Application Delay Encoding/decoding, buffering, etc.

Delay Thresholds for VoIP:

Karthik M N, CS&D, MUSE, University of Mysore 15


Computer Networks and Security – 21CD61 Module 5

Delay (ms) Perception

≤ 150 ms Good (imperceptible)

150 – 400 ms Acceptable but noticeable

> 400 ms Poor interactivity

3. Jitter

 Jitter = variation in packet arrival times


 Caused by varying queue lengths and routing paths
 Can make audio choppy or unintelligible
 Solution: Use buffering, sequence numbers, timestamps at receiver

5.3.2 Removing Jitter at the Receiver


To deal with jitter, the receiver uses:

1. Timestamps

 Each chunk is tagged by the sender with a timestamp.


 Indicates when the chunk was generated, not received.

2. Playout Delay

 Receiver delays playback to allow for out-of-order or late packets.


 Ensures smooth and regular playout.
 Two strategies:

Strategy Description

Fixed Delay Delay remains constant throughout the session

Adaptive Delay Adjusts delay based on real-time network jitter

5.3.3 Recovering from Packet Loss


Loss is defined as:

 Packet never arrives, or

Karthik M N, CS&D, MUSE, University of Mysore 16


Computer Networks and Security – 21CD61 Module 5

 Packet arrives after its playout time

VoIP does not retransmit. Instead, uses anticipation and concealment techniques.

1. Forward Error Correction (FEC)

Add redundancy to reconstruct lost packets.

1. Block Coding

 Every n chunks → 1 redundant chunk (XOR of all n chunks)


 Receiver can recover any 1 lost packet per group

Pros:
 Can recover some lost packets

Cons:
 Fails if 2+ packets lost in a group
 Increases playout delay

2. Low-Resolution Redundant Stream

 Send low-bitrate backup version of previous chunk with each packet.

Example:
For nth packet

→ Include current nominal chunk (high-quality)

→ Include (n–1) th chunk from low-quality backup stream

Pros:

Karthik M N, CS&D, MUSE, University of Mysore 17


Computer Networks and Security – 21CD61 Module 5

 Can substitute low-res audio if packet is lost

Think of it as “piggybacking redundancy”

2. Interleaving

 Sender rearranges audio units in packets so that adjacent units are spread apart
 Helps spread the loss over time → loss is less noticeable

Example:
If audio units are 5 ms and chunks are 20 ms:

 Chunk 1: units 1, 5, 9, 13
 Chunk 2: units 2, 6, 10, 14, etc.

Pros:
 Improves perceived audio quality
 Does not increase bandwidth

Cons:
 Adds latency
 Not suitable for extremely low-delay VoIP

3. Error Concealment (at Receiver)

Used after packet loss, tries to replace lost packets.

1. Packet Repetition

 Repeat previous packet for the lost one

Karthik M N, CS&D, MUSE, University of Mysore 18


Computer Networks and Security – 21CD61 Module 5

 Simple
 Low overhead
 May sound unnatural

2. Interpolation

 Use preceding and succeeding packets to synthesize a missing one


 Higher quality than repetition
 More natural-sounding
 Slightly more processing

Summary Table

Concept Description VoIP Relevance

Used instead of TCP to avoid delay from


UDP Real-time requirement
retransmission

Packet Loss Common due to buffer overflows Degrades audio quality

Jitter Delay variability causes unsynchronized audio Use of jitter buffers, timestamps

End-to-End Delay Should be <150 ms ideally Higher delays reduce interactivity

FEC Add redundancy to recover lost data Increases delay, helps recovery

Interleaving Spread data to reduce impact of loss Adds latency

Error Reconstruct missing packets (repetition or


No bandwidth cost, receiver-side
Concealment interpolation)

Real-World Analogy

 VoIP is like sending live voice messages over a highway.


 UDP just drops them off and hopes they reach.
 Jitter is like cars getting delayed by traffic jams.
 Packet loss is when some messages fall off the truck.
 FEC is like sending backup copies.
 Error concealment is like trying to guess the missing parts.

Karthik M N, CS&D, MUSE, University of Mysore 19


Computer Networks and Security – 21CD61 Module 5

5.4 PROTOCOLS FOR REAL-TIME


CONVERSATIONAL APPLICATIONS
Introduction

Real-time applications such as Voice over IP (VoIP) and video conferencing require data to be
delivered with minimal delay. These applications are delay-sensitive and often loss-tolerant.

Standards Bodies Supporting Real-Time Protocols:

Two major organizations have developed standards for these real-time services:

Standards
Full Form Role
Body
Designs internet-related protocols, including
IETF Internet Engineering Task Force
RTP, SIP
International Telecommunication Develops telecommunication standards, such as
ITU
Union H.323

These standards are widely used and implemented in industry-grade products such as Skype, Zoom,
Google Meet, and Webex.

5.4.1 Real-Time Transport Protocol (RTP)


RTP is the key protocol used for delivering audio and video over IP networks.

Uses of RTP:

 Transports audio formats like MP3, PCM


 Transports video formats like MPEG, Motion JPEG
 Also supports proprietary formats
 Often used in conjunction with SIP (Session Initiation Protocol) for signalling

Example: RTP carries the audio of a Zoom call, while SIP manages the call setup, teardown, and
user authentication.

RTP Basics

 RTP runs on top of UDP (User Datagram Protocol)


 Each RTP packet consists of:

1. RTP Header
2. Audio/Video Chunk (Payload)

Karthik M N, CS&D, MUSE, University of Mysore 20


Computer Networks and Security – 21CD61 Module 5

Packet Flow:

Sender Receiver
Media chunk → RTP packet → UDP segment IP datagram → UDP segment → RTP packet →
→ IP datagram Media chunk
Header is added to each chunk Extracted and passed to media player

RTP does NOT provide:

 Timely delivery guarantees


 Packet delivery guarantees (uses UDP, which is connectionless)
 In-order packet delivery
 Quality-of-Service (QoS) guarantees

Example: If there's congestion in the network, some RTP packets might arrive late or be dropped —
which may result in glitches in the call.

Interoperability

If two applications (e.g., Skype and Zoom) both use RTP, their users can potentially communicate
seamlessly over a shared RTP stream.

Stream Management using RTP

 RTP assigns a separate stream for each media source

Example: In a 1-to-1 video call:

 Two RTP streams for audio (one in each direction)


 Two RTP streams for video (one in each direction)

If MPEG is used (which combines audio and video), only one RTP stream per direction is needed.

 RTP also supports multicasting (one-to-many or many-to-many) — useful in webinars or


online classes.

RTP Packet Header Fields


Each RTP packet includes a header with important metadata.

Karthik M N, CS&D, MUSE, University of Mysore 21


Computer Networks and Security – 21CD61 Module 5

1. Payload Type

 Indicates the format/encoding of the payload


 Audio examples:
 PCM (Pulse Code Modulation)
 GSM
 ADPCM
 Video examples:
 MPEG
 Motion JPEG

2. Sequence Number

 A 16-bit number that increments by 1 for each RTP packet


 Used by receiver to:
 Detect lost packets
 Re-order out-of-order packets

Example: If packets 1001, 1002, and 1004 are received, it's clear that 1003 was lost.

3. Timestamp

 Derived from the sender's sampling clock


 Represents the sampling instant of the first byte in the payload
 Helps with:
 Removing jitter (variability in packet arrival)
 Synchronous playback

Karthik M N, CS&D, MUSE, University of Mysore 22


Computer Networks and Security – 21CD61 Module 5

Example: Audio data from a microphone sampled at 44.1 kHz will have timestamps increasing
by 1/44100 seconds.

4. Source Identifier (SSRC)

 Uniquely identifies the source of the stream


 In a conference, each participant’s stream has a distinct SSRC

Example: In a group call, your audio stream will have a different SSRC than others, enabling the
media player to distinguish and mix the voices.

Summary Table of RTP Header Fields:

Field Description
Payload Type Type of encoding (e.g., PCM, MPEG)
Sequence Number Used for loss detection and reordering
Timestamp Sampling time of first byte
SSRC Identifies the stream’s source

Conclusion

 RTP is essential for transmitting multimedia in real-time


 While it doesn't guarantee delivery or order, it's highly adaptable and works well when
combined with other protocols like SIP
 RTP is the foundation of modern VoIP and video conferencing platforms

5.4.2 Session Initiation Protocol (SIP)

Overview

SIP (Session Initiation Protocol) is an open-standard, lightweight signalling protocol used to set up,
manage, and terminate multimedia communication sessions over IP networks.

SIP is to VoIP what HTTP is to the Web, it's used for starting and ending calls (not for transferring
media).

Key Functions of SIP

Function Description

Session Establishment Establishes sessions between caller and callee

Karthik M N, CS&D, MUSE, University of Mysore 23


Computer Networks and Security – 21CD61 Module 5

Function Description

Call Notification Informs the callee that someone wants to communicate

Media Negotiation Negotiates the type of encoding (e.g., audio codec like AVP0 or AVP3)

Session Termination Allows participants to end the call

Location Lookup Determines the current IP address of the callee

Call Management Enables adding streams, changing codec, holding, transferring calls

1. Setting up a Call to a Known IP Address

Scenario: Alice Calls Bob

 Alice and Bob have SIP-enabled devices and know each other’s IP addresses.

SIP Call Setup Steps:

Karthik M N, CS&D, MUSE, University of Mysore 24


Computer Networks and Security – 21CD61 Module 5

Step Action

Alice sends an INVITE to Bob (at IP [Link]) via UDP port 5060. The invite
1
includes:

 Bob’s identifier (bob@[Link])


 Alice’s IP address
 Requested codec: AVP 0
 Bob replies with 200 OK, which includes:
 His IP address
 His preferred codec: AVP 3
 Alice sends an ACK (acknowledgment) to confirm
 Media session begins using RTP on a separate channel

Characteristics of SIP:

Feature Description

Out-of-band protocol SIP messages are sent on different ports/sockets than media

Human-readable format SIP messages resemble HTTP (plain-text ASCII)

Supports UDP/TCP SIP messages can run on either protocol (though mostly UDP)

2. SIP Messages – Structure & Explanation

Example SIP INVITE Message (sent by Alice):

1. INVITE sip:bob@[Link] SIP/2.0


2. Via: SIP/2.0/UDP [Link]
3. From: Alice <sip:alice@[Link]>
4. To: Bob <sip:bob@[Link]>
5. Call-ID: 123456@alice-pc
6. Content-Type: application/sdp
7. Content-Length: 885
8. c=IN IP4 [Link]
9. m=audio 49170 RTP/AVP 0

Line-by-Line Explanation:

Karthik M N, CS&D, MUSE, University of Mysore 25


Computer Networks and Security – 21CD61 Module 5

Line Meaning

L1 INVITE... SIP version, target user (Bob)

L2 Via Sender’s IP (Alice)

L3–L4 From/To Identifiers (like email headers)

L5 Call-ID Unique ID for this session

L6 Content-Type Format of body (SDP = Session Description Protocol)

L7 Content-Length Byte size of message body

L8–L9 Media session details (e.g., audio using AVP 0 on RTP)

3. Name Translation & User Location

Problem:

Users don’t always know the callee’s IP address, only their SIP address (like email, e.g.,
bob@[Link]).

Solution: SIP Proxies and Registrars

Component Function

SIP Proxy Receives SIP INVITE requests, forwards them to destination registrar

SIP Registrar Keeps track of a user’s current IP address (like DNS for SIP)

Example: Session Initiation with Proxies and Registrars

 Jim wants to call Keith.


 Jim's SIP: jim@[Link] (IP: [Link])
 Keith's SIP: keith@[Link] → later at keith@[Link] (IP: [Link])

Steps in SIP Resolution:

Karthik M N, CS&D, MUSE, University of Mysore 26


Computer Networks and Security – 21CD61 Module 5

1. Jim sends INVITE to umass SIP proxy


2. Umass proxy does a DNS lookup for [Link]
3. Upenn registrar says Keith is not registered
4. Umass proxy redirects the INVITE to eurecom registrar
5. Eurecom knows Keith’s IP → forwards INVITE to [Link]
6–8. SIP response travels back through proxies
6. Media session begins directly between Jim and Keith using RTP

This process ensures location independence, users can move devices but still receive calls.

Analogy: SIP vs DNS


SIP Registrar DNS
Maps human SIP IDs to dynamic IPs Maps hostnames to static IPs
Updated frequently Mostly static or cached

Summary Table: SIP Features

Feature Description

Port UDP/TCP 5060

Signalling Sets up, manages, and ends sessions

Media Handling Works with RTP for audio/video

Format Text-based (like HTTP)

Transport Runs on both TCP and UDP

Karthik M N, CS&D, MUSE, University of Mysore 27


Computer Networks and Security – 21CD61 Module 5

Feature Description

Location Resolution Uses proxies and registrars to resolve dynamic IPs

Comparison: SIP vs RTP

Feature SIP RTP

Role Signalling protocol Media transport protocol

Handles Media? No Yes

Transport Layer UDP/TCP UDP only

Format Text-based Binary

Reliability Acknowledged Unacknowledged

Used for Call setup, management Real-time media delivery

Real-World Applications of SIP


Application Use of SIP
Zoom/Skype/MS Teams Call setup, user authentication
WhatsApp/Signal Voice/video call setup
WebRTC SIP used for signalling

Conclusion

 SIP is an essential protocol for setting up, managing, and ending real-time multimedia sessions
like VoIP.
 It works in coordination with RTP, which handles the actual data transmission.
 Its architecture using registrars and proxies allows flexibility, mobility, and dynamic IP
management.

5.5 NETWORK SUPPORT FOR MULTIMEDIA


Multimedia applications like video conferencing, IP telephony, and live streaming demand real-time
data delivery with constraints on delay, jitter, packet loss, and bandwidth.

To support such applications, the network must offer specialized services beyond traditional best-
effort delivery.

Karthik M N, CS&D, MUSE, University of Mysore 28


Computer Networks and Security – 21CD61 Module 5

Overview: Three Key Network Support Approaches

Approach Description Use Case


Uses application-level techniques to Suitable when network congestion
1. Best-effort Service
cope with packet delay/loss is rare
2. Differentiated Service Assigns priorities to traffic types at the Real-time traffic prioritized over
(DiffServ) router level non-real-time
3. Per-Connection QoS End-to-end resource reservation and VoIP calls, video conferencing
Guarantees guaranteed performance with SLA

1. Making the Best of Best-effort Service


 Definition: No guarantees for delay or packet loss. Applications must cope with variations.
 Technique: Add more bandwidth and routing resources proactively before congestion
occurs.
 Example:
 A university streaming online lectures can add capacity during exam weeks when
usage spikes.

Real-world scenario: A YouTube video adjusts resolution dynamically using adaptive streaming
based on network conditions.

2. Differentiated Services (DiffServ)

Karthik M N, CS&D, MUSE, University of Mysore 29


Computer Networks and Security – 21CD61 Module 5

 Definition: Prioritize one type of traffic over another when both are queued at a router.
 Router Behaviour: Uses packet marking and classification.

Example:

 VoIP packets (real-time) are marked high priority.


 HTTP packets (non-real-time) are marked lower.
 Router will forward VoIP packets first, ensuring low latency.

Challenge: High-priority flows might starve lower-priority flows unless carefully managed.

3. Per-Connection QoS Guarantees


 Definition: Reserve end-to-end bandwidth and processing capability for each application.
 Two types of guarantees:
 Hard Guarantee: Guaranteed performance (like fixed 500ms delay).
 Soft Guarantee: High probability of meeting performance, but no certainty.

Example:
 A corporate Zoom call requests 1 Mbps guaranteed bandwidth across all routers.
This is used in IntServ (Integrated Services) with RSVP (Resource Reservation Protocol).

5.5.1 Dimensioning Best-effort Networks

Key Concepts

Term Description
Bandwidth Provisioning Determining link capacity to meet performance targets
Network Dimensioning Designing network topology for expected performance

Three Considerations

1. Traffic Demand Models


 Call level: Users starting apps (e.g., zoom sessions).
 Packet level: Data generated (e.g., audio/video packets).
2. Performance Requirements
 For delay-sensitive apps:

“What is the chance that end-to-end delay exceeds 150ms?”

3. Performance Prediction Models


 Used to allocate resources cost-effectively while meeting all users’ needs.

Karthik M N, CS&D, MUSE, University of Mysore 30


Computer Networks and Security – 21CD61 Module 5

5.5.2 Providing Multiple Classes of Service

Basic Idea

 Traffic is categorized into classes (e.g., VoIP, HTTP).


 Different priority or bandwidth is given to each class.

Example:

Traffic Type Priority


VoIP High
Email/HTTP Low

ISP ensures VoIP calls are smooth, even during network congestion.

1. Motivating Scenario

Scenario:

 Hosts H1 and H2 (audio and HTTP) send data to H3 and H4.


 Routers connect via a 1.5 Mbps link.

Problem:

 HTTP packets fill up the router's queue.


 Audio packets get delayed or dropped → poor call quality.

Solution:

Karthik M N, CS&D, MUSE, University of Mysore 31


Computer Networks and Security – 21CD61 Module 5

 Use priority scheduling.


 Audio packets always sent first.

Key Insights

Insight 1: Packet Marking

 Packets can be tagged to indicate their traffic class (e.g., EF = Expedited Forwarding).
 Routers can process based on these tags.

Insight 2: Traffic Isolation

 Prevent misbehaving traffic (e.g., excessive VoIP) from starving others.


 Need for isolation mechanisms.

Isolation among Traffic Classes


Two Main Approaches:

1. Traffic Policing

 Ensures a class does not exceed allowed bandwidth.


 If exceeded → packets are dropped or delayed.

Example:

 Audio traffic limited to 1 Mbps.


 If it exceeds, excess packets are discarded.

Leaky Bucket Policing

 Allows data to "leak" out of a buffer at a steady rate.


 Ensures flow rate stays under control.

2. Packet Scheduling

 Fixed bandwidth allocation to each traffic class.

Example:

Karthik M N, CS&D, MUSE, University of Mysore 32


Computer Networks and Security – 21CD61 Module 5

Traffic Class Bandwidth


Audio 1 Mbps
HTTP 0.5 Mbps

 Router R1 ensures this division using Weighted Fair Queuing (WFQ) or similar algorithm.

Insight 3: Efficient Resource Usage

 Aim: Maintain isolation without wasting bandwidth.


 If HTTP traffic is low, unused bandwidth can be borrowed by audio traffic.

Summary Table

Feature Best-effort Differentiated Service Per-Connection QoS


Guarantee None Priority-based Explicit reservation
Setup No setup Packet marking Requires signalling (e.g., RSVP)
Complexity Low Medium High
Examples Email, Web VoIP (DiffServ) Video conferencing (IntServ)

Final Notes

 Supporting multimedia apps requires more than just increasing bandwidth.


 ISPs and enterprises must design policies combining:
 Dimensioning
 Traffic classification
 Policing
 Scheduling
 Balancing efficiency and fairness is key in multimedia networking.

2. Scheduling Mechanisms
Queue scheduling determines how packets queued at a network device (like a router or switch) are
selected for transmission when the link becomes available. This impacts latency, fairness, and the
ability to guarantee QoS.

1. FIFO (First-In-First-Out) Queueing

Definition:
FIFO scheduling transmits packets in the exact order they arrive. The first packet that enters the queue
is the first one to leave.

Karthik M N, CS&D, MUSE, University of Mysore 33


Computer Networks and Security – 21CD61 Module 5

Working:

 All packets share a single queue.


 If the link is busy, arriving packets wait.
 If the buffer is full, new packets are dropped (tail drop).
 Once a packet is completely transmitted, the next packet begins transmission.

Disadvantages:

1. No QoS support: All flows are treated equally, regardless of importance.


2. Hogging: If a single user sends at a high rate, it can monopolize the buffer and delay or drop
other users’ packets.

Example:
If a VoIP packet and a large video packet arrive simultaneously, VoIP (delay-sensitive) may be
delayed behind the video packet, degrading voice quality.

2. Priority Queuing (PQ)

Definition:
Packets are assigned to multiple queues based on priority levels (e.g., high, medium, low). The
scheduler always selects packets from the highest priority non-empty queue.

Karthik M N, CS&D, MUSE, University of Mysore 34


Computer Networks and Security – 21CD61 Module 5

Working:

 Each priority level has its own queue.


 Within each queue, packets are served in FIFO order.
 Non-pre-emptive: Once a lower-priority packet transmission begins, it is completed even if a
higher-priority one arrives.

Disadvantages:

1. Starvation: Lower-priority packets may suffer from long delays or get dropped.
2. Intra-priority unfairness: Users with the same priority may still hog the queue.
3. No guaranteed minimum bandwidth for lower priorities.

Example:
A real-time voice packet (high priority) and email traffic (low priority) arrive. The voice packet will
always be transmitted first. If high-priority traffic is constant, email may never be sent.

3. Round Robin Queuing (RRQ)

Definition:
Each class (or user flow) is served in equal turns, one after another.

Karthik M N, CS&D, MUSE, University of Mysore 35


Computer Networks and Security – 21CD61 Module 5

Working:

 Every flow/class has its own logical queue.


 The scheduler cycles through queues, sending one packet (or byte/bit) per turn.
 If a queue is empty, it is skipped.

Advantages:

 Ensures fairness among flows.


 Work-conserving: never wastes time when there is data to send.

Disadvantages:

 Can cause delay for time-sensitive data if their turn is far away.
 More processing overhead due to round-robin logic.

Example:
With two flows (voice and video), the scheduler transmits one voice packet, then one video packet,
and repeats. Both get equal share, regardless of data urgency.

4. Weighted Fair Queuing (WFQ)

Definition:
WFQ improves upon RRQ by giving weights to flows. A flow with more weight gets more share of
the bandwidth.

Karthik M N, CS&D, MUSE, University of Mysore 36


Computer Networks and Security – 21CD61 Module 5

Working:

 Each user flow has a separate queue.


 A weight is assigned to each queue (e.g., 1, 2, 4).
 Scheduler transmits packets proportional to weight.
 Work-conserving: idle queues don’t block others.

Advantages:

 Provides QoS guarantees.


 Supports differentiated services by assigning higher weights to important flows.

Disadvantages:

 Slightly complex to implement.


 Needs calibration of weights to match performance needs.

Example:
If buffer A has weight 1 and buffer B has weight 3:

 A gets 25% bandwidth


 B gets 75% bandwidth this is suitable when buffer B is carrying video and A is carrying
emails.

4.1 Policing: The Leaky Bucket

Policing regulates the rate and burstiness of traffic sent into a network. It enforces traffic constraints
to prevent congestion and ensure fair use of resources.

Karthik M N, CS&D, MUSE, University of Mysore 37


Computer Networks and Security – 21CD61 Module 5

Key Parameters of Policing:

1. Average Rate:
 Long-term allowed data rate (e.g., 1 Mbps sustained).
2. Peak Rate:
 Short-term maximum transmission rate (e.g., bursts up to 2 Mbps).
3. Burst Size:
 Maximum number of packets or bytes allowed in a burst (e.g., 20 packets in one burst).

Leaky Bucket Operation

Concept:

 Imagine a bucket with a small hole at the bottom.


 Water (packets) drips out at a constant rate.
 If water (packets) is added faster than it leaks, the bucket overflows → excess packets are
discarded.

Mechanism:

 Tokens are generated at a fixed rate.


 Tokens accumulate in a bucket (up to its capacity).
 Each packet requires a token to be transmitted.
 If tokens are unavailable, packets must wait or get dropped.

Use in Networks:

 Controls traffic flow to prevent buffer overflow.


 Enforces QoS constraints by ensuring no user sends beyond agreed parameters.

Karthik M N, CS&D, MUSE, University of Mysore 38


Computer Networks and Security – 21CD61 Module 5

Example:
Suppose a bucket can hold 10 tokens and generates 1 token every 10 ms:

 A user can send a burst of 10 packets immediately.


 After that, they can send 1 packet every 10 ms.
 Sending more than 1 every 10 ms results in drops.

Summary Table

Queuing Technique QoS Support Fairness Complexity Use Case


1. FIFO None Low Simple Best-effort traffic
2. Priority Queuing Partial Low Moderate VoIP prioritization
3. Round Robin Equal share Good Moderate Balanced services
4. Weighted Fair
High High High Differentiated QoS
Queuing
5. Leaky Bucket Rate Control Fair Moderate Traffic shaping

5.5.3 Differentiated Services (DiffServ)

Overview:

DiffServ (Differentiated Services) is an architecture designed to provide Quality of Service (QoS) for
a wide range of network traffic types (like video, VoIP, browsing). It works by classifying and
managing packets differently based on their priority or service class.

Key Characteristics:

 Scalable and Simple QoS Model.


 Uses "Per-Hop Behaviour (PHB)" for routing decisions.
 Provides service differentiation, meaning different classes of traffic are treated differently
across the Internet.

Karthik M N, CS&D, MUSE, University of Mysore 39


Computer Networks and Security – 21CD61 Module 5

Definition of Differentiation:

“The ability to handle different classes of traffic in different ways within the Internet.”

DiffServ Architecture:

DiffServ has two major functional elements:

1. Packet Classification & Traffic Conditioning

1. Traffic Classifier:

 Examines packet headers to decide how to treat each packet.


 Example: Classify packets based on source/destination IP, protocol type, etc.

2. Traffic Profile:

 Describes the acceptable rate/volume of data for a given flow.


 Includes parameters like peak rate, burst size, etc.

3. Traffic Conditioner:

 Ensures that the flow matches its negotiated profile.


 Has four major components:

Components of Traffic Conditioner:

Component Function

Meter Measures the traffic rate to ensure it does not exceed allowed limits.

Marker Tags packets (e.g., high or low priority) based on profile compliance.

Shaper Delays non-compliant packets to smooth out bursts.

Dropper Drops packets that violate their traffic profile.

2. Core Function: Forwarding (Per-Hop Behaviour - PHB)

 PHB is implemented in routers (DiffServ-capable).


 A router forwards a marked packet based on the packet’s class/marking.
 PHB determines how bandwidth, queues, and priority are allocated.

Karthik M N, CS&D, MUSE, University of Mysore 40


Computer Networks and Security – 21CD61 Module 5

Types of PHB:

1. Expedited Forwarding (EF):

 High-priority traffic (e.g., VoIP, video conferencing).


 Ensures a minimum guaranteed rate for the class.

Example:
Real-time voice call packets are marked for EF so they don’t experience delay.

2. Assured Forwarding (AF):

 Divides traffic into classes (e.g., Gold, Silver, and Bronze).


 Each class is guaranteed some bandwidth and buffer space.

Example:
Email traffic might be classified under AF with average performance, while backup data may be
given lower priority.

Definition of PHB:

“A description of the externally observable forwarding behaviour of a DiffServ node applied to a


particular DiffServ behaviour aggregate.”

Key Insights:

1. PHB allows different traffic classes to get different performance.


2. PHB doesn’t enforce a specific implementation mechanism.
3. Performance must be observable and measurable.

Real-Life Example:

A university network prioritizes online classes (video calls) over bulk downloads using EF PHB for
classes and AF PHB for downloads.

5.5.4 Per-Connection QoS Guarantees: Resource Reservation and


Call Admission

Scenario:

Two audio apps (each needs 1 Mbps) send data on a 1.5 Mbps link. Total demand = 2 Mbps > link
capacity.

Karthik M N, CS&D, MUSE, University of Mysore 41


Computer Networks and Security – 21CD61 Module 5

Problem: How does the network ensure QoS?

Answer:

Use Admission Control to allow one flow and block the other, similar to how phone calls are blocked
when the line is busy.

Definition of Admission Process:

“The process of declaring a flow’s QoS requirement and then deciding either to accept or block the
flow.”

Insight:

To guarantee QoS, the network needs to:

 Check available resources.


 Accept or block a flow based on resource availability.

1. Mechanisms for Guaranteed QoS


To provide guaranteed QoS, three mechanisms are used:

Karthik M N, CS&D, MUSE, University of Mysore 42


Computer Networks and Security – 21CD61 Module 5

1. Resource Reservation

 Resources (bandwidth, buffer) are allocated explicitly for a call.


 Once reserved, they are guaranteed throughout the session.

Example:
A 1 Mbps VoIP call reserves bandwidth across all routers in the path.

2. Call Admission Control

 Before a call is allowed, the network checks resource availability.


 If resources are insufficient → Call is blocked.
 Similar to telephone networks.

Example:
You dial a number; if all lines are busy, you hear “network busy.”

3. Call Setup Signalling

 A signalling protocol sets up the call and coordinates resource reservation.


 Ensures every router along the path allocates necessary resources.

Protocol Used: RSVP (Resource Reservation Protocol)

Example Process

1. Sender → sends a QoS request.


2. Routers → Allocate local resources based on request.

Karthik M N, CS&D, MUSE, University of Mysore 43


Computer Networks and Security – 21CD61 Module 5

3. Receiver → Confirms QoS path is set.


4. If any router cannot reserve resources → Setup fails.

Summary of Key Concepts:

Topic Description

1. DiffServ Scalable QoS method that uses packet marking and PHBs.

2. PHB Router-specific behaviour for forwarding marked packets.

3. EF PHB Low-delay service for high-priority traffic.

4. AF PHB Different service levels (Gold, Silver, and Bronze).

5. Admission Control Blocks traffic if not enough resources are available.

6. Resource Reservation Reserves resources for a session.

7. RSVP Protocol for signalling QoS needs across routers.

Real-World Application Scenarios:

1. Video Conferencing: Uses EF to ensure real-time transmission.


2. File Backup Systems: Assigned to lower AF class since delay is tolerable.
3. IP Telephony (VoIP): Uses RSVP to reserve low-delay path before the call.

Karthik M N, CS&D, MUSE, University of Mysore 44

You might also like