< Home

PIM-DM

Fundamentals

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.

Neighbor Discovery

PIM routers send Hello messages through PIM-enabled interfaces. In a Hello message:
  • The destination address is 224.0.0.13 (indicating all PIM routers in the same network segment).
  • The source address is the IP address of the interface that sent the Hello message.
  • The time to live (TTL) value is 1.

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.

Flooding

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:

  • If the network segment connected to the leaf router has group members, the leaf router adds its interface that is connected to the network segment to the downstream interface list of the (S, G) entry, and forwards subsequent multicast packets to the group members.
  • If the network segment connected to the leaf router has no group member and the leaf router does not need to forward multicast packets to downstream PIM neighbors, the leaf router initiates the prune mechanism and stops forwarding.

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.

Figure 1 Flooding mechanism

The flooding process is as follows:

  1. Multicast source S sends a multicast packet to multicast group G.
  2. RouterC receives the multicast packet and performs the RPF check based on the unicast routing table. If the packet passes the RPF check, RouterC creates an (S, G) entry, in which the downstream interface list contains interfaces connected to RouterA and RouterB. RouterC forwards subsequent packets to RouterA and RouterB.
  3. RouterA receives the multicast packet from RouterC. The packet passes the RPF check, and RouterA creates an (S, G) entry, in which the downstream interface list contains the interface connected to HostA. RouterA forwards subsequent packets to HostA.
  4. RouterB receives the multicast packet from RouterC. Because the downstream network segment does not have group members or PIM neighbors, RouterB sends a Prune message to RouterC.

Pruning

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:

  • Graft

    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.

  • State Refresh

    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.

Figure 2 Pruning mechanism

The prune process is as follows:

  1. RouterB sends a Prune message to RouterC, instructing RouterC not to forward data to the downstream network segment.
  2. After receiving the Prune message, RouterC stops forwarding data to its downstream interface connected to RouterB, and deletes this downstream interface from the (S, G) entry. The prune process for this network segment ends. RouterC sends multicast packets only to RouterA, which then forwards the packets to connected group members, such as HostA.

Graft

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.

Figure 3 Graft mechanism

The graft process shown in this example is as follows:

  1. RouterB wants to resume packet forwarding to HostB before the next flood-prune process, so it sends a Graft message to RouterC, requesting RouterC to resume multicast packet forwarding on the downstream interface connected to RouterB.
  2. After receiving the Graft message, RouterC resumes multicast packet forwarding on the interface and adds the interface to the downstream interface list of the (S, G) entry. The graft process for RouterB ends. RouterC sends subsequent multicast packets to RouterB, which then forwards the packets to HostB.

State Refresh

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.

Figure 4 State refresh mechanism

The state refresh process shown in this example is as follows:

  1. RouterC sends a State-Refresh message to RouterA and RouterB.
  2. RouterC has a pruned interface and refreshes the prune timer state of this interface. When the next prune-graft process starts, the pruned interface is still disabled from forwarding multicast packets, because no group members connect to RouterB.

Assert

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:

  1. If these routers have different unicast routing priorities, the router with the highest unicast routing priority wins.
  2. If these routers have the same unicast routing priority, the router with the smallest route cost to the multicast source wins.
  3. If these routers have the same unicast routing priority and the same route cost to the multicast source, the router with the highest IP address for the downstream interface wins.

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.

Figure 5 Assert mechanism

The assert process shown in this example is as follows:

  1. 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.

  2. 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.

  3. 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.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >