Skip to content

PIM-SM

Protocol Independent Multicast - Sparse Mode (PIM-SM) is a scalable multicast routing protocol that enables efficient data distribution from senders to receivers spread across multiple network segments. Unlike dense-mode protocols that flood traffic throughout the network, PIM-SM uses a pull-based model where receivers explicitly join multicast groups, making it suitable for wide-area networks and sparse receiver distributions.

PIM-SM is “Protocol Independent” because it does not require a specific unicast routing protocol. It operates on top of any existing unicast routing infrastructure, whether OSPF, BGP, static routes, or any combination thereof. This flexibility allows multicast deployment in networks using any unicast routing strategy.

RouterOS implements PIM-SM to support enterprise multicast applications including video conferencing, IPTV distribution, financial data feeds, and software updates. In RouterOS 7.15.3, the documented CLI surface is limited to basic instance creation, interface templates, static RP entries, and status commands shown in this page.

IP Multicast is a technology that allows efficient data distribution to multiple recipients over a network. Senders transmit to a specific multicast IP address, and receivers indicate their interest in receiving data sent to that address. The network infrastructure then replicates and delivers data from senders to interested receivers without requiring the sender to maintain individual connections.

When senders and receivers reside on the same local network segment, routers are not required for multicast delivery. Communication occurs directly between hosts, and this process can be enhanced through IGMP snooping switches that optimize local multicast traffic. However, when senders and receivers are separated by network boundaries, a multicast routing protocol becomes essential to establish paths for data transmission.

PIM-SM addresses the challenges of multicast routing in sparse receiver environments. Sparse mode means that multicast data is delivered only to network segments where receivers have explicitly joined the group, avoiding the flood-and-prune behavior of dense-mode protocols. This approach dramatically reduces unnecessary traffic in networks where few hosts subscribe to multicast groups.

The protocol relies on two key components: First, routers must discover local receivers on their directly connected segments. For IPv4, this function is provided by the Internet Group Management Protocol (IGMP), while IPv6 uses Multicast Listener Discovery (MLD). Second, routers must exchange multicast routing information to build distribution trees connecting senders to receivers across the network.

RouterOS v7 includes PIM-SM configuration in the main system package, simplifying deployment for modern installations. Older RouterOS versions require an additional multicast package to be installed. The feature is not available on SMIPS devices including hAP lite, hAP lite TC, and hAP mini.

Multicast routing presents unique challenges compared to unicast routing. In unicast routing, each destination has a specific path from any source. In multicast routing, a single source may need to reach multiple receivers, potentially through different paths. The network must efficiently replicate packets at branch points while maintaining optimal paths from sources to receivers.

PIM-SM solves these challenges using a shared tree architecture anchored at a Rendezvous Point (RP). All multicast traffic initially flows through the shared tree, which provides a common distribution structure that any sender can use to reach any receiver in the group. As traffic patterns establish themselves, routers can optionally switch to shortest-path trees originating directly from sources, optimizing delivery paths for high-bandwidth or frequent streams.

The shared tree approach offers significant advantages for networks with sporadic multicast sources. Rather than maintaining source-specific state for every potential sender, routers only need to maintain state for active multicast groups. This scales efficiently to support thousands of multicast groups with relatively few active sources.

PIM-SM operates through a series of exchanged messages that build and maintain multicast distribution state throughout the network. The primary message types include Hello messages for neighbor discovery and maintenance, Join/Prune messages for group membership signaling, Bootstrap messages for RP election, and Register messages for initial source registration.

When a PIM-SM router initializes, it discovers neighboring PIM-SM routers through Hello messages exchanged on all configured interfaces. These Hello messages advertise router capabilities including priority values used in DR and BSR elections. Neighbors form adjacencies and maintain them through periodic Hello messages with configurable hold times.

When a host joins a multicast group through IGMP (IPv4) or MLD (IPv6), the local designated router (DR) receives the membership report. The DR becomes responsible for forwarding traffic for that group and initiates PIM Join messages toward the RP. These Join messages travel hop-by-hop toward the RP, creating state in each intermediate router that establishes the shared tree.

