Free tech learning for everyone, from basics to pro

Routing & SwitchingNetworking SecurityAdvanced

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.

PIM dense mode compared with sparse modeDense mode (PIM-DM)Flood everywhere firstPrune where nobody listensRe-floods every 3 minutesSmall, busy networksSparse mode (PIM-SM)Send only where askedUses a rendezvous pointCan switch to shortest pathStandard choice today
Figure 1. Dense mode assumes receivers are everywhere; sparse mode assumes they are few and must ask.

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):

  1. A receiver sends an IGMP join to its local router (the last-hop router).
  2. That router sends a PIM (*,G) join hop by hop towards the RP, building a shared tree (RPT) from the RP to the receiver.
  3. 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.
  4. Traffic now flows source to RP to receiver.
  5. 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?
The existing unicast routing table, through the reverse path forwarding (RPF) check.
In sparse mode, where do sources and receivers first meet?
At the rendezvous point (RP).
What does a (S,G) entry in show ip mroute represent?
A source-specific shortest-path tree for source S and group G.

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.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

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.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: