My Knowledge Base

User Tools

Site Tools


Multicast PIM-SM Introduction


  1. Protocol-Independent Multicast Sparse Mode
  2. Explicit Join
  3. PIM-SM uses combination of Source Tree and Shared Tree
  4. PIM-SM create empty distribution tree
  5. Join Request, then add the router
  6. central of tree has RP (Rendezvous Point) router
  7. Receiver connected router registered to RP
  8. Sender sends multicast packet to RP, the traffic Receiver via RP, path information optimized
    1. unused hop removal
  9. Messages
    1. Receiver Join: (*, G) Join to RP
    2. Sender Register: (S, G) Register to RP
  10. Sender to RP: Source Tree
  11. RP to Receiver: Shared Tree
  12. RP centric multicast packet forward path is not SPT typically
  13. Switchover feature enables Sender and Receiver SPT
    1. LHR(Last Hope Router) recogznize sender IP address, then switchover.
  14. PIM-SM does not flooding multicast packet, forward receiver direction only, and enables shortest path communication by switchover feature.
  15. therefore, PIM-SM is recommended.
  16. RP is configurable each multicast groups.
  17. Also, single RP can be multiple multicast group RP.

(S, G) and (*, G)

  1. Sender to RP: Source Tree (S, G) entry
  2. RP to Rceiver: Shared Tree (*, G) entry
  3. PIM-SM also needs RPF check successful
    1. (S, G) entry determined RPF Interface by Sender IP address
    2. (*, G) entry determined RPF Interface by RP IP address

PIM Neighbor Detection

  1. PIM has
    1. PIMv1
    2. PIMv2
  2. This page assume PIMv2 typically used.
  3. Enable PIM-SM
  4. PIM-SM enabled interface send PIM Hello Message to (ALL-PIM-Routers)
  5. same segment all PIM router every 30 sec.
  6. PIM must be enabled that router, sender, receiver connected I/F, all possible multicast packet path.
  7. PIM-DR election on multi-access network
    1. largest PIM DR priorities router
    2. smallest IP address router
  8. PIM DR router does following roles
    1. send PIM Join Message: create Shared Tree (*, G)?
    2. send PIM Register Message: create Source Tree (S, G)?

(*, G) entry

  1. flags: S
  2. (*, G) entry automatically created if following any condition satisfied
    1. When first (S, G) entry created
    2. Receive IGMP Membership Report from Receiver
    3. Receive PIM (*, G) Join Message
  3. RPF
    1. Incoming Interface: shortest path to RP IP address
    2. RPF nbr: PIM neighbor IP address for Incoming Interface direction
    3. at RP, Incoming Interface is Null, RPF nbr is
  4. OIL: following interfaces will be added
    1. PIM (*, G) Join Message receive interface
    2. Receiver exist interface
    3. ip gmp join-group, ip igmp static-group configured interface

(*, G) Join Message

  1. IGMP Membership Report (IGMP Join Message) received router create (*, G) entry
  2. PIM-DM also does same thing.
  3. PIM-SM after (*, G) creation done, send PIM (*, G) Join Message to RP direction
  4. PIM (*, G) Message received routers create (*, G) entry
  5. PIM-DM (*, G) OIL will registered PIM neighbor interface
  6. PIM-SM (*, G) OIL will registerd PIM (*, G) Join Message received interface
  7. So, PIM-SM not flooding multicast packet, alternatively PIM (*, G) Join Message explicit requested interface only forward multicast packet.

(S, G) entry

  1. (S, G) entry automatically created following any condition satisfied
    1. Receive multicast packet from Sender (First Hop Router)
    2. PIM (S, G) Join Message or PIM (S, G) Prune Message received
    3. Receive PIM Register Message (RP)
  2. RPF
    1. Incoming Interface: Shortest Path to Sender IP address
    2. RPF nbr: PIM neighbor IP address for Incoming Interface direction
  3. OIL following interfaces will be added exclude RPF I/F
    1. PIM (S, G) Join Message Received interface
    2. Receiver exist interface
    3. ip igmp join-group, ip igmp static-group configured interface

PIM (S, G) creation flow

(*, G) creation flow, refer to above.

PIM Register Message

  1. Sender send multicast packet
  2. If receive the multicast packet, FHR (Fisrt Hop Router) create (S, G) entry
  3. If (*, G) entry not exist, (*, G) also will be created
  4. (S, G) entry Incoming Interface is multicast packet received interface
  5. Outgoing Interface is currently not recognize Receiver, so set to Null
  6. So, currently FHR cannnot forward multicast packet