When a sender transmits to a multicast group, the local DR encapsulates the first packets in PIM Register messages and unicasts them to the RP. The RP decapsulates these packets and forwards them down the shared tree to all registered receivers. Simultaneously, the RP may trigger Join messages toward the source to establish a shortest-path tree for more efficient delivery.

As traffic flows and receivers join, the network builds state that efficiently routes multicast traffic from sources to receivers. Periodically, traffic patterns may warrant switching from the shared tree to source-specific trees, a process controlled by the SPT-bit threshold configuration.

The Rendezvous Point serves as the root of the shared tree for each multicast group. All multicast sources initially register with the RP, and all multicast receivers join through paths that converge at the RP. This centralized anchoring provides a predictable rendezvous point for sources and receivers to establish connectivity.

RP selection is a critical design decision in PIM-SM networks. The RP must be reachable from all routers in the multicast domain through the unicast routing infrastructure. In RouterOS 7.15.3, static RP configuration is the only verified configuration method covered here.

Static RP configuration offers simplicity and predictability. The administrator specifies one or more RP addresses, and all routers use these addresses directly. Static RP requires manual coordination when RP addresses change, making it more suitable for smaller, stable networks.

If you need dynamic RP discovery or BSR-driven RP election, verify the exact RouterOS release and command set before deployment. The related configuration properties referenced in older drafts of this page are not available in RouterOS 7.15.3.

PIM-SM designates specific routers to perform critical functions on each network segment. The Designated Router (DR) serves as the primary PIM router on a multi-access network segment, responsible for sending Join/Prune messages toward the RP and processing Register messages from local sources.

DR election occurs through Hello message priority values. Routers exchange priority values, and the router with the highest priority becomes the DR. In case of priority ties, the router with the highest IP address wins. The DR role provides a single point of responsibility, preventing duplicate multicast traffic from multiple routers on the same segment.

On networks with local multicast sources, the DR additionally serves as the Designated Forwarder (DF) for those sources. The DF is responsible for forwarding traffic from local sources onto the multi-access network. This prevents multiple routers from forwarding identical multicast packets, which would cause duplication and inefficiency.

PIM-SM uses several message types to establish and maintain multicast connectivity. Understanding these messages and their roles is essential for troubleshooting and optimizing PIM-SM deployments.

Hello messages serve multiple purposes in PIM-SM: neighbor discovery, adjacency maintenance, and capability negotiation. Routers transmit Hello messages periodically on all PIM-enabled interfaces at the configured Hello interval, typically 30 seconds by default.

Hello messages contain important parameters including the Hello hold time (advertising how long the sender expects Hellos to continue), DR priority (used for Designated Router election), LAN prune delay (indicating the interface’s capability to delay Join suppression), and T-bit (indicating the router’s capability to track joins for multiple sources).

When a router receives a Hello from a new neighbor, it adds the neighbor to its neighbor table and begins maintaining the adjacency. If Hellos stop arriving within the hold time, the neighbor is considered down, and all PIM state associated with that neighbor is removed.

Join and Prune messages are the primary mechanisms for group membership signaling in PIM-SM. Join messages request that upstream routers add the sending router to the distribution tree for specified multicast groups. Prune messages request removal from distribution trees when receivers leave groups.

Join/Prune messages travel upstream toward the RP for (*,G) joins, or toward the source for (S,G) joins. Each message specifies one or more multicast groups and the interfaces through which traffic should be forwarded or withheld.

On multi-access networks, Join suppression occurs when multiple routers have downstream members for the same group. Only the router with the highest DR priority sends Join messages upstream, and other routers suppress their Joins knowing the designated router will maintain the shared tree.

RouterOS 7.15.3 exposes /routing pimsm bsr print as a status command. This page does not document BSR candidate configuration because the previously documented C-RP and C-BSR instance properties are not available in the verified CLI.

Register messages transport multicast traffic from sources to the RP when sources and receivers are separated by PIM-SM routers. The local DR encapsulates the first multicast packet in a Register message and unicasts it to the RP.

Upon receiving a Register message, the RP decapsulates the packet and forwards it down the shared tree to all interested receivers. The RP also sends a Join message toward the source to establish a source-specific tree for more efficient delivery.

