PIM Sparse-Mode (SM) Notes – RFC 4601

Uses both Shared-Tree (*,G) and Source-Tree (S,G).

PIM Sparse-Mode (SM) steps:

  1. Discover PIM neighbor and elect DR.
    PIM is the infrastructure to deliver the multicast packet. It builds the multicast network hop-by-hop. It takes the advantage of the routing table to perform RPF but it does not really matter what routing protocol derives it from. Hence this is why it is called Protocol Independent Multicast (PIM).

  2. Discover RP.
    • Without RP, Sources cannot register. (See point #3 where PIM Register message need to be sent to RP).
    • Without RP, Receivers cannot join (See point #4 where PIM Join cannot be processed).
    • All routers must agree on the same RP address on a per-group basis.
    • RP address can be assigned:
      • Static
      • Dynamic:
        • Auto-RP
          • Candidate RP will announce its existence via (*,
          • Mapping Agent will listen to (*, for RP announcement and will advertise it via another group (S,
          • Dynamic RP assignment is preferred over staticaly configured RP.
          • There’s a problem with model. Receivers need RP to join the group. But without RP, receivers will not be able to join the group. Solutions:
            • Assign static RP for and (which is basically a static RP assignment). Or,
            • PIM Sparse-Dense mode. Dense mode for groups without RP, Sparse for all other groups. Or,
            • Auto-RP listener. Dense mode for groups without RP, Sparse for all other groups.
      • BSR. RFC 5059.
        • RP candidate unicast PIM (Candidate-RP-Advertisement message with PIM type value of 8 for a Candidate-RP-Advertisement message) to advertise itself to BSR.
        • BSR advertise RP info to others via multicast PIM on a hop-by-hop basis.

  3. Tell RP about sources (PIM Register).
    • RP learns about source through unicast PIM Register mesages.
    • When first-hop router connected to send hears traffic, a Unicast Register message is sent to the RP.
    • If multiple first-hop routers exist, only DR register.
    • Register tells the RP about an (S,G) from DR.
    • If RP accepts this message, it acknowledges with Register Stop and insert (S,G) into the table.
    • At this point, only DR and RP know (S,G) until it has receiver comp up. (In DM, all routers will know about (S,G)).
    • DR is elected by the highest DR priority value or highest IP address.
    • Configuring the Designated Router priority.
      By default, DR priority value is 1. You can change this value by entering the following command:
    • hostname(config-if)# pim dr-priority <value>

      The <value> argument can be any number from 1 to 4294967294. The higher the value the better.

    • Filtering PIM Register Messages.
      You can filter the PIM Register messages with the following command:
    • hostname(config)# pim accept-register {list ACL | route-map MAP-NAME}

  4. Tell RP about receivers (PIM Join).
    • RP learns about receivers through PIM Join messages. It tells the RP to add an interface to the Outgoing Interface List (OIL) for (*,G) using IGMP Report message. Router that attached to the receiver will replace the Querier message to PIM Join message up to the RP hop by hop via PM peering.
    • When the last-hop router (Querier) receives an IGMP Membership Report, a PIM Join message is generated up to the reverse path tree to the RP. IGMP Report => PIM Join.
    • All routers in the reverse path install (*,G) and forward the PIM Join hop-by-hop to the RP.
    • At this point the RP and all down stream devices torward the receiver know (*,G).
    • Implicitly, check (*,G) at RP for correct Join message.

  5. Build shared tree from sender to receiver through RP. (Merging the trees)
    • One the RP knows both sender and receiver, RP sends a PIM Join msg up reverse path to source.
    • All routers in the reverse path from the RP to the source install (*,G) with OIL pointing towards RP.
    • Once (S,G) begins to flow, the tree is built end-to-end through the RP.

  6. (Optional) If there’s a better path between sender to receiver compared via RP, it will join the shortest path tree and leave the shared tree.
    • The Shared tree is made up of two SPTs (S,G).
      • SPT from receiver to RP.
      • SPT from RP to sender.
    • SPT from sender to receiver may be sub-optimal than Shared-tree.
    • To fix this, at last-hop router:
      • Joins SPT to source with (S,G) Join.
      • Leave the RPT by sending (*,G) Prune to RP.
    • Can be modified with “ip pim spt-threshold”.

      Routing Table Maintenance.

    • Both DM and SM uses State Refresh to ensure that feeds do no timeout. (*,G) Join sent to RP or up SPT to refresh the OIL.
    • Sparse Prune message can be used to speed up state information timeout if IGMP Leave is heard from end host.

Leave a Reply