PIM dense mode and sparse mode: building multicast trees across routers
In short: PIM lets routers deliver multicast across a network using the unicast routing table to find directions. Dense mode floods traffic everywhere and prunes it back from areas with no receivers. Sparse mode only sends traffic where receivers have joined, meeting sources at a rendezvous point and then usually switching to the shortest path. Sparse mode is the normal choice today.
Why "protocol independent"?
PIM does not exchange routes of its own. It uses whatever unicast routing table the router already has (OSPF, EIGRP, static, BGP) to decide which interface points back towards a source or a rendezvous point. That direction check is called reverse path forwarding (RPF), and it is how multicast avoids loops.
Dense mode: flood and prune
When a source starts sending, every PIM-DM router forwards the traffic out of all its PIM interfaces. Routers with no receivers and no downstream PIM neighbours send a prune back upstream, and the branch stops. Prunes expire after about three minutes, so the traffic floods again and the pruning repeats. This is simple and works well when receivers really are everywhere, but it wastes bandwidth on large networks. Dense mode is now rare outside labs.
Sparse mode: ask first
PIM-SM assumes receivers are few and must explicitly join. It uses a meeting point called the rendezvous point (RP):
- A receiver sends an IGMP join to its local router (the last-hop router).
- That router sends a PIM (*,G) join hop by hop towards the RP, building a shared tree (RPT) from the RP to the receiver.
- When a source starts, its first-hop router registers the traffic with the RP (unicast-encapsulated at first), and the RP joins towards the source.
- Traffic now flows source to RP to receiver.
- Once traffic arrives, the last-hop router can send an (S,G) join straight towards the source, building a shortest-path tree (SPT), and prune that source from the shared tree. On Cisco IOS this switch happens after the first packet by default.
Basic configuration
ip multicast-routing
!
interface GigabitEthernet0/0
ip pim sparse-mode
interface GigabitEthernet0/1
ip pim sparse-mode
interface Vlan50
description TV receivers
ip pim sparse-mode
ip igmp version 3
!
ip pim rp-address 10.255.0.1
Enable PIM on every interface that should carry multicast, including the receiver and source VLANs, so IGMP is active there too. On IOS XE, ip multicast-routing may need distributed on some platforms.
Reading the multicast table
show ip mroute shows entries such as (*, 239.1.1.10) for the shared tree and (10.20.5.5, 239.1.1.10) for a source tree. For each, you see the incoming interface (towards the source or RP, chosen by RPF) and the outgoing interface list. show ip pim neighbor confirms PIM adjacencies, and show ip rpf 10.20.5.5 shows the RPF check for a source.
Real-world example: the stream that went nowhere
A company enabled PIM sparse mode on its core but forgot the interface facing the video encoder's VLAN. Receivers joined, the RP was correct, but show ip mroute on the RP never showed the source. The first-hop router had no PIM on the source VLAN, so it never registered the stream. Adding ip pim sparse-mode to that SVI started the video immediately.
Practice
What does PIM use to decide the direction back towards a source?
In sparse mode, where do sources and receivers first meet?
What does a (S,G) entry in show ip mroute represent?
Key takeaways
- PIM builds multicast trees using the unicast routing table and RPF checks.
- Dense mode floods and prunes, and suits only small, busy networks.
- Sparse mode uses a rendezvous point, then usually switches to the shortest path.
- Enable PIM on every interface in the path, including source and receiver VLANs.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.