Next phase

  1. FHR send PIM Register Message that multicast packet capsuled by unicast packet.
  2. The multicast packet forward to RP (Rendezvous Point) by PIM Register Message.
  3. Finally, On RP PIM Register Message received, extract capsuled multicast packet and create (S, G) entry.
  4. RP forward by the (S, G) entry (?)

PIM (S, G) Join Message

  1. PIM Register request to create Source Tree (SPT: Shortest Path Tree) between RP and FHR
  2. RP send PIM (S, G) Join Message to Sender
  3. The PIM (S, G) Join Message received routers creates (*, G), (S, G) entry.
  4. Finally, PIM (S, G) Join Message reached to FHR, Outgoing Interface changed Null to interface for direction to RP

So, Source Tree (S, G) created above process: PIM Register Message, PIM (S, G) Join Message

  1. Now, Multicast traffic can be forwarded by Source Tree (S, G) from Sender to RP
  2. This time, PIM Register Message not required anymore.
  3. RP send PIM Register-stop Message to FHR by unicast packet
  4. When FHR receive Register-stop Message, will stop to send PIM Register Message

SPT Switchover

  1. PIM-SM Switchover feature enables SPT between Sender and Receiver.
  2. LHR (Last Hop Router) will trigger this feature.
  3. This feature assume (*, G) Shared Tree, (S, G) Source Tree already created.

Phase 1

  1. If multicast packet transport rate exceed SPT Threshold on LHR, set J flag to (*, G) entry.
  2. Cisco router SPT Threshold default value is 0.
  3. So, actually LHR set J flag when Receiver connected.
  4. LHR send PIM (S, G) Join Message to Sender hop by hop.
  5. So, (S, G) entry and Source Tree created.

But this phase has multicast packet duplicate problem because Shared Tree, Source Tree multicast packet.

  1. Source Tree and Shared Tree boundary router send (S, G) RP-bit Prune Message to RP to stop multicast packet coming from Shared Tree
  2. Also RP send (S, G) Prune Message.
  3. As a result, the multicast packet via RP stopped.
  • How about complex Source Tree with distributed Receivers?

PIM-SM Flags and expire timer

  • S Sparse
  • C Connected
  • L Local
  • P Pruned
  • T SPT-bit set
  • F Registered Flag
  • R RP-bit set
  • J Join SPT
    • (*, G): switchover threshold
    • (S, G): join the source tree by switchover

PIM-SM entry deletion

  • (*, G) entry:
    • Receive IGMP Membership Report from receiver in 180 sec.
    • Receive PIM Join Message/PIM Prune Message in 180 sec.
    • If (S, G) entry exist, also keep the (*, G) entry.
  • (S, G) entry:
    • receive multicast packet in 180 sec.

PIM-SM Distribution Tree Creation Flow

  1. Prerequisites
    1. switchover is disabled: ip pim spt-threshold infinity
    2. R1, R2, R3 knows R2 is RP(Rendezvous Point) as multicast group
    3., is omitted.
  2. Create Shared Tree
    1. Receiver Sends IGMP Join Message(IGMP Membership Report) to Router.
    2. R3 creates (*, on multicast routing table. flags: SC
      1. Currently, Sender not sending multicast data.
    3. R3 sends PIM (*, Join Message to R3's (*, RPF nbr (R2).
    4. R2(RP) receive PIM (*, Join Message and R2 creates (*, entry: flags: S
      1. R2 Looopback interface is RP address
      2. RPF nbr is
      3. OIL is Gi0/2
    5. (*, shared tree creation is completed. At this time, R1 not knows
  3. Create Source Tree
    1. PIM Register
    2. PIM Register-stop

Key Terms

  1. PIM Join
  2. PIM Register
  3. PIM Register-stop
  4. ip pim spt-threashold infinity

PIM-SM Distribution Tree Creation Flow with SPT Switchover

  1. SPT: Shortest Path Tree
  2. Shared Tree
    1. J flag set on R3(leaf router)
    2. PIM (*, Join Message send

I can't understand well.


  1. PIM-SM must define RP.
  2. RP will be defined each multicast group.
  3. Static
    1. Static RP
      1. ip pim rp-address
  4. Dynamic
    1. Auto-RP (Cisoc Proprietary)
    2. BSR (Standard)
  5. Static RP is preferred for small scale network.
  6. RP Dynamic definition(Auto-RP, BSR) is preferred for large scale network because easy to manage many of multicast groups and RP redundancy point of view.
  7. In Auto-RP, set RP Candidate which want to be RP(Rendezvous Point)
  8. RP Candidate sends RP-Announce Message (Cisco-RP-Announce) every 60 secs.
  9. Next, set RP Mapping Agent to Cisco router.
  10. RP Mapping Agent receive RP-Announce Message and make decition RP address each RP.
  11. RP Mapping Agent sends to all PIM router (Cisco-RP-Discovery).
  12. Cisco router joins Cisoc-RP-Discovery multicast group by default to learn dynamically RP address.
  13. 1 router also can be a RP Candidate and RP Mapping Agent.
  14. When RP Candidate fails, RP Mapping Agent will remove if RP Mapping Agent can't receive (Cisco-RP-Announce) packet from the RP Candidate in 180 sec, and sends new RP Candidate address to (Cisco-RP-Discovery) all PIM routers.

RP Mapping Agent Redundancy

  1. RP Mapping Agent can be redandant.
  2. But no primary, secondary role is not defined.
  3. Simply multiple RP Mapping Agent exists.
  4. Multiple RP Mapping Agent receive (Cisco-RP-Announce), and multiple RP Mapping Agent decide same RP decision aolgorithm, also sends same (Cisco-RP-Discovery) packet.
  5. Finally, all PIM router receive multiple same RP (Cisco-RP-Discovery) packets and newly arrived Cisco-RP-Discovery Message overwrite.
  6. If RP Mapping Agent fails, only decrease Cisco-RP-Discovery Message, and other any multicast communication not effect.

Auto-RP Problem Description

  1. Auto-RP forward Cisco-RP-Announce, and Cisco-RP-Discovery Message by multicast.
  2. PIM-SM always require RP any multicast traffic.


Static RP is not preferred configuration for Auto-RP's RP.

  1. Configure Static RP for Auto-RP mutlicast group

Following configuration is preferred typically for Auto-RP's RP.

  1. Use Cisco router interface level configuration: sparse-dense-monde.
  2. Use Cisco router global level configuration: ip pim autorp listener.

Configure Static RP for Auto-RP mutlicast group

  1. Configure Static RP for Auto-RP multicast group (Cisco-RP-Announce), (Cisco-RP-Discovery).
  2. require all PIM router configured same settings.
  3. and needs consideration for the RP failure.
  4. So, this idea is not recommended.

Interface level configuration: sparse-dense-mode

  1. Need to configure all PIM router interfaces: sparse-dense-mode.
  2. This feature allow unidentified RP multicast packet can flood by Dense mode.
  3. RP identified multicast packet forward by Sparse mode.

Global level configuration: ip pim autorp listener

  1. Need to configure all PIM router global config: ip pim autorp listener.
  2. This feature allow only RP-Announce, RP-Discovery Message will flood by Dense mode.
  3. This feature called “Auto RP Listerner” feature.


  1. BSR is stands for Boot Strap Router.


Bidrectional PIM(Bidir-PIM)

  1. Bidirection PIM uses same distribution tree: Sender to RP, RP to Receiver.
  2. Bidir-PIM is derived from PIM-SM.
  3. Video streaming application is one-to-many multicast scenario.
  4. Video conference is many-to-many multicast scenario. In this case, Sender is also Receiver.
  5. Bidir-PIM is appropriate that routing many-to-many multicast packet routing.
  6. many-to-many creates hundreds of (S, G) entry, complicated multicast packet forward path, consume much more memory resource.
  7. Bidir-PIM uses same tree, Sender to RP, and RP to Receiver.
  8. Pros.
    1. Multicast packet forward path is simplified.
    2. Router has only shared tree (*, G) entry, so router load decrease.

DF(Designated Forwarder)

  1. DF(Designated Forwarder) is a router has best path to RP.
  2. DF is elected link by link.
    1. DF Election algorithm:
      1. Most least AD(Administrative Distance)/Metric value to RP address in unicast routing table.
      2. If No.1 is same value, largest interface IP address.
  3. DF role
    1. Foward multicast packet from Sender to RP.


Shared Tree Creation Flow Between Receiver and RP

  1. Almost same to PIM-SM.


  1. Receiver sends IGMP Join Message (IGMP Membership Report).
  2. Receive IGMP Join Message in DF interface, create (*, G) entry.
  3. Router sends PIM (*, G) Join Message toward the RP.
  4. Router receive PIM (*, G) Join Message in DF interface, create (*, G) entry.
  5. Repeat this step.

In Bidir-PIM, this flow only execute when receive DF interface.
If not DF interface receive IGMP Join Message, or PIM (*, G) Join Message, these messages will be discarded.

  1. Switchover do not work.
  2. PIM (S, G) Join Message, Register related Messages will be discarded in interface.

Send multicast pakets from Sender

  1. Prerequisite
    1. PIM router knows RP address whether statically or dynamically.
    2. Router forwards multicast packet from Sender toward RP.
  2. Sender to RP
    1. Receive multicast packet from Sender in DF interface.
    2. Forward multicast packet to the (*, G) entry Incoming Interface(IIF).
  3. RP to Receiver
    1. Receive multicast packet from RP in RPF interface.
    2. Forward multicast packet to the (*, G) entry Outgoing Interface List(OIL).
  4. Bidir-PIM typically implemented many-to-many configuration that a host has role of Receiver and Sender.
  5. So, RP will be placed central of network.

SSM(Source Specific Multicast)

  1. SSM is derived from PIM-SM.
  2. Create (S, G) entry only, so SSM after switchover only behavior.
  3. PIM-SM require RP due to Sender is unknown in advance.
  4. If specifc Sender send to many Receiver one-to-many, only needs (S, G) Join from the beginning.


  1. Router must support PIM-SSM.
  2. Receiver must support IGMPv3.
  3. IGMPv3 Membership report use INCLUDE mode.
  4. SSM does not support IGMPv3 EXCLUDE mode.

How SSM works

  1. Receiver send a signaling message to join specific Sender S, specific multicast group G.
  2. Receiver must support one of following signaling protocol:
    1. IGMPv3(typical for SSM)
      1. IGMPv3 INCLUDE mode Membership Report.
    2. IGMPv3 lite
      1. Cisco proprietary API for using SSM.
      2. Used by IGMPv3 not supported host.
    3. URD(URL Rendezvous Directory)
      1. Cisco proprietary Web browser base application.
      2. Using URD intercept URL, send (S, G) to LHR(Last Hop Router).

How SSM works with IGMPv3

  1. Assume S =, G =, (,
  2. Receiver send IGMPv3 (, Join Message(IGMPv3 INCLUDE mode Membership Report).
  3. Create (, entry.
  4. Send PIM (, Join Message toward Sender.
  5. Multicast routing by SSM not required RP address.

SSM characteristics

  1. PIM-SM don't care abount Sender address.
  2. In SSM, Receiver join specific source only multicast group, so can be prevent malicious Sender DoS attack.
  3. SSM multicast address range: ~ (
    1. In Cisco equipment, to use SSM above range, configure following:
ip pim ssm default
  1. If you want to use out of range, define by this command:
access-list 1 permit
ip pim ssm range 1
  1. ISM(Internet Standard Multicast service)

Anycast RP / MSDP

Anycast RP

  1. Anycast RP is the feature RP redundancy and load balancing by configure Anycast address to multiple RP
  2. Anycast communication share 1 address by settting the same address on multiple interfaces.
  3. This shared address called Anycast address.
  4. Anycast address to use IP address is configured at Loopback interface as 32 bits host address (ex. Loopback0
  5. RP address configuration is any configuration available: Static RP, Auto-RP, BSR.
  6. Auto-RP, BSR can be redundant, but failover is slow, and RP load balancing is not available.
  7. This Implmentation is more efficient large network.

MSDP(Multicast Source Discovery Protocol)

  1. Anycast RP configuration, PIM-SM cannnot forward multiple RP multicast traffic.
  2. Inter-RP multicast forwarding uses MSDP(Multicast Source Discovery Protocol).
  3. MSDP is originated forward multicast packet between different AS, and can be established MSDP peer between different AS RP.
  4. Using MSDP with Anycast RP, when send PIM Register Message, then multicast packet capsuled by MSDP SA(Source Active) Message will send to opposite side RP, so each RP realize active Sender exist.
  5. If which RP failed, IP routing converged to to active RP.
  6. First MSDP SA Message exposed to multicast packet forward toward Receiver by Shared Tree.
  7. MSDP SA Message received RP2 realize Sender IP address by receiving first capsuled packet.
  8. RP2 send to RP1 PIM (S, G) Join Message
  9. Afterward, RP2 Join Source Tree, and routing by multicast packet not capsuled MSDP SA Message.


tech/network/cisco/multicast/routing/pim/pim-sm/pim-sm.txt · Last modified: 2021/07/23 09:12 by wnoguchi