Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Understanding PIM for IPv4 Multicast

    The IPv4 implementation of PIM supports PIM dense mode, PIM sparse mode, PIM sparse-dense mode, and PIM source-specific multicast (PIM SSM).

    Figure 1 represents how PIM builds a source, group (S,G) entry in a source-rooted tree (SRT). When multiple routers are connected to a multiaccess network, one router becomes the designated router. The designated router receives data from the source on interface 1/0 and multicasts the data to its downstream neighbors on interfaces 1/1, 2/0, and 2/1. In the designated router routing table, the entry for this operation lists the source as the IP address of the source and the group as the IP address of the multicast group.

    Figure 1: Source-Rooted Tree

    Source-Rooted Tree

    Neighbors exchange hello messages periodically to determine the designated router. The router with the highest network layer address becomes the designated router. If the designated router subsequently receives a hello message from a neighbor with a higher network layer address, that neighbor becomes the designated router.

    The IPv4 implementation of PIM supports the following modes:

    PIM Dense Mode

    PIM dense mode uses a reverse-path multicast, flood-and-prune mechanism. The protocol was developed for situations that meet one or more of the following criteria:

    • Sources and receivers are close together, and there are many more receivers than sources.
    • There is a constant stream of multicast data.
    • There is a lot of multicast data.

    Dense-mode routing protocols use SRT algorithms. An SRT algorithm establishes a tree that connects each source in a multicast group to the members of the group. All traffic for the multicast group passes along this tree.

    Figure 2 illustrates how PIM dense mode works. When a source sends a multicast packet to a first-hop router, the first-hop router multicasts that packet to its neighbors. Those neighbors in turn forward the packet to their neighbors and their hosts that belong to the multicast group. If a neighbor has no hosts that belong to the multicast group and has no other PIM neighbors, it returns a prune message to the first-hop router. The first-hop router does not multicast subsequent packets for that group to neighbors who respond with prune messages.

    Figure 2: PIM Dense Mode Operation

    PIM Dense Mode Operation

    Overriding Prunes

    If a host on a previously pruned branch requests to join a multicast group, it sends an IGMP message to its first-hop router. The first-hop router then sends a graft message upstream.

    PIM routers send join messages on multiaccess interfaces to override prune messages. For example, if a PIM router sent a prune message to indicate that it had no hosts for a multicast group, and one of its hosts subsequently requests to send a packet to that group, the router sends a join message to the first-hop router.

    Preventing Duplication

    If there are parallel paths to a source, duplicate packets can travel downstream through different routers to the network. If a forwarding router receives a multicast packet on its outgoing interface, the router identifies that the packet is a duplicate and notifies the upstream routers. See Figure 3.

    Figure 3: Detecting Duplication

    Detecting Duplication

    The upstream routers responsible for the duplication send assert messages to determine which router becomes the forwarder. Downstream routers listen to the assert messages to discover which router becomes the forwarder.

    PIM Sparse Mode

    This implementation of PIM sparse mode supports the following features:

    • Rendezvous point (RP) routers
    • Designated routers and designated router election
    • Join/prune messages, hello messages, assert messages, and register messages
    • Switching from a shared tree to a shortest path tree (SPT)
    • (*,*,RP) support for interoperation with dense-mode protocols
    • RPF checks of multicast entries when unicast routing configuration changes
    • Timers for tree maintenance
    • Border, null, Rendezvous Point Tree (RPT), SPT, and wildcard flags

    PIM sparse mode resolves situations that meet one or more of the following criteria:

    • The multicast group contains few receivers.
    • Multicast traffic is infrequent.
    • Wide area networks (WANs) separate sources and receivers.

    Sparse-mode routing protocols use shared trees. In a shared tree, sources forward multicast datagrams to a directly connected router, the designated router. The designated router encapsulates the datagram and unicasts it to an assigned RP router, which then forwards the datagram to members of multicast groups. See Figure 4.

    Figure 4: PIM Sparse Mode Operation

    PIM Sparse Mode Operation

    In PIM sparse mode, an RP announces a source and establishes paths from the source to members of a multicast group before multicasting any datagrams. RPs transmit join messages to become part of the shared tree that enables distribution of packets to the multicast group.

    However, when a source starts multicasting datagrams, PIM sparse mode can switch to an SRT—known in PIM sparse mode as an SPT—to improve the network's efficiency. Although shared trees minimize the traffic in the network and the costs associated with unnecessary transmission of data, the routes in a shared tree might be longer than those in an SPT. See Figure 5.

    Figure 5: Shared Tree Versus SPT

    Shared Tree Versus SPT

    The designated routers on the network determine when the source switches from a shared tree to an SPT. A designated router switches to the SPT when it receives a certain number of packets which you can configure.

    When all designated routers associated with a specific RP router have switched to the SPT, the RP router sends a join/prune message toward the multicast source. When the multicast source receives this message, it stops sending multicast data through the SPT.

    Joining Groups

    A host's designated router (DR) sends join messages to the RP when that host wants to join a group. When a host wants to leave a group, it communicates with its designated router through IGMP. When the designated router no longer has any hosts that belong to a particular group, it sends a prune message to the RP.


    PIM sparse mode uses timers to maintain the networking trees.

    Note: PIM sparse mode routers poll their neighbors and hosts for various pieces of information at set intervals.

    If a PIM sparse mode router does not receive information from a neighbor or host within a specific time, known as the hold time, it removes the associated information from its routing tables.

    You can configure how often an interface sends hello messages (hello interval) and how often routers send RP announce messages (RP announce interval). The hold-time associated with hello messages is 3.5 times the hello interval, and the holdtime associated with RP announce messages is 2.5 times the RP announce interval.

    All other timers are fixed and take the default values recommended in RFC 2934—Protocol Independent Multicast MIB for IPv4 (October 2000).

    PIM Sparse Mode Bootstrap Router

    PIM sparse mode routers need the address of the rendezvous point (RP) for each group for which they have (*,G) state. They obtain this address either through a bootstrap mechanism or through static configuration. PIM sparse mode routers commonly use one of two bootstrap mechanisms: bootstrap router (BSR) or auto-RP. Auto-RP is standards based, but is not used in IPv6 implementations, so BSR configuration has become more popular.

    When implemented, BSR operates as follows:

    1. One router in each PIM domain is elected the BSR.
    2. All the routers in the domain that are configured to be RP candidates periodically unicast their candidacy to the BSR.
    3. The BSR picks an RP set from the available candidates and periodically announces this set in a bootstrap message.
    4. Bootstrap messages are flooded hop by hop throughout the domain until all routers in the domain learn the RP set.

      Note: A PIM router can receive group-to-RP mappings from either BSR or auto-RP, but not from both. Because BSR and auto-RP use different mapping algorithms, the mechanisms cannot coexist.

      Note: Static-override is configured using the override switch in the ip pim rp-address command.

      Caution: The maps distributed by BSR and Auto-RP for the same RP announcements may be different. Because the Auto-RP mapping agent resolves mapping conflicts, a PIM router that applies the BSR mapping algorithm to an Auto-RP distributed map should produce the same result as a router that applies the Auto-RP mapping algorithm. However, the reverse is not true. A PIM router that applies the BSR mapping algorithm to a BSR distributed map may produce a different result to a router that applies the Auto-RP mapping algorithm. This means that a PIM IPv4 domain can operate either BSR or Auto-RP.

    PIM Sparse-Dense Mode

    In PIM sparse-dense mode, if an RP is not known for a group, the router sends data using PIM dense mode. However, if the router discovers an RP or you configure an RP statically, PIM sparse mode takes over.

    You can configure both PIM dense mode and PIM sparse mode commands in PIM sparse-dense mode.

    PIM Source-Specific Multicast

    PIM SSM is an extension of the PIM protocol. Using SSM, a client can receive multicast traffic directly from the source. PIM SSM uses PIM sparse mode functionality to create an SPT between the client and the source, but builds the SPT without using an RP.

    By default, the SSM group multicast address is limited to the IP address range to You can use the ip pim ssm command to extend SSM operations into another Class D range. (See Configuring PIM for IPv4 SSM .)

    An SSM-configured network has the following advantages over a traditionally configured PIM sparse mode network include the following:

    • No need for shared trees or RP mapping (no RP is required).
    • No need for RP-to-RP source discovery through Multicast Source Discovery Protocol (MSDP).
    • Simplified administrative deployment; you need only configure PIM sparse mode on all router interfaces and issue the necessary SSM commands (including specifying IGMPv3 on the receiver local area network).
    • Support for source lists; you can use source lists, supported in IGMPv3, where only specified sources send traffic to the SSM group.

    In a PIM SSM–configured network, an E Series router subscribes to an SSM channel (by means of IGMPv3 or by means of IGMP ssm-mapping for IGMPv2/v1 joins), requesting to join group G and source S. The directly connected PIM sparse mode router, the designated router of the receiver, sends an (S,G) join message to its RPF neighbor for the source. For PIM SSM, the RP is not contacted in this process by the receiver (as happens in normal PIM sparse mode operations).

    Published: 2014-08-19