What is multicast?
Multicast is a network method for efficient one‑to‑many delivery: a sender transmits a single stream, and the network duplicates and forwards packets only where there are interested receivers. It’s different from:
- Unicast — one sender to one receiver (one copy per receiver).
- Broadcast — one sender to all nodes on a link (everyone receives).
- Multicast — one sender to a group of subscribers (only group members receive).
Basic concepts
- Multicast group — identified by a multicast IP address (receivers join a group).
- Group membership — hosts tell their local router they want to receive a group using IGMP (IPv4) or MLD (IPv6).
- Multicast routing — routers build distribution trees to forward multicast packets only to subnets with interested receivers.
- Source vs group — some trees are built per (S,G) (source,group), others are shared per (*,G) (any source for group G).
Key address ranges and mappings
- IPv4 multicast addresses: 224.0.0.0/4 (224.0.0.0 through 239.255.255.255).
- 224.0.0.0/24 are local control addresses (not forwarded by routers).
- SSM (Source Specific Multicast) typically uses 232.0.0.0/8.
- IPv6 multicast: addresses start with
ff00::/8(many scoping options). - Ethernet MAC mapping (IPv4): multicast IPs map to MACs in the range
01:00:5e:xx:xx:xxby using the low 23 bits of the IPv4 multicast address. - IPv6 multicast maps to MACs starting with
33:33:xx:xx:xx:xx.
How hosts join and receive multicast (step‑by‑step)
- Application calls socket API to join group G on interface I.
- Host sends an IGMP (IPv4) or MLD (IPv6) Membership Report for G to the local router/switch.
- IGMPv1: reports, no explicit leave.
- IGMPv2: adds leave messages.
- IGMPv3: supports source filtering (S,G) joins — required for SSM.
- Switch with IGMP snooping watches IGMP messages and forwards multicast frames only to ports with interested hosts (reduces flooding).
- Router that receives IGMP knows the subnet has listeners and participates in multicast routing (PIM) to ensure traffic reaches that subnet.
- Multicast routing protocols (PIM, etc.) build distribution trees so packets from the source are forwarded toward all routers with interested receivers.
Multicast routing and trees
Routers use multicast routing protocols (commonly PIM) to build trees. Two important styles:
- Shared tree (*,G) — all traffic for group G may flow initially to a Rendezvous Point (RP). Receivers join the shared tree that is rooted at the RP.
- Source tree (S,G) — traffic flows on a shortest‑path tree from source S to receivers; routers may switch from the shared tree to the source tree for efficiency.
PIM modes
- PIM Dense Mode (PIM‑DM) — flooding then pruning; used when receivers are dense.
- PIM Sparse Mode (PIM‑SM) — receivers explicitly join via RP; good when receivers are sparse across the network.
- PIM Source‑Specific Mode (PIM‑SSM) — works with IGMPv3 / MLDv2 and SSM address range; routers forward only for specifically requested (S,G) pairs — simpler and more secure.
Typical PIM‑SM flow (simplified)
- Source S sends packets to group G.
- First‑hop router (DR) encapsulates and sends a PIM Register to the RP.
- RP decapsulates and forwards down the shared tree (*,G) to receivers.
- When routers decide to receive directly from S, they send PIM Join toward S, creating (S,G) branches; RP can stop registering once routers join the source tree.
Source‑Specific Multicast (SSM)
SSM simplifies things: the receiver explicitly requests traffic from a specific source (S) for group G. There’s no RP, and forwarding uses (S,G) trees only. Requires IGMPv3 or MLDv2 on hosts.
Common commands and tools
Examples (Cisco & Linux):
- Cisco:
show ip mroute(multicast routing table),show ip igmp groups,show ip pim neighbor,debug ip igmp. - Linux:
ip maddr,ss -g(show group memberships),ip -s mroute.
Practical use cases
- Live video streaming inside an enterprise or campus (IPTV).
- Real‑time market data for financial services.
- Multicast conferencing, software distribution, and some multiplayer gaming scenarios.
Advantages and limitations
Advantages:
- Bandwidth efficient for many receivers: single sender stream replicated in the network.
- Low source CPU/network load compared to sending many unicasts.
Limitations / caveats:
- Requires multicast support in the network (routers, switches with IGMP snooping, PIM). Not enabled by default on the public internet.
- Stateful in routers: each (S,G) and/or (*,G) creates routing state which affects scalability.
- NAT and many middleboxes break multicast; address/port mapping is not straightforward through NAT.
- Security and access control are harder — use source validation, ACLs, and administrative RPs if required.
Troubleshooting checklist
- Are hosts sending IGMP/MLD reports? (use packet capture or OS tools)
- Does the switch do IGMP snooping? Are ports in the right VLAN?
- Do routers run PIM and have neighbors? Check
show ip pim neighbor. - Does the multicast routing table contain entries for the group? (
show ip mroute). - Is TTL/scoping preventing traffic? Are ACLs or firewall rules blocking multicast groups?
Alternatives when native multicast isn’t available
- Application‑level multicast (overlay/peer‑to‑peer replication).
- Content Delivery Networks (CDNs) or unicast streaming with adaptive bitrate.
- Multicast to the edge then conversion to unicast (multicast‑to‑unicast gateways).
Short practical example
Host A wants to receive 239.1.1.1:
1) Host sends IGMP Membership Report for 239.1.1.1.
2) Switch learns port needs that group (IGMP snooping) and forwards only that port's multicast frames.
3) Router receives the IGMP report and, via PIM, joins the multicast distribution tree so packets for 239.1.1.1 get forwarded into the subnet.
Summary — What to remember
- Multicast = efficient one‑to‑many delivery using group addresses.
- IGMP/MLD are used for host membership; PIM builds the distribution trees among routers.
- There are shared trees (RP) and source trees (SSM); choose based on scale and control needs.
- Multicast works well inside controlled networks (campus, ISP) but is not widely available across the public Internet.
If you want, I can: show packet examples with IGMPv3 messages, draw a step‑by‑step packet flow diagram, give Cisco/Linux command outputs to interpret, or explain how to configure PIM‑SM or SSM on specific devices — tell me which you prefer.