Multicast OSI stack 7-layer OSI stack

BL Study Plan2110 Topo

What you will learn on this page


This lesson explains Multicastings and how it fits into the SMPTE ST 2110 stack.

Why Multicast   • Joining and Leaving Streams  


The Problem: One-to-Many Distribution with Unicast
In unicast, each receiver requires its own separate connection.
If a sender (for example, a live video encoder) needs to deliver the same stream to 100 receivers, it must transmit 100 identical copies of the packets.

This consumes:

While unicast is ideal for one-to-one communication (web browsing, file transfers), it scales poorly for real-time media distribution to many receivers.

Bottom Line   The Multicast Solution: One Stream, Many Subscribers
With IP multicast, the sender transmits a single stream to a special multicast group address (for example, 239.0.0.1). Receivers that want the stream subscribe to that group using IGMP (for IPv4). The network — switches and routers — replicates packets only where paths diverge, delivering the stream efficiently to all subscribers.

So, the flow looks like this:
Sender → (one stream) → Router → Switch → Multiple Receivers
or
Sender → (one stream) → Network → Replication at branch points → Multiple receivers

Each link carries only one copy of the stream, until replication is required, no matter how many receivers exist downstream.

Bottom Line   Step-by-Step

  1. Sender starts streaming
    1. The sender transmits packets to a multicast destination IP address (for example, 239.0.0.1) and UDP port (for example, 5004).
      Sends one copy of the stream
    2. It doesn’t know or care how many receivers exist.
      Does not receive join/leave information
  2. Receivers join the group
    1. Each receiver that wants the stream sends an IGMP Membership Report (“Join” used as shorthand) indicating:
      “Please deliver traffic from 239.0.0.1 to me.”
    2. The router/switch adds that port/interface to its multicast forwarding table.
  3. Network replicates only as needed as it builds forwarding state
    1. Layer-2 switches use IGMP snooping to learn which ports want the multicast group.
    2. Layer-3 routers use multicast routing (e.g., PIM) to build a distribution tree toward the sender.
      Result
  4. Receivers leave
    1. When done, a receiver sends an IGMP Leave message (IGMPv2/v3), or
    2. Simply stops responding to IGMP queries (timeout-based removal)
    3. The switch/router prunes that port from its table — no more copies wasted there.

In flat 2110 networks, switches do most of the visible work — but routers still matter at VLAN/L3 boundaries.

Efficiency Comparison

Method Copies Sent by Source Network Load Ideal For
Unicast 1 per receiver Scales linearly (bad) One-to-one traffic
Broadcast 1 to everyone Floods entire LAN (wasteful) Local discovery, ARP
Multicast 1 per group Replicated only where needed One-to-many (video, audio, telemetry)

Examples
Multicast enables one-to-many streaming by:

  1. Using group IP addresses (224.0.0.0–239.255.255.255),
  2. Allowing receivers to subscribe/unsubscribe dynamically via IGMP,
  3. Making the network, not the sender, responsible for efficient replication.

The process of joining: Some exambles

Example 1 – PC or Server (Linux/Windows CLI)
You can join a multicast group and receive packets using command-line tools:

Linux

  1. # Join a multicast group and dump packets
  2. sudo ip maddr add 239.0.0.1 dev eth0
  3. sudo tcpdump -n host 239.0.0.1

Windows PowerShell
# Windows joins automatically when an app opens a multicast socket.
# Example: using VLC: vlc udp://@239.0.0.1:5004
Opening that address in VLC causes Windows to issue an IGMPv3 Membership Report (Join).

Example 2 – Set-Top Box or IPTV Receiver
A set-top box is usually pre-configured to tune into multicast channels:
# IPTV channel list (M3U format)
#EXTINF:-1, Channel 1
udp://@239.0.0.1:5004
#EXTINF:-1, Channel 2
udp://@239.0.0.2:5004

When the user selects “Channel 1,” the box sends:
IGMP Join → 239.0.0.1
When the user changes the channel, it sends:
IGMP Leave → 239.0.0.1
IGMP Join → 239.0.0.2

Example 3 – Python Program
You can join a multicast group directly from a script:
import socket, struct

mcast_grp = '239.0.0.1'
mcast_port = 5004

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.bind(('', mcast_port))

mreq = struct.pack("4sl", socket.inet_aton(mcast_grp), socket.INADDR_ANY)
sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)

print(f"Joined multicast group {mcast_grp}:{mcast_port}")
while True:
 data, addr = sock.recvfrom(10240)  print(f"Received {len(data)} bytes from {addr}")

Running this script automatically sends the IGMP Join, and the network begins forwarding multicast traffic to that port.


Summary

Device Type How it Subscribes Example Address
Set-Top Box Automatically joins via firmware/app when channel is selected udp://@239.0.0.1:5004
PC (VLC) Joins when opening a multicast URL in a player udp://@239.0.0.1:5004
Script / App Uses socket API with IP_ADD_MEMBERSHIP to join group 239.0.0.1 (UDP port e.g., 5004)
Switch / Router Learns membership from IGMP Join messages; controls forwarding N/A


 

UPDATED
4/29/26
V260429-1.0