When the RP receives sufficient traffic via the source-specific tree, it sends a Register-Stop message to the source DR, instructing it to stop encapsulating packets. Subsequent traffic flows natively through the source-specific tree without encapsulation overhead.

PIM-SM configuration in RouterOS involves creating instances, defining interfaces, and optionally configuring RP selection mechanisms. This section covers basic and advanced configuration scenarios.

For simple multicast scenarios where a single router connects multicast sources and receivers, basic PIM-SM configuration requires minimal steps. This configuration enables the router to respond to IGMP reports and route multicast traffic between connected networks.

Begin by ensuring IP addresses are configured on router interfaces:

/ip address
add address=192.168.10.1/24 interface=ether1 network=192.168.10.0
add address=192.168.20.1/24 interface=ether2 network=192.168.20.0

Configure a PIM-SM instance using default settings:

/routing pimsm instance
add name=pimsm-instance-1

Add interfaces to the PIM-SM instance using interface templates:

/routing pimsm interface-template
add interfaces=ether1,ether2 instance=pimsm-instance-1

The router now listens for IGMP membership reports on configured interfaces and routes multicast traffic between networks with interested receivers. Use the following commands to verify the configuration:

# View active multicast groups
/routing pimsm uib-g print
# View multicast sources and group state
/routing pimsm uib-sg print

For networks requiring manual RP control, static RP configuration provides predictable RP selection without Bootstrap Router complexity. All routers in the PIM-SM domain must be configured with the same static RP information.

Configure the RP address on the designated RP router:

/routing pimsm static-rp
add address=10.0.0.1 instance=pimsm-instance-1

On all other routers in the domain, configure the same RP address:

/routing pimsm static-rp
add address=10.0.0.1 instance=pimsm-instance-1

Multiple static RPs can be configured for the same multicast group range, providing failover capability:

/routing pimsm static-rp
add address=10.0.0.1 instance=pimsm-instance-1
add address=10.0.0.2 instance=pimsm-instance-1

Verify configured static RPs and BSR status:

# View configured static RPs
/routing pimsm static-rp print
# View BSR status information
/routing pimsm bsr print

Interface templates define which interfaces participate in a PIM-SM instance.

Basic interface template configuration:

/routing pimsm interface-template
add instance=pimsm-instance-1 interfaces=ether1,ether2

RouterOS 7.15.3 verification for this page only confirmed the basic configuration surface described above. Advanced features such as SSM range tuning, BSR boundary controls, and multicast boundary controls are omitted here because the previously documented properties were not present in the verified CLI.

ParameterDefaultDescription
name(required)Instance identifier
ParameterDefaultDescription
interfaces(required)Comma-separated interface list
instance(required)PIM-SM instance reference
ParameterDefaultDescription
address(required)RP IPv4 address
instance(required)Instance reference
group224.0.0.0/4Multicast group range
priority192RP priority for this group
disablednoDisable static RP entry
CommandDescription
/routing pimsm neighbor printView PIM neighbors
/routing pimsm bsr printView elected BSR
/routing pimsm static-rp printView configured static RPs
/routing pimsm uib-g printView (*,G) join state
/routing pimsm uib-sg printView (S,G) join state
/routing pimsm interface-template printView interface templates
/routing gmp printView multicast group management state

When PIM-SM neighbors fail to establish, verify basic connectivity and configuration alignment.

Verify interface configuration - Ensure PIM-SM is enabled on both endpoints:

/routing pimsm interface-template/print

Check connectivity - Verify IP reachability between routers:

ping 10.0.0.2

Verify PIM-SM is running - Check that the instance is enabled and interfaces are active:

/routing pimsm instance/print

Check firewall rules - Ensure PIM protocol (103) and IGMP (2) traffic is permitted:

/ip/firewall/filter/print chain=forward protocol=pim

When multicast traffic fails to reach receivers, trace the distribution tree state.

Verify IGMP membership - Check that receivers have joined groups:

/routing gmp/print

Check join state - Verify (*,G) and (S,G) state exists:

/routing pimsm uib-g print
/routing pimsm uib-sg print

Trace toward RP - Follow Join messages upstream to identify missing state:

/routing pimsm neighbor print

Verify RP reachability - Ensure all routers can reach the RP:

ping 10.0.0.1

Check interface traffic - Use torch to observe multicast packets:

/tool torch interface=ether1 protocol=udp dst-port=any

When multicast traffic does not reach receivers through the shared tree, verify that the same static RP is configured consistently across participating routers.

View configured static RPs:

/routing pimsm static-rp print

View BSR status information:

/routing pimsm bsr print

Enable general routing logs if needed:

/system logging add topics=route action=memory
# View all PIM-SM neighbors and status
/routing pimsm neighbor print detail
# View interface template status
/routing pimsm interface-template/print detail
# Check configured static RP entries
/routing pimsm static-rp print detail
# View BSR status
/routing pimsm bsr print detail
# Monitor active multicast groups
/routing pimsm uib-g print
/routing pimsm uib-sg print
# View group management state
/routing gmp print

RouterOS 7.15.3 verification for this page did not expose configurable PIM-SM hello or hold timers. Treat timer tuning guidance from older examples with caution and verify the exact CLI on the target release before relying on it.

PIM-SM maintains state for each multicast group with active receivers. Large-scale multicast deployments require appropriate resources.

Each active multicast group requires memory for (*,G) state on routers along the shared tree. Additional (S,G) state is created for sources on shortest-path trees. Monitor memory usage when deploying thousands of concurrent multicast groups:

/system/resource/print

On routers with limited memory, consider SSM deployment which eliminates (*,G) state and only maintains (S,G) state for actively used source-receiver pairs.

Interface templates with many interfaces increase PIM-SM processing requirements. Consider splitting templates by interface function:

/routing pimsm interface-template
add interfaces=ether1,ether2 instance=pimsm-instance-1
add interfaces=ether3-ether10 instance=pimsm-instance-1

RP routers represent central points of failure and attack in PIM-SM networks. Protect RP routers through physical and logical security measures.

Deploy RPs on secure network segments with restricted access. Use access lists to permit only authorized PIM traffic:

/ip/firewall/filter/add chain=forward protocol=pim action=accept
/ip/firewall/filter/add chain=forward protocol=pim action=drop

Consider deploying multiple RPs to provide redundancy and load distribution across secure infrastructure.

PIM-SM lacks native message authentication in RouterOS. Networks requiring message integrity should deploy authentication at lower layers.

If you protect multicast transport with IPsec, follow the current IPsec documentation for the exact policy syntax used by your RouterOS release instead of relying on PIM-specific examples.

Deploy within controlled network boundaries where unauthorized PIM routers cannot inject false messages.

Local receiver management through IGMP and MLD should be protected against spoofing.

Deploy IGMP snooping switches to filter unauthorized IGMP reports on access ports:

/interface/bridge/settings set use-ip-firewall=no
/interface/bridge/port set [find] pvid=1

Use IGMP querier configuration to ensure only authorized routers send queries:

/routing gmp set query-interval=125s
  1. Deploy redundant static RPs where appropriate and verify behavior in your target RouterOS release.

  2. Use static RP consistently across participating routers unless you have independently verified a dynamic RP workflow on the deployed release.

  3. Keep interface-template configuration minimal and consistent across all PIM-SM routers.

  4. Monitor multicast group membership patterns to appropriately size RP resources and network capacity.

  5. Deploy PIM-SM only on devices with adequate CPU and memory for expected multicast scale.

  6. Verify any source-specific multicast workflow against the actual RouterOS CLI before documenting or deploying it.

  7. Document RP addresses and multicast group policies for operational reference.

  8. Test multicast functionality regularly using traffic generators and receivers to verify operational readiness.

  9. Use firewall policy and network segmentation to limit multicast scope where needed.

  10. Deploy IGMP snooping switches on access networks to optimize local multicast traffic distribution.

  • IGMP - Internet Group Management Protocol for IPv4 multicast receiver management
  • MLD - Multicast Listener Discovery for IPv6 multicast receiver management
  • GMP - Group Management Protocol for multicast group configuration
  • OSPF - Unicast routing often used with PIM-SM
  • BGP - BGP multicast address family for inter-domain multicast
  • Multicast Routing - General multicast routing concepts and RouterOS implementation