Protocol Independent Multicast (PIM) Basics
Protocol-Independent Multicast (PIM) is a routing protocol like RIP or OSPF. It was designed to allow multicast routing without needing to rely on other specific unicast routing protocols. There are two main modes in which PIM will operate in two main modes: Dense mode and Sparse mode.
It is possible for a router to manage traffic for groups that are separately using either of these modes:
When functioning in Dense mode, the router assumes that all other routers want to receive multicast data for a specific group. If a router receives these packets and does not need them because there are no clients that it is aware of, it sends a prune message (a message to remove a path) back to the originating router.
In this Dense mode, the initial assumption of the protocol is that all routers want to get the messages or data, so more initial data is sent out over the network. This condition eventually creates a source-based multicast distribution tree.
When running in Dense mode, the prune messages time out every three minutes, at which time group messages are flooded out of all interfaces again until new prune messages are received.
Sparse mode, by contrast, involves the router assuming that no other routers want to get multicast traffic. In this case, the router closest to the host receives a multicast PIM join message from the receiver device.
Directly connected routers send the PIM join message to upstream routers between themselves and the Rendezvous Point (RP), which is a router that is a designated meeting point. The RP’s job is to keep track of all multicast groups in use on the network. The RP then sends join messages upstream toward the source host.
In this case, the fewest possible routers are involved with seeing and handling multicast traffic, which makes them sparse or sparsely used. The figure shows both these operational modes, which may give you an idea about how you might use them.