PIM sparse mode (PIM-SM) is a multicast routing protocol designed to efficiently route IP multicast traffic in networks where
receivers are sparsely distributed. Unlike dense mode protocols that flood multicast traffic to all parts of the network initially,
PIM Sparse Mode uses a more controlled approach to conserve bandwidth and resources.
PIM-SM uses a pull model to deliver multicast traffic. Only network segments with active receivers that have explicitly requested
the data will receive the traffic.
Sparse mode interfaces are added to the multicast routing table when Join messages arrive from downstream routers or when
a connected member is on the interface. When forwarding from a LAN, sparse mode operation happens only if an RP is recognized
for the group. If so, the packets are encapsulated and sent toward the RP. When there is sufficient multicast traffic from
a source, the receiver's first hop router may send Join messages toward the source to create a source-based distribution tree.
PIM-SM distributes information about active sources by forwarding data packets on the shared tree. Because PIM-SM uses shared
trees (at least, initially), it requires the use of a rendezvous point (RP). You must configure the RP in the network.
In sparse mode, routers do not forward multicast packets for a group unless an explicit request for traffic is received.
When hosts join a multicast group, the directly connected routers send PIM Join messages toward the RP. The RP keeps track
of multicast groups. Hosts that send multicast packets are registered with the RP by the first hop router of that host. The
RP then sends Join messages toward the source, and at this point, packets are forwarded on a shared distribution tree. If
the multicast traffic from a specific source is sufficient, the first hop router of the host may send Join messages toward
the source to build a source-based distribution tree.
Sources register with the RP and then data is forwarded down the shared tree to the receivers. Edge routers learn about a
particular source when they receive data packets that travel on the shared tree from that source through the RP. The edge
router then sends PIM (S,G) Join messages toward that source. Each router on the reverse path compares the RP address's unicast
metric to the source address's metric. If the metric for the source address is better, it will forward a PIM (S,G) Join message
toward the source. If the metric for the RP is the same or better, then the PIM (S,G) Join message will be sent in the same
direction as the RP. In this case, the shared tree and the source tree would be considered congruent.
If the shared tree is not an optimal path between the source and the receiver, the routers dynamically create a source tree
and stop traffic from flowing down the shared tree. This behavior is the default behavior in software. Network administrators
can force traffic to stay on the shared tree by using the ip
pim
spt-threshold
infinity command.
PIM-SM scales well to a network of any size, including those with WAN links. The explicit join mechanism prevents unwanted
traffic from flooding the WAN links.