Introduction
Multicast allows a single sender to deliver data to multiple receivers simultaneously without sending multiple unicast copies. It's critical for video streaming, IPTV, financial data feeds, and conferencing. PIM (Protocol Independent Multicast) is the routing protocol that builds multicast distribution trees.
Multicast Addressing
- Multicast group IPs: 224.0.0.0/4 (224.x.x.x to 239.x.x.x)
- Well-known addresses:
- 224.0.0.1 — all hosts on subnet
- 224.0.0.2 — all routers on subnet
- 224.0.0.5 — OSPF routers
- 224.0.0.9 — RIP v2 routers
PIM Modes
| Mode | Use Case | Requires RP? |
|---|---|---|
| PIM-SM (Sparse Mode) | Most enterprise/internet | Yes (RP) |
| PIM-SSM (Source-Specific) | Known source, better security | No RP |
| PIM-DM (Dense Mode) | Small networks, legacy | No |
| PIM-BIDIR | Many-to-many (conferencing) | Yes (RP) |
PIM Sparse Mode Configuration
Step 1: Enable multicast routing
ip multicast-routing distributedStep 2: Enable PIM on interfaces
interface GigabitEthernet0/0
ip pim sparse-mode
interface GigabitEthernet0/1
ip pim sparse-modeStep 3: Configure Rendezvous Point (RP)
The RP is the meeting point for senders and receivers.
Option A: Static RP (simple, no redundancy):
ip pim rp-address 10.0.0.10Option B: Auto-RP (Cisco-proprietary, automatic RP discovery):
! On the RP router
ip pim send-rp-announce Loopback0 scope 16
ip pim send-rp-discovery Loopback0 scope 16
! On all other routers
ip pim autorp listenerOption C: BSR (Bootstrap Router, standards-based):
! On BSR router
ip pim bsr-candidate Loopback0 0
! On candidate RP
ip pim rp-candidate Loopback0 priority 10
! On all routers
! (nothing needed — they learn BSR automatically)IGMP (Internet Group Management Protocol)
Hosts use IGMP to join/leave multicast groups. Routers use it to track group membership.
! Enable IGMP (automatic when PIM is enabled)
interface GigabitEthernet0/2
ip igmp version 3 ! IGMPv3 for SSM
ip igmp query-interval 60 ! How often to query hosts
ip igmp query-max-response-time 10
! Static group join (for testing)
interface GigabitEthernet0/2
ip igmp join-group 239.1.1.1
! Limit groups on untrusted port
interface GigabitEthernet0/3
ip igmp max-groups 10 ! Maximum 10 groupsPIM-SSM (Source-Specific Multicast)
SSM is more secure — receivers specify both group AND source:
! Enable SSM for 232.x.x.x range
ip pim ssm range 232.0.0.0/8
! Or custom range
ip access-list standard SSM-RANGE
permit 239.1.0.0 0.0.255.255
ip pim ssm range SSM-RANGEVerification
! View PIM neighbors
show ip pim neighbor
! View multicast routing table
show ip mroute
! View IGMP group membership
show ip igmp groups
! View RP mapping
show ip pim rp
! View PIM interface info
show ip pim interface
! Debug (use carefully in production)
debug ip pim
debug ip igmpMulticast Traffic Flow Example
- Sender starts streaming to 239.1.1.1
- Sender's router creates (S,G) entry: (192.168.1.10, 239.1.1.1)
- Data travels to RP via unicast (RPT — RP Tree)
- RP distributes to all receivers via shared tree
- Once traffic flows, receivers can switch to SPT (Shortest Path Tree) directly to sender
! View the multicast tree
show ip mroute 239.1.1.1
! Output:
! (*, 239.1.1.1), 00:30:12/00:02:44, RP 10.0.0.10, flags: S
! Incoming interface: GigabitEthernet0/0
! RPF nbr 10.0.0.10
! Outgoing interface list:
! GigabitEthernet0/1, Forward/Sparse, 00:30:12/00:02:44
!
! (192.168.1.10, 239.1.1.1), 00:15:05/00:02:59, flags: T
! Incoming interface: GigabitEthernet0/0 (shortest path to source)
! Outgoing interface list: GigabitEthernet0/1IGMP Snooping (on Switches)
Prevents multicast from flooding all ports on a VLAN:
! Enable (on by default on Catalyst)
ip igmp snooping vlan 10
! View snooping table
show ip igmp snooping groups vlan 10
! Configure querier (one switch per VLAN should be querier)
ip igmp snooping vlan 10 querier address 192.168.10.1