PIM Sparse-Mode | 757Sending Multicast TrafficWith PIM-SM, all multicast traffic must initially originate from the RP. A source must unicast traffic to theRP so that the RP can learn about the source and create an SPT to it. Then the last-hop DR may create anSPT directly to the source.1. The source gateway router (first-hop DR) receives the multicast packets and creates an (S,G) entry inits multicast routing table. The first-hop DR encapsulates the initial multicast packets in PIM Registerpackets and unicasts them to the RP.2. The RP decapsulates the PIM Register packets and forwards them if there are any receivers for thatgroup. The RP sends a PIM Join message towards the source. All routers between the RP and thesource, including the RP, create an (S,G) entry and list the interface on which the message wasreceived as an outgoing interface, thus recreating a SPT to the source.3. Once the RP starts receiving multicast traffic via the (S,G) it unicasts a Register-Stop message to thefirst-hop DR so that multicast packets are no longer encapsulated in PIM Register packets and unicast.Upon receiving the first multicast packet from a particular source, the last-hop DR sends a PIM Joinmessage to the source to create an SPT to it.4. There are two paths, then, between the receiver and the source, a direct SPT and an RPT. One routerwill receive a multicast packet on two interfaces from the same source in this case; this router prunesthe shared tree by sending a PIM Prune message to the RP that tells all routers between the source andthe RP to remove the outgoing interface from the (*,G) entry, and tells the RP to prune its SPT to thesource with a Prune message.Important Points to Remember• If a loopback interface with a /32 mask is used as the RP, you must enable PIM Sparse-mode on theinterface.Configure PIM-SMConfiguring PIM-SM is a two-step process:1. Enable IPv4 or IPv6 multicast routing using the command [ip | ipv6] multicast-routing fromCONFIGURATION mode.2. Select a Rendezvous Point, or let PIM elect an RP. See page 760.FTOS Behavior: When the router creates an SPT to the source, there are then two paths between thereceiver and the source, the SPT and the RPT. Until the router can prune itself from the RPT, thereceiver receives duplicate multicast packets which may cause disruption. Therefore, the router mustprune itself from the RPT as soon as possible. FTOS optimizes the shared to shortest-path treeswitchover latency by copying and forwarding the first (S,G) packet received on the SPT to the PIMtask immediately upon arrival. The arrival of the (S,G) packet confirms for PIM that the SPT is created,and that it can prune itself from the shared tree.