4-9Figure 4-6 Multicast registrationSourceServerHost AHost BHost CReceiverReceiverMulticast packetsSPTJoin messageRegister messageRPDRAs shown in Figure 4-6, the multicast source registers with the RP as follows:1) When the multicast source S sends the first multicast packet to a multicast group G, the DR directlyconnected with the multicast source, upon receiving the multicast packet, encapsulates the packetin a PIM register message, and sends the message to the corresponding RP by unicast.2) When the RP receives the register message, on one hand, it extracts the multicast packet from theregister message and forwards the multicast packet down the RPT, and, on the other hand, itsends an (S, G) join message hop by hop toward the multicast source. Thus, the routers along thepath from the RP to the multicast source constitute an SPT branch. Each router on this branchgenerates a (S, G) entry in its forwarding table. The multicast source is the root, while the RP is theleaf, of the SPT.3) The subsequent multicast data from the multicast source travels along the established SPT to theRP, and then the RP forwards the data along the RPT to the receivers. When the multicast trafficarrives at the RP along the SPT, the RP sends a register-stop message to the source-side DR byunicast to stop the source registration process.Switchover from RPT to SPTInitially, multicast traffic flows along an RPT from the RP to the receivers. Because the RPT is notnecessarily the tree that has the shortest path, upon receiving the first multicast packet along the RPT,the receiver-side DR initiates an RPT-to-SPT switchover process, as follows:1) First, the receiver-side DR sends an (S, G) join message hop by hop to the multicast source. Whenthe join message reaches the source-side DR, all the routers on the path have installed the (S, G)entry in their forwarding table, and thus an SPT branch is established.2) Subsequently, the receiver-side DR sends a prune message hop by hop to the RP. Upon receivingthis prune message, the RP forwards it towards the multicast source, thus to implementRPT-to-SPT switchover.After the RPT-to-SPT switchover, multicast data can be directly sent from the source to the receivers.PIM-SM builds SPTs through RPT-to-SPT switchover more economically than PIM-DM does throughthe “flood and prune” mechanism.