PIM-DM forwards multicast packets in push mode and is used on small-scale networks with densely distributed multicast group members. PIM-DM assumes that each network segment has multicast group members. When a multicast source sends multicast packets, PIM-DM floods all PIM routers on the network with the multicast packets and prunes the branches that do not have multicast group members. Through periodic flooding and pruning, PIM-DM creates and maintains a unidirectional loop-free SPT that connects the multicast source and group members. If a new member joins a multicast group on the network segment connected to a leaf router on a pruned branch, the router can initiate the graft mechanism before starting new flooding and prune. The pruned branch turns into a forwarding branch.
PIM-DM uses neighbor discovery, flood, prune, graft, assert, and state refresh mechanisms. The flood, prune, and graft mechanisms are used to establish an SPT. For details about all of these six mechanisms, see the sections below.
Hello messages are used to discover PIM neighbors, adjust PIM protocol parameters, and maintain neighbor relationships.
Discovering PIM neighbors
All PIM routers on the same network segment must receive Hello messages. By exchanging Hello messages, directly connected PIM routers learn neighbor information and establish neighbor relationships.
A PIM router can receive other PIM messages to create multicast routing entries only after it establishes neighbor relationships with other PIM routers.
Adjusting PIM protocol parameters
A Hello message carries the following PIM protocol parameters for controlling PIM protocol packet exchange between PIM neighbors:
DR_Priority: indicates the priority used for designated router (DR) election among interfaces. The interface with the highest priority becomes the DR.
Holdtime: indicates the period during which a neighbor is considered reachable.
LAN_Delay: indicates the delay in transmitting Prune messages on a shared network segment.
Neighbor-Tracking: indicates the neighbor tracking function.
Override-Interval: indicates the interval for overriding the prune mechanism.
The DR_Priority parameter is only used in DR election on PIM-SM networks. For details about DR election, see "PIM-SM (ASM model) DR Election".
Maintaining neighbor relationships
If a PIM router does not receive a new Hello message from its PIM neighbor within the holdtime, it considers the neighbor unreachable and deletes the neighbor from the neighbor list.
Changes of PIM neighbors lead to multicast topology changes on the network. If an upstream or downstream neighbor in the MDT is unreachable, multicast routes re-converge and the MDT is re-established.
On a PIM-DM network, multicast packets from a multicast source are flooded throughout the entire network. When a PIM router receives a multicast packet, it uses unicast routing information to perform an RPF check. If the packet passes the RPF check, the router creates an (S, G) entry, in which the downstream interface list contains all the interfaces connected to PIM neighbors, except the interface connected to the upstream router. The router then forwards subsequent multicast packets through each downstream interface.
When the multicast packets reach a leaf router, the leaf router processes the packets as follows:
Multicast packets are sometimes flooded to a shared network segment with multiple PIM routers. If the packets pass the RPF check on these PIM routers, multiple copies of multicast packets are forwarded to this network segment. These PIM routers will need to initiate the assert mechanism.
In Figure 1, RouterA, RouterB, and RouterC on the PIM-DM network establish PIM neighbor relationships by exchanging Hello messages. HostA joins multicast group G using Internet Group Management Protocol (IGMP) running between RouterA and HostA, but HostB does not join a multicast group.
The flooding process is as follows:
When a PIM router receives a multicast packet, it performs an RPF check on the packet. If the packet passes the RPF check but the downstream network segment does not need to receive the multicast packet, the PIM router sends a Prune message to the upstream router. After receiving the Prune message, the upstream router deletes the downstream interface from the downstream interface list of the created (S, G) entry and no longer forwards multicast packets to the downstream interface. A leaf router initiates the prune mechanism, and the Prune message is sent upstream by hop along the MDT to prune the network segment with no group members.
The PIM router starts a prune timer for the pruned downstream interface. The interface resumes forwarding multicast packets after the timer expires. Subsequently, multicast packets are flooded throughout the entire network and new group members can receive multicast packets. If a leaf router connected to a network segment that has no group members receives the flooded multicast packets, the leaf router initiates the prune mechanism. PIM-DM updates the SPT periodically through the process of periodic flooding and pruning.
After a downstream interface of a leaf router is pruned, the leaf router will initiate either the graft or state refresh mechanism:
When new members join a multicast group on the network segment connected to the leaf router and want to receive multicast packets before the prune timer expires, the leaf router initiates the graft mechanism.
When no member joins a multicast group on the network segment connected to the leaf router and the downstream interface still needs to be suppressed, the leaf router initiates the state refresh mechanism.
In Figure 2, no group member connects to RouterB, so RouterB sends a Prune message to the upstream router.
The prune process is as follows:
PIM-DM uses the graft mechanism to enable new group members on a pruned network segment to rapidly obtain multicast data. IGMP helps a leaf router learn whether new group members have joined a multicast group on the connected network segment. If a leaf router learns that new group members have joined multicast group G, the leaf router sends a Graft message to the upstream router. The message requests the upstream router to resume multicast packet forwarding on the downstream interface and to add the downstream interface to the downstream interface list of the (S, G) entry.
A graft process is initiated by a leaf router and ends at the upstream router that receives the multicast packets.
In Figure 3, RouterC no longer sends multicast packets to RouterB after the prune process ends. When HostB joins multicast group G, RouterB initiates the graft mechanism.
The graft process shown in this example is as follows:
To prevent a pruned interface from resuming multicast packet forwarding after the prune timer expires, the first-hop router nearest to the multicast source periodically sends a State-Refresh message throughout the entire PIM-DM network. PIM routers receiving the State-Refresh message refresh the prune timer state. If no group member joins a multicast group on the network segment connected to a leaf router in a pruned branch, the upstream interface connected to this router remains suppressed.
In Figure 4, RouterC's interface connected to RouterB is pruned, and no hosts under RouterB join a group.
The state refresh process shown in this example is as follows:
When multicast packets pass the RPF check on multiple PIM routers connecting to a network segment, the assert mechanism is required to ensure that only one PIM router forwards the multicast packets to the network segment. When a PIM router receives a multicast packet that is the same as the multicast packet it sends to other neighbors, the PIM router sends an Assert message with the destination address 224.0.0.13 to all other PIM routers on the same network segment. The PIM routers carry out assert election by comparing their parameters to those carried in the received Assert message. The election rules are as follows:
A PIM router performs the following operations based on assert election results:
If a router wins the assert election, its downstream interface becomes the assert winner and is responsible for forwarding multicast packets to the shared network segment.
If a router loses the assert election, its downstream interface becomes an assert loser, which is deleted from the downstream interface list of the (S, G) entry and no longer forward multicast packets to the shared network segment.
After an assert election is complete, only one downstream interface exists on the shared network segment and it transmits only one copy of multicast packets. All assert losers periodically resume multicast packet forwarding, causing an assert election each time.
In Figure 5, RouterB and RouterC receive multicast packets from the multicast source. The multicast packets from RouterA pass RPF checks on RouterB and RouterC, so both routers create (S, G) entries. Downstream interfaces RouterB and RouterC are connected to the same network segment, so they both send multicast data to this network segment.
The assert process shown in this example is as follows:
RouterB and RouterC each receive a multicast packet from each other through a downstream interface, but both packets fail RPF checks and are discarded. RouterB and RouterC then send an Assert message to the network segment.
RouterB compares its own routing information with that carried in the Assert message sent by RouterC. RouterB wins the assert election because its route cost to the multicast source is lower. RouterB continues to forward multicast packets to the network segment, whereas RouterC discards multicast packets because these packets fail RPF checks.
RouterC compares its own routing information with that carried in the Assert message sent by RouterB. RouterC fails the assert election because its route cost to the multicast source is higher. RouterC then prohibits its downstream interface from forwarding multicast packets to the network segment and deletes the interface from the downstream interface list of the (S, G) entry.