Did a reveiw of the PIM register and PIM SPT switchover process. Here is what I wrote down. If you see any mistakes I made, feel free to comment! Nobody is perfect.
1st step: Registration of a source in a PIM sparse-mode network
1) Source starts sending traffic
2) first hop router gets this and informs the RP with a unicast messasge (PIM register message) about the source and group of the sender. First hop router and the RP are the only ones who have a S,G entry at that point of time.
3) The RP sends a register stop message to the first hop router. This means that the first hop router does not need to send a specific unicast register message anylonger to the RP, because the packets are already flowing. Only PIM hellos are sent.
NOTE: if there is more than one router on the segment speaking PIM, the DR will send the PIM register message.
2nd step: Client requests the multicast stream/group
1) A client sends an igmp v2 join message (igmp membership report) to the last hop router that is in his L3-segment
2) The last-hop router then sends a pim join upwards the shared-tree. The pim joins go from router to router (hop by hop) to the RP. Every router in the chain from the mcast-receiver and the RP gets an *,G entry in its mcast-routing table as this router is interested in getting any source for that particular group
NOTE: if there is more than one router on the segment speaking PIM, the DR will send the PIM join
3rd step: RP informs the first hop router that there are potential receivers
1) The RP gets the pim join message and sends pim join messages towards the first hop router (hop by hop) where the source is located. Every router in that chain (source tree, shortest path tree) will get an *,G entry.
2) When the first hop router gets the PIM join it starts forwarding the multicast Payload towards the RP. Every router who forwards those packets will have a *,G and a S,G entry for that particular group in its routing table
4th step: Merging the trees
1) Now the RP has a source tree/shortest path tree (shortest path from sender to RP) and a shared tree (path from receiver to RP). The RP merges those two trees and sends the packets coming from the source tree down the shared tree. Every router from sender to receiver then has a *,G and S,G entry in its multicast routing table.
5th step: Switching to the overall shortest path
1) As the traffic through the RP is probably not the best path from the sender to the destination the RP. The last-hop router may then (after a specific amount of time or bandwidth that has been used; if the spt-treshold value is not set the last-hop router will do this after the first packet trasmitted to the receiver) send a PIM join message towards the first-hop router (where the source is located) instead of the RP.
NOTE: if more than one router on the segment, the DR will send this message.
Before it sends the PIM join message towards the first hop router it will mark the *,G in its routing table with a “J” and then wait for the next multicast packet that matches the S,G. So the router is able to measure how much multicast traffic for each particular group has beed transmitted.
3) The Flag “J” in S,G is cleared each second and then if the threshhold has been reached the last-hop router sends (initiates) S,G PIM joins hop by hop towards the source.
4) On the router where the SPT and the shared tree begin to differ (are not equal any longer) the corresponding router will send a PIM prune message upwards the shared tree to the RP. The prune message is sent when the SPT to the first hop router is built. For that amount of time the switchover needs the traffic is redundant. The prune message is sent because the router where the trees begin to differ, has a different interface to the rp than to the source. Thats the point where it sends the PIM prune towards the RP.
5) The RP receives the prune message and prunes the traffic of the SPT to the last hop router.
6) After that the traffic of the shared tree gets torn down when the RP sends a prune downwards to the first hop router.
7) If the traffic then goes under the threshhold the routers do a SPT switchback and get to the shared tree again.
All theoretics with no warranty as this process goes very deep into technology!
Comments are welcome!
Have fun with it!