PIM - Protocol Independent Multicast (IPv4)

PIM - Protocol Independent Multicast (IPv4)

PIM (Protocol Independent Multicast) is a family of multicast routing protocols that provide efficient distribution of multicast traffic across IP networks.

Overview

PIM is a multicast delivery protocol that is independent of the underlying unicast routing:

  • Runs on top of any unicast routing protocol (OSPF, BGP, IS-IS, static routes)
  • Supports complex topologies with many sources and receivers
  • Scales to thousands of multicast groups
  • Used in data center, enterprise, and service provider networks

Standards:

  • RFC 7761 - PIM-SM (Sparse Mode) - the primary mode
  • RFC 3973 - PIM-DM (Dense Mode) - deprecated
  • RFC 4607 - SSM (Source-Specific Multicast)
  • RFC 5059 - Bootstrap Router (BSR)
  • RFC 4601 - PIM-SM v2

VyOS supports:

  • PIM-SM (Sparse Mode) - with an explicit RP (Rendezvous Point)
  • PIM-SSM (Source-Specific Multicast) - with IGMPv3
  • Bootstrap Router (BSR) - dynamic distribution of RP information
  • SPT (Shortest Path Tree) switchover - path optimization
  • ECMP (Equal-Cost Multi-Path) - load balancing of multicast flows

Use cases:

  • IPTV services in provider networks
  • Video conferencing and corporate broadcasting
  • Financial data (market data feeds)
  • Data center multicast applications
  • Multicast VPN

PIM Operating Modes

PIM-SM (Sparse Mode)

PIM Sparse Mode is the mode for networks where multicast receivers are sparsely distributed.

How it works:

  1. RP (Rendezvous Point) - the central meeting point for sources and receivers
  2. Sources register with the RP (Register messages)
  3. Receivers send Joins toward the RP (through intermediate routers)
  4. The RP forwards traffic along the Shared Tree (the common tree rooted at the RP)
  5. Optional switchover to the SPT (Shortest Path Tree) - the direct path from the source

Terminology:

  • RP (Rendezvous Point) - the router that mediates between sources and receivers
  • Shared Tree (*,G) - the common tree from the RP to receivers
  • Source Tree (S,G) - the shortest path tree from the source to receivers
  • DR (Designated Router) - the elected router on a segment that performs PIM operations
  • BSR (Bootstrap Router) - the router that dynamically distributes RP information

Advantages:

  • Efficient for distributed receivers
  • Scales to large networks
  • Supports many sources
  • Optimization via SPT switchover

Disadvantages:

  • Requires RP configuration
  • More complex to configure than IGMP Proxy
  • Requires more resources

PIM-DM (Dense Mode)

PIM Dense Mode is the mode for networks where receivers are densely distributed.

How it works:

  • Flood-and-Prune: traffic is initially sent everywhere
  • Routers with no receivers send a Prune (refusal)
  • Periodic refresh (every 3 minutes)

Status: Deprecated, not recommended for use.

VyOS: Does not support PIM-DM.

PIM-SSM (Source-Specific Multicast)

PIM Source-Specific Multicast is a simplified version of PIM for known sources.

How it works:

  • Receivers subscribe to a specific source (S,G), not just a group (G)
  • Requires IGMPv3 on the client side
  • Does not require an RP (Rendezvous Point)
  • Always uses the SPT (Shortest Path Tree)
  • Uses the 232.0.0.0/8 range (reserved for SSM)

Advantages:

  • Simple configuration (no RP)
  • Optimal paths (always SPT)
  • High security (known sources)
  • Less control traffic

Use cases:

  • IPTV with known sources
  • Video conferencing
  • Financial data

IGMPv3 requirement:

  • Clients must support IGMPv3
  • They specify both the group and the source
  • Syntax: IGMP JOIN (S,G)

PIM Components

Rendezvous Point (RP)

RP is the central router where sources and receivers meet in PIM-SM.

RP functions:

  • Registering sources (receives Register messages)
  • Forwarding Join/Prune between sources and receivers
  • Building the Shared Tree (*,G)
  • Forwarding multicast traffic

RP configuration types:

  1. Static RP - manually configured on all routers
  2. BSR (Bootstrap Router) - dynamic distribution of RP information
  3. Auto-RP - a Cisco proprietary mechanism (not supported by VyOS)

RP placement:

  • Central location in the network
  • High availability and bandwidth
  • Stable connectivity to all routers
  • VRRP/HSRP recommended for redundancy

Designated Router (DR)

DR is the elected router on a multi-access segment (Ethernet) that performs PIM operations.

DR functions:

  • Sending Register messages from sources to the RP
  • Sending Join/Prune to the RP on behalf of receivers
  • Processing IGMP memberships
  • Preventing duplicate traffic

DR Election:

  • The router with the highest DR Priority is elected
  • On equal priority, the highest IP address wins
  • Hello messages (every 30 seconds by default)

Configuring DR Priority:

set protocols pim interface eth0 dr-priority 100

Values: 1-4294967294 (higher = higher priority), default 1.

Bootstrap Router (BSR)

BSR is the mechanism for dynamically distributing RP information within a PIM domain.

BSR functions:

  • Automatic distribution of RP-to-Group mappings
  • Election of the BSR router (bootstrap election)
  • Periodic Bootstrap messages
  • Eliminating the need for static RP configuration on all routers

BSR Election:

  • The router with the highest BSR Priority wins
  • On equal priority, the highest IP address wins
  • Bootstrap messages every 60 seconds

Candidate-RP:

  • Routers that are candidates for the RP role
  • Send Candidate-RP-Advertisement to the BSR
  • The BSR distributes the RP list

BSR advantages:

  • Automatic configuration
  • Dynamic RP failover
  • Scalability
  • Standardized (RFC 5059)

Basic PIM-SM Configuration

Simple PIM-SM with Static RP

Scenario: 3 routers, one RP, one source, receivers on different segments.

Topology:

[Source] --- eth1 --- [R1] --- eth0 --- [R2-RP] --- eth0 --- [R3] --- eth1 --- [Receivers]
  10.1.1.0/24                  10.0.1.0/30      10.0.2.0/30         192.168.1.0/24
  239.1.1.1

Router R1 (first hop from the source):

# Interface to the source
set interfaces ethernet eth1 address 10.1.1.1/24

# Interface to the RP
set interfaces ethernet eth0 address 10.0.1.1/30

# Unicast routing (OSPF or static routes)
set protocols ospf parameters router-id 10.255.0.1
set protocols ospf area 0 network 10.0.0.0/8

# PIM on interfaces
set protocols pim interface eth0
set protocols pim interface eth1

# Static RP for all groups
set protocols pim rp address 10.255.0.2

commit
save

Router R2 (RP):

# Interfaces
set interfaces ethernet eth0 address 10.0.1.2/30
set interfaces ethernet eth1 address 10.0.2.1/30
set interfaces loopback lo address 10.255.0.2/32

# OSPF
set protocols ospf parameters router-id 10.255.0.2
set protocols ospf area 0 network 10.0.0.0/8
set protocols ospf area 0 network 10.255.0.2/32

# PIM on all interfaces
set protocols pim interface eth0
set protocols pim interface eth1
set protocols pim interface lo

# This router is the RP
set protocols pim rp address 10.255.0.2

commit
save

Router R3 (last hop to receivers):

# Interfaces
set interfaces ethernet eth0 address 10.0.2.2/30
set interfaces ethernet eth1 address 192.168.1.1/24

# OSPF
set protocols ospf parameters router-id 10.255.0.3
set protocols ospf area 0 network 10.0.0.0/8
set protocols ospf area 0 network 192.168.1.0/24

# PIM
set protocols pim interface eth0
set protocols pim interface eth1

# IGMP on the interface toward receivers
set protocols pim interface eth1 igmp

# Static RP
set protocols pim rp address 10.255.0.2

commit
save

Verification:

# On all routers
show ip pim interface
show ip pim neighbor
show ip pim rp-info

# On R2 (RP)
show ip pim rp-info
show ip pim state

# On R3 (with receivers)
show igmp groups
show ip pim join

RP for Specific Groups

Assigning different RPs to different group ranges.

Router configuration:

# RP1 for groups 239.1.0.0/16
set protocols pim rp address 10.255.0.2 group 239.1.0.0/16

# RP2 for groups 239.2.0.0/16
set protocols pim rp address 10.255.0.3 group 239.2.0.0/16

# Default RP for everything else
set protocols pim rp address 10.255.0.4

commit
save

Use cases:

  • Distributing load across RPs
  • Geographic distribution
  • Different sources for different services

IGMP Integration

PIM requires IGMP on interfaces toward receivers to process IGMP Join/Leave.

IGMP configuration:

# Enable IGMP on the interface
set protocols pim interface eth1 igmp

# IGMP version (2 or 3)
set protocols pim interface eth1 igmp version 3

# IGMP Query Interval (seconds)
set protocols pim interface eth1 igmp query-interval 125

# IGMP Query Max Response Time (seconds)
set protocols pim interface eth1 igmp query-max-response-time 10

commit
save

IGMPv2 vs IGMPv3:

  • IGMPv2: (*,G) subscriptions - any source for the group
  • IGMPv3: (S,G) subscriptions - a specific source for the group (SSM)

PIM-SSM Configuration

Simple SSM Configuration

PIM-SSM is Source-Specific Multicast for known sources.

SSM range: 232.0.0.0/8 (IANA reserved)

Configuration on all routers:

# Interfaces
set protocols pim interface eth0
set protocols pim interface eth1

# SSM prefix list (not required if using the standard 232.0.0.0/8 range)
# But it can be specified explicitly for clarity
set protocols pim ssm prefix-list SSM-RANGE

# Prefix list for SSM
set policy prefix-list SSM-RANGE rule 10 action permit
set policy prefix-list SSM-RANGE rule 10 prefix 232.0.0.0/8

# IGMP v3 (mandatory for SSM)
set protocols pim interface eth1 igmp
set protocols pim interface eth1 igmp version 3

commit
save

SSM does not require an RP - direct paths from sources to receivers.

Verification:

show ip pim state
show ip pim upstream
show igmp groups

SSM with Custom Ranges

Extending SSM to other ranges.

Configuration:

# Define a prefix list for SSM
set policy prefix-list SSM-CUSTOM rule 10 action permit
set policy prefix-list SSM-CUSTOM rule 10 prefix 232.0.0.0/8
set policy prefix-list SSM-CUSTOM rule 20 action permit
set policy prefix-list SSM-CUSTOM rule 20 prefix 239.100.0.0/16

# Apply to PIM
set protocols pim ssm prefix-list SSM-CUSTOM

# IGMP v3
set protocols pim interface eth1 igmp version 3

commit
save

Use cases:

  • Using organization-local ranges for SSM
  • Migrating from ASM (Any-Source Multicast) to SSM

SPT (Shortest Path Tree) Switchover

SPT Switchover Concept

SPT Switchover is the switch from the Shared Tree (*,G via the RP) to the Source Tree (S,G directly from the source).

Process:

  1. The receiver initially gets traffic through the RP (Shared Tree)
  2. After the first packet from the source, the router learns the source IP
  3. The router evaluates the path cost
  4. If the direct path is better, an (S,G) entry is created
  5. A Join is sent directly toward the source
  6. A Prune is sent toward the RP for (*,G)
  7. Traffic follows the optimal path

Default: VyOS switches to the SPT immediately upon receiving the first packet.

Disabling SPT Switchover

Infinity-and-Beyond - prohibits switching to the SPT, always using the RP.

Configuration:

set protocols pim spt-switchover infinity-and-beyond

commit
save

Use cases:

  • Centralized traffic control through the RP
  • Simplified topology
  • Debugging and troubleshooting

Drawback:

  • Suboptimal paths (triangle routing)
  • Increased load on the RP
  • Increased latency

SPT Switchover with a Prefix List

Selective switchover to the SPT for specific groups.

Configuration:

# Create a prefix list for groups with SPT switchover
set policy prefix-list SPT-GROUPS rule 10 action permit
set policy prefix-list SPT-GROUPS rule 10 prefix 239.1.0.0/16

# Apply
set protocols pim spt-switchover prefix-list SPT-GROUPS

commit
save

Result:

  • Groups in 239.1.0.0/16 use the SPT
  • All other groups remain on the Shared Tree through the RP

ECMP (Equal-Cost Multi-Path)

ECMP for Multicast

ECMP balances multicast flows across multiple equal-cost paths.

Default: PIM uses a single path (lowest IP next-hop).

Enabling ECMP:

set protocols pim ecmp

commit
save

Effect:

  • Different (S,G) flows are distributed across different next-hops
  • Improved load balancing
  • More efficient use of bandwidth

ECMP Rebalance

ECMP Rebalance redistributes flows when an interface fails.

Configuration:

set protocols pim ecmp
set protocols pim ecmp rebalance

commit
save

Behavior:

  • When one next-hop fails, flows are redistributed across the remaining ones
  • Automatic balancing
  • Improved fault tolerance

Note: May cause brief packet duplication during redistribution.

PIM Interface Parameters

Hello Interval

Hello interval is the frequency of sending PIM Hello messages.

Configuration:

set protocols pim interface eth0 hello <seconds>

commit
save

Values: 1-180 seconds, default 30 seconds.

Example:

set protocols pim interface eth0 hello 10

commit
save

Use cases:

  • Decrease for faster neighbor detection (10-15 sec)
  • Increase to reduce control traffic (60-120 sec)

Hold Time: Automatically set to 3.5 * hello-interval.

DR Priority

DR Priority is the priority for Designated Router election.

Configuration:

set protocols pim interface eth0 dr-priority <priority>

commit
save

Values: 1-4294967294, default 1.

Example:

# The router with the high priority becomes the DR
set protocols pim interface eth0 dr-priority 100

commit
save

Use cases:

  • Controlling DR election on multi-access segments
  • Preferring more powerful routers
  • Load balancing between routers

Passive Interface

Passive interface - receive PIM messages but do not send them.

Configuration:

set protocols pim interface eth0 passive

commit
save

Use cases:

  • Interfaces toward sources (source-only)
  • Reducing control traffic
  • Security (not responding to external PIM requests)

Note: IGMP continues to work.

PIM Timing Parameters

Join-Prune Interval

Join-Prune Interval is the frequency of sending Join/Prune messages upstream.

Configuration:

set protocols pim join-prune-interval <seconds>

commit
save

Values: 60-600 seconds, default 60 seconds.

Example:

set protocols pim join-prune-interval 120

commit
save

Effect:

  • A lower value means faster reaction to changes but more traffic
  • A higher value means less control traffic but slower convergence

Keep-Alive Timer

Keep-Alive Timer is how long an (S,G) state is retained without traffic.

Configuration:

set protocols pim keep-alive-timer <seconds>

commit
save

Values: 31-60000 seconds, default 210 seconds.

Example:

set protocols pim keep-alive-timer 300

commit
save

Use cases:

  • Increase for infrequent multicast flows (periodic broadcasts)
  • Decrease to save memory (short-lived sessions)

Register Parameters

Register Suppress Time

Register Suppress Time is how long Register messages from the DR to the RP are suppressed.

Default: 60 seconds (hardcoded in FRR).

Description:

  • After receiving a Register-Stop from the RP, the DR suppresses Register messages
  • It periodically sends a Null-Register to check for interest
  • If the RP becomes interested again, it resumes Register

Configuration: Not available in the VyOS CLI (managed internally by FRR).

Register Accept List

Register Accept List filters which sources are allowed to register with the RP.

Use case: Security on the RP - allow only trusted sources.

Note: Not implemented in the current version of VyOS PIM (FRR).

Bootstrap Router (BSR) Configuration

BSR Candidate

Configuring a router as a BSR Candidate.

Configuration:

# Define the interface for the BSR address
set protocols pim interface lo

# Loopback address
set interfaces loopback lo address 10.255.0.1/32

# BSR Candidate
set protocols pim bsr candidate-bsr address 10.255.0.1
set protocols pim bsr candidate-bsr priority 100

commit
save

Parameters:

  • address: the IP address of this router used for BSR
  • priority: 0-255, higher = higher priority, default 0

BSR Election:

  • The router with the highest priority wins
  • On equal priority, the highest IP address wins

Candidate-RP

Configuring a router as a Candidate-RP (a candidate for the RP role).

Configuration:

# Candidate-RP for all groups
set protocols pim bsr candidate-rp address 10.255.0.1

# Candidate-RP for specific groups
set protocols pim bsr candidate-rp address 10.255.0.1 group 239.1.0.0/16
set protocols pim bsr candidate-rp address 10.255.0.1 priority 192

commit
save

Parameters:

  • address: the IP address of this router as the RP
  • group: group range (optional)
  • priority: 0-255, higher = higher priority, default 192

Process:

  1. The Candidate-RP sends a Candidate-RP-Advertisement to the BSR
  2. The BSR collects the list of all Candidate-RPs
  3. The BSR distributes the RP-Set via Bootstrap messages
  4. All PIM routers receive the RP mappings automatically

Complete BSR Configuration

Scenario: 2 routers - one BSR and RP, the second a backup.

Router 1 (Primary BSR and RP):

# Loopback
set interfaces loopback lo address 10.255.0.1/32

# OSPF for the loopback
set protocols ospf area 0 network 10.255.0.1/32

# PIM on interfaces
set protocols pim interface eth0
set protocols pim interface eth1
set protocols pim interface lo

# BSR Candidate with high priority
set protocols pim bsr candidate-bsr address 10.255.0.1
set protocols pim bsr candidate-bsr priority 200

# Candidate-RP with high priority
set protocols pim bsr candidate-rp address 10.255.0.1
set protocols pim bsr candidate-rp priority 200

commit
save

Router 2 (Backup BSR and RP):

# Loopback
set interfaces loopback lo address 10.255.0.2/32

# OSPF
set protocols ospf area 0 network 10.255.0.2/32

# PIM
set protocols pim interface eth0
set protocols pim interface eth1
set protocols pim interface lo

# BSR Candidate with low priority
set protocols pim bsr candidate-bsr address 10.255.0.2
set protocols pim bsr candidate-bsr priority 100

# Candidate-RP with low priority
set protocols pim bsr candidate-rp address 10.255.0.2
set protocols pim bsr candidate-rp priority 100

commit
save

On all other routers: Only PIM on the interfaces; no static RP configuration is needed.

Verification:

show ip pim bsr
show ip pim rp-info

Configuration Examples

Example 1: IPTV Provider (Yandex Cloud)

Scenario:

  • VyOS router in Yandex Cloud as PIM-SM for IPTV
  • RP on the central router
  • Source: IPTV server 10.100.0.50
  • Clients: in the 192.168.0.0/16 networks
  • Groups: 239.10.0.0/16

Topology:

[IPTV Server] --- eth1 --- [R1-DR] --- eth0 --- [R2-RP] --- eth0 --- [R3] --- eth1 --- [STB]
  10.100.0.50                        10.0.1.0/30      10.0.2.0/30       192.168.10.0/24
  239.10.1.1-255                                                        Set-Top Boxes

Router R1 (First-hop DR):

# Interfaces
set interfaces ethernet eth1 address 10.100.0.1/24
set interfaces ethernet eth1 description 'To IPTV Server'
set interfaces ethernet eth0 address 10.0.1.1/30
set interfaces ethernet eth0 description 'To RP'

# OSPF
set protocols ospf parameters router-id 10.255.0.1
set protocols ospf area 0 network 10.0.0.0/8
set protocols ospf area 0 network 10.100.0.0/24

# PIM on interfaces
set protocols pim interface eth0
set protocols pim interface eth0 dr-priority 100

set protocols pim interface eth1
set protocols pim interface eth1 dr-priority 200
set protocols pim interface eth1 hello 10

# Static RP
set protocols pim rp address 10.255.0.2 group 239.10.0.0/16

# Firewall for PIM
set firewall ipv4 input filter rule 100 action accept
set firewall ipv4 input filter rule 100 description 'Allow PIM'
set firewall ipv4 input filter rule 100 protocol pim

commit
save

Router R2 (RP):

# Interfaces
set interfaces ethernet eth0 address 10.0.1.2/30
set interfaces ethernet eth1 address 10.0.2.1/30
set interfaces loopback lo address 10.255.0.2/32
set interfaces loopback lo description 'RP Address'

# OSPF
set protocols ospf parameters router-id 10.255.0.2
set protocols ospf area 0 network 10.0.0.0/8
set protocols ospf area 0 network 10.255.0.2/32

# PIM on all interfaces
set protocols pim interface eth0
set protocols pim interface eth1
set protocols pim interface lo

# This router is the RP
set protocols pim rp address 10.255.0.2 group 239.10.0.0/16

# ECMP for balancing
set protocols pim ecmp
set protocols pim ecmp rebalance

# Firewall
set firewall ipv4 input filter rule 100 action accept
set firewall ipv4 input filter rule 100 protocol pim

commit
save

Router R3 (Last-hop to clients):

# Interfaces
set interfaces ethernet eth0 address 10.0.2.2/30
set interfaces ethernet eth1 address 192.168.10.1/24
set interfaces ethernet eth1 description 'To Set-Top Boxes'

# OSPF
set protocols ospf parameters router-id 10.255.0.3
set protocols ospf area 0 network 10.0.0.0/8
set protocols ospf area 0 network 192.168.10.0/24

# PIM
set protocols pim interface eth0
set protocols pim interface eth1

# IGMP on the interface toward clients
set protocols pim interface eth1 igmp
set protocols pim interface eth1 igmp version 2
set protocols pim interface eth1 igmp query-interval 125

# Static RP
set protocols pim rp address 10.255.0.2 group 239.10.0.0/16

# Firewall for IGMP and PIM
set firewall ipv4 input filter rule 100 action accept
set firewall ipv4 input filter rule 100 protocol igmp

set firewall ipv4 input filter rule 110 action accept
set firewall ipv4 input filter rule 110 protocol pim

# Allow multicast traffic
set firewall ipv4 input filter rule 120 action accept
set firewall ipv4 input filter rule 120 destination address 239.10.0.0/16
set firewall ipv4 input filter rule 120 description 'Allow IPTV multicast'

commit
save

Verification:

# On all routers
show ip pim interface
show ip pim neighbor
show ip pim rp-info

# On R1 (source)
show ip pim upstream

# On R2 (RP)
show ip pim state
show ip pim rp-info

# On R3 (receivers)
show igmp groups
show ip pim join
show ip pim state

Monitoring:

# Multicast traffic
tcpdump -i eth1 -n host 239.10.1.1

# PIM messages
tcpdump -i eth0 -n proto 103

# Statistics
show interfaces ethernet eth0
show interfaces ethernet eth1

Example 2: Video Streaming SSM (VK Cloud)

Scenario:

  • VK Cloud: PIM-SSM for corporate video broadcasting
  • Video servers: 10.50.0.0/24 (known sources)
  • SSM range: 232.1.0.0/16
  • Clients with IGMPv3 support
  • Distribution across offices

Topology:

[Video Server 1] --- eth1 --- [R1] --- eth0 ---|
  10.50.0.10                                   |
  232.1.1.1                                    |--- [R2-Core] --- eth1 --- [R3] --- eth2 --- [Office A]
                                               |                                    192.168.10.0/24
[Video Server 2] --- eth2 --- [R1] --- eth0 ---|
  10.50.0.20
  232.1.2.1

Router R1 (First-hop from the sources):

# Interfaces
set interfaces ethernet eth1 address 10.50.0.1/24
set interfaces ethernet eth1 description 'Video Servers'
set interfaces ethernet eth0 address 10.0.1.1/30
set interfaces ethernet eth0 description 'To Core'

# OSPF
set protocols ospf parameters router-id 10.255.0.1
set protocols ospf area 0 network 10.0.0.0/8
set protocols ospf area 0 network 10.50.0.0/24

# PIM
set protocols pim interface eth0
set protocols pim interface eth1
set protocols pim interface eth1 dr-priority 200

# SSM prefix list
set policy prefix-list SSM-VIDEO rule 10 action permit
set policy prefix-list SSM-VIDEO rule 10 prefix 232.1.0.0/16

set protocols pim ssm prefix-list SSM-VIDEO

# Firewall
set firewall ipv4 input filter rule 100 action accept
set firewall ipv4 input filter rule 100 protocol pim

commit
save

Router R2 (Core Router):

# Interfaces
set interfaces ethernet eth0 address 10.0.1.2/30
set interfaces ethernet eth1 address 10.0.2.1/30
set interfaces loopback lo address 10.255.0.2/32

# OSPF
set protocols ospf parameters router-id 10.255.0.2
set protocols ospf area 0 network 10.0.0.0/8
set protocols ospf area 0 network 10.255.0.2/32

# PIM on interfaces
set protocols pim interface eth0
set protocols pim interface eth1
set protocols pim interface lo

# SSM
set policy prefix-list SSM-VIDEO rule 10 action permit
set policy prefix-list SSM-VIDEO rule 10 prefix 232.1.0.0/16

set protocols pim ssm prefix-list SSM-VIDEO

# ECMP
set protocols pim ecmp
set protocols pim ecmp rebalance

# Firewall
set firewall ipv4 input filter rule 100 action accept
set firewall ipv4 input filter rule 100 protocol pim

commit
save

Router R3 (Last-hop to the office):

# Interfaces
set interfaces ethernet eth1 address 10.0.2.2/30
set interfaces ethernet eth2 address 192.168.10.1/24
set interfaces ethernet eth2 description 'Office A'

# OSPF
set protocols ospf parameters router-id 10.255.0.3
set protocols ospf area 0 network 10.0.0.0/8
set protocols ospf area 0 network 192.168.10.0/24

# PIM
set protocols pim interface eth1
set protocols pim interface eth2

# IGMP v3 (mandatory for SSM)
set protocols pim interface eth2 igmp
set protocols pim interface eth2 igmp version 3
set protocols pim interface eth2 igmp query-interval 125

# SSM
set policy prefix-list SSM-VIDEO rule 10 action permit
set policy prefix-list SSM-VIDEO rule 10 prefix 232.1.0.0/16

set protocols pim ssm prefix-list SSM-VIDEO

# Firewall
set firewall ipv4 input filter rule 100 action accept
set firewall ipv4 input filter rule 100 protocol igmp

set firewall ipv4 input filter rule 110 action accept
set firewall ipv4 input filter rule 110 protocol pim

set firewall ipv4 input filter rule 120 action accept
set firewall ipv4 input filter rule 120 destination address 232.1.0.0/16

commit
save

Client testing (Linux with IGMPv3):

# Subscribe to (S,G) with IGMPv3
# Source: 10.50.0.10, Group: 232.1.1.1
socat UDP4-RECV:5000,sourceport=5000,ip-add-source-membership=232.1.1.1:10.50.0.10:eth0 STDOUT

# Or with VLC
vlc udp://@232.1.1.1:5000

SSM verification:

# On all routers
show ip pim state
show ip pim upstream

# On R3
show igmp groups
show igmp sources

Example 3: PIM with BSR (Auto-configuration)

Scenario:

  • Automatic RP distribution via BSR
  • 2 Candidate-RPs (redundancy)
  • 1 Primary BSR, 1 Backup BSR
  • All routers receive RP mappings automatically

Router R1 (Primary BSR and Primary RP):

# Interfaces
set interfaces loopback lo address 10.255.0.1/32
set interfaces ethernet eth0 address 10.0.1.1/30
set interfaces ethernet eth1 address 10.0.2.1/30

# OSPF
set protocols ospf parameters router-id 10.255.0.1
set protocols ospf area 0 network 10.0.0.0/8
set protocols ospf area 0 network 10.255.0.1/32

# PIM
set protocols pim interface eth0
set protocols pim interface eth1
set protocols pim interface lo

# BSR Candidate - high priority
set protocols pim bsr candidate-bsr address 10.255.0.1
set protocols pim bsr candidate-bsr priority 200

# Candidate-RP - high priority
set protocols pim bsr candidate-rp address 10.255.0.1
set protocols pim bsr candidate-rp priority 200

commit
save

Router R2 (Backup BSR and Backup RP):

# Interfaces
set interfaces loopback lo address 10.255.0.2/32
set interfaces ethernet eth0 address 10.0.1.2/30
set interfaces ethernet eth1 address 10.0.3.1/30

# OSPF
set protocols ospf parameters router-id 10.255.0.2
set protocols ospf area 0 network 10.0.0.0/8
set protocols ospf area 0 network 10.255.0.2/32

# PIM
set protocols pim interface eth0
set protocols pim interface eth1
set protocols pim interface lo

# BSR Candidate - low priority
set protocols pim bsr candidate-bsr address 10.255.0.2
set protocols pim bsr candidate-bsr priority 100

# Candidate-RP - low priority
set protocols pim bsr candidate-rp address 10.255.0.2
set protocols pim bsr candidate-rp priority 100

commit
save

Routers R3, R4, R5 (Regular PIM routers):

# Only PIM on interfaces
set protocols pim interface eth0
set protocols pim interface eth1

# No static RP required!
# RP information is learned automatically from the BSR

commit
save

BSR verification:

# On all routers
show ip pim bsr

# The output will show:
# PIMv2 Bootstrap information
# BSR address: 10.255.0.1 (priority 200)
# Uptime: 00:15:23, BSR Candidate priority: 200
# RP Set:
#   Group 224.0.0.0/4
#     RP: 10.255.0.1 (priority 200, holdtime 150s)
#     RP: 10.255.0.2 (priority 100, holdtime 150s)

show ip pim rp-info

# Output:
# RP: 10.255.0.1 (primary, learned via BSR)
# Group: 224.0.0.0/4

Failover testing:

# Shut down R1 (Primary BSR/RP)
# R2 automatically becomes the BSR
# All routers switch to RP 10.255.0.2

Example 4: Multi-RP for Different Services

Scenario:

  • RP1 for IPTV (239.1.0.0/16)
  • RP2 for Video Conferencing (239.2.0.0/16)
  • RP3 for Financial Data (239.3.0.0/16)
  • Load balancing between RPs

RP1 Router:

set interfaces loopback lo address 10.255.0.1/32
set protocols ospf area 0 network 10.255.0.1/32

set protocols pim interface eth0
set protocols pim interface lo

# RP for IPTV
set protocols pim rp address 10.255.0.1 group 239.1.0.0/16

commit
save

RP2 Router:

set interfaces loopback lo address 10.255.0.2/32
set protocols ospf area 0 network 10.255.0.2/32

set protocols pim interface eth0
set protocols pim interface lo

# RP for Video Conf
set protocols pim rp address 10.255.0.2 group 239.2.0.0/16

commit
save

RP3 Router:

set interfaces loopback lo address 10.255.0.3/32
set protocols ospf area 0 network 10.255.0.3/32

set protocols pim interface eth0
set protocols pim interface lo

# RP for Financial Data
set protocols pim rp address 10.255.0.3 group 239.3.0.0/16

commit
save

All other routers:

set protocols pim interface eth0
set protocols pim interface eth1

# All three RPs
set protocols pim rp address 10.255.0.1 group 239.1.0.0/16
set protocols pim rp address 10.255.0.2 group 239.2.0.0/16
set protocols pim rp address 10.255.0.3 group 239.3.0.0/16

commit
save

Verification:

show ip pim rp-info

# Output:
# Group: 239.1.0.0/16
#   RP: 10.255.0.1 (static)
# Group: 239.2.0.0/16
#   RP: 10.255.0.2 (static)
# Group: 239.3.0.0/16
#   RP: 10.255.0.3 (static)

Operational Commands

Show Commands

PIM Interface:

show ip pim interface

Output:

Interface  State  Address      PIM Nbrs  PIM DR  FHR IfChannels
eth0       up     10.0.1.1     1         local   0   0
eth1       up     10.100.0.1   0         local   1   5
lo         up     10.255.0.1   0         local   0   0

PIM Interface details:

show ip pim interface eth0

Output:

Interface: eth0
  State: up
  Address: 10.0.1.1
  Designated Router: 10.0.1.1 (local)
  DR Priority: 1
  Hello Period: 30 sec
  Hello Timer: 00:00:18
  Neighbor Count: 1

PIM Neighbors:

show ip pim neighbor

Output:

Interface  Neighbor    Uptime    Timer     DR Pri  DR
eth0       10.0.1.2    01:23:45  00:01:25  1       10.0.1.2
eth1       10.0.2.1    00:45:12  00:01:30  100     10.0.2.1

PIM RP Information:

show ip pim rp-info

Output:

RP address       group/prefix-list   OIF         I am RP    Source   Group-Type
10.255.0.2       224.0.0.0/4         lo          yes        Static   ASM
10.255.0.1       239.1.0.0/16        eth0        no         Static   ASM
232.0.0.0/8      232.0.0.0/8         -           -          -        SSM

PIM State:

show ip pim state

Output:

Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G)
Active Sources:
Source          Group           Proto  Input      Output     TTL  Uptime
10.100.0.50     239.10.1.1      J      eth1       eth0       1    00:15:23

Active Groups:
Source          Group           Input      Output     Flags    Uptime
*               239.10.1.1      -          eth0       J        00:20:15
10.100.0.50     239.10.1.1      eth1       eth0       SJ       00:15:23

PIM Join:

show ip pim join

Output:

Interface  Address      Source         Group          State      Uptime    Expire
eth0       10.0.1.1     *              239.10.1.1     JOIN       00:20:15  00:00:42
eth0       10.0.1.1     10.100.0.50    239.10.1.1     JOIN       00:15:23  00:00:38

PIM Upstream:

show ip pim upstream

Output:

Iif             Source          Group           State       Uptime    JoinTimer RSTimer
eth1            10.100.0.50     239.10.1.1      Joined      00:15:23  00:00:38  00:02:45
-               *               239.10.1.1      NotJoined   00:20:15  --:--:--  --:--:--

PIM BSR:

show ip pim bsr

Output:

PIMv2 Bootstrap information
BSR address: 10.255.0.1 (priority 200)
Uptime: 01:45:23, BSR Candidate priority: 200
This system is the Bootstrap Router (BSR)

RP Set:
  Group: 224.0.0.0/4
    RP: 10.255.0.1 (priority 200, holdtime 150s, uptime 01:45:20)
    RP: 10.255.0.2 (priority 100, holdtime 150s, uptime 01:45:18)

IGMP Commands (in the context of PIM)

IGMP Groups:

show igmp groups

Output:

Interface        Address         Group           Mode    Timer    Srcs  V  Uptime
eth1             192.168.10.1    239.10.1.1      EXCL    00:04:15  1    3  00:20:15
eth1             192.168.10.1    239.10.1.2      INCL    00:04:20  0    2  00:15:30

IGMP Sources (for IGMPv3 SSM):

show igmp sources

Output:

Interface  Address      Group        Source        Timer    Fwd  Uptime
eth1       192.168.10.1 232.1.1.1    10.50.0.10    00:03:45 Y    00:10:23
eth1       192.168.10.1 232.1.2.1    10.50.0.20    00:03:50 Y    00:08:15

IGMP Interface:

show igmp interface

Output:

Interface  State  Address      V  Querier  Query Timer  Other Timer  Group Count
eth1       up     192.168.10.1 3  local    00:01:05     00:00:00     2
eth2       up     192.168.20.1 2  local    00:01:15     00:00:00     1

Statistics

PIM Statistics:

show ip pim statistics

Output:

Interface eth0:
  Hello messages:
    Received: 1523
    Sent: 1520
  Join/Prune messages:
    Received: 245
    Sent: 198
  Register messages:
    Received: 0
    Sent: 0
  Register-Stop messages:
    Received: 0
    Sent: 0

Multicast Routing Table:

show ip mroute

Output:

Source          Group           Proto  Input  Output       TTL  Uptime
*               239.10.1.1      PIM    -      eth0         1    00:20:15
10.100.0.50     239.10.1.1      PIM    eth1   eth0         1    00:15:23

Multicast Routing Table details:

show ip mroute 239.10.1.1

Output:

Group: 239.10.1.1
  Incoming interface: eth1
  Source: 10.100.0.50
  RPF neighbor: 10.100.0.50
  Outgoing interface list:
    eth0, Forward/Sparse, uptime 00:15:23, expires 00:02:37

Management Commands

Restart PIM:

restart pim

Clear PIM state (soft reset):

# There is no direct command, use restart
restart pim

Troubleshooting

PIM Neighbors Are Not Established

Problem: PIM neighbors do not appear in show ip pim neighbor.

Checks:

  1. PIM is enabled on the interfaces:

    show protocols pim
    show ip pim interface
  2. IP connectivity:

    ping <neighbor-ip>
  3. PIM Hello messages:

    tcpdump -i eth0 -n proto 103

    You should see periodic PIM Hellos (every 30 sec).

  4. The firewall is blocking PIM (protocol 103):

    set firewall ipv4 input filter rule 100 action accept
    set firewall ipv4 input filter rule 100 protocol pim
    commit
  5. MTU issues:

    show interfaces ethernet eth0

    Verify that the MTU is sufficient (1500+).

  6. Unicast routing works:

    show ip route <neighbor-ip>

    There must be a route to the neighbor.

Solution:

# Allow PIM in the firewall
set firewall ipv4 input filter rule 100 action accept
set firewall ipv4 input filter rule 100 protocol pim

# Restart PIM
restart pim

commit
save

RP Is Unreachable

Problem: show ip pim rp-info shows the RP, but there is no connectivity.

Checks:

  1. RP IP in the routing table:

    show ip route <rp-address>

    There must be a route to the RP.

  2. Ping the RP:

    ping <rp-address>
  3. PIM neighbors along the path to the RP:

    show ip pim neighbor
  4. RPF check:

    show ip rpf <rp-address>

    The output shows the RPF interface and RPF neighbor.

  5. The RP configuration is identical on all routers:

    show protocols pim rp

Solution:

# Make sure the RP IP is in OSPF/BGP
set protocols ospf area 0 network <rp-network>

# Verify the RP address is on the loopback
set interfaces loopback lo address <rp-address>/32

# Identical RP configuration on all routers
set protocols pim rp address <rp-address>

commit
save

Multicast Traffic Does Not Reach Receivers

Problem: IGMP subscriptions exist, but multicast traffic does not arrive.

Checks:

  1. IGMP groups are active:

    show igmp groups
  2. A PIM Join was sent upstream:

    show ip pim join
    show ip pim upstream

    You should see a JOIN for the group.

  3. PIM State for the group:

    show ip pim state

    You should see (*,G) and (S,G) entries.

  4. The source is registered with the RP:

    # On the RP
    show ip pim upstream

    You should see the source.

  5. Multicast routing table:

    show ip mroute <group>

    You should see Incoming and Outgoing interfaces.

  6. Traffic reaches the first-hop router:

    tcpdump -i eth1 -n host <multicast-group>
  7. The RPF check passes:

    show ip rpf <source-ip>

    The RPF interface must match the incoming interface for the source.

  8. The firewall allows multicast:

    show firewall

    Check the rules for destination 224.0.0.0/4.

Solution:

# Allow multicast in the firewall
set firewall ipv4 input filter rule 120 action accept
set firewall ipv4 input filter rule 120 destination address 224.0.0.0/4

set firewall ipv4 forward filter rule 120 action accept
set firewall ipv4 forward filter rule 120 destination address 224.0.0.0/4

# Verify IGMP
set protocols pim interface eth1 igmp
set protocols pim interface eth1 igmp version 2

# Restart
restart igmp
restart pim

commit
save

RPF Failure

Problem: The RPF (Reverse Path Forwarding) check fails and traffic is dropped.

RPF principle: A multicast packet must arrive on the interface that leads back to the source (according to the unicast routing table).

Diagnostics:

show ip rpf <source-ip>

Output:

Routing entry for 10.100.0.50
Known via "connected", distance 0, metric 0
  * directly connected, eth1

RPF interface: eth1
RPF address: 10.100.0.50

Checks:

  • The RPF interface must match the incoming interface of the multicast traffic
  • If it does not match, an RPF failure occurs and the packet is dropped

Solution:

  1. Fix unicast routing:

    # Make sure the route to the source is correct
    show ip route <source-ip>
  2. Use a static mroute (if the unicast and multicast topologies differ):

    # Not supported directly via the VyOS CLI
    # Use the FRR vtysh
    vtysh
    configure
    ip mroute <source-network> <rpf-interface>
    exit
    write
  3. ECMP: If there are multiple paths to the source:

    set protocols pim ecmp
    commit

SSM Does Not Work with IGMPv2

Problem: SSM groups (232.0.0.0/8) do not work with IGMPv2 clients.

Cause: SSM requires IGMPv3 for (S,G) subscriptions.

Solution:

  1. Upgrade clients to IGMPv3:

    # On a Linux client
    echo 3 > /proc/sys/net/ipv4/conf/eth0/force_igmp_version
  2. Configure IGMPv3 on VyOS:

    set protocols pim interface eth1 igmp version 3
    commit
  3. Verification:

    show igmp interface eth1

    It should show Version: 3.

  4. If the clients do not support IGMPv3, use ASM (Any-Source Multicast) instead of SSM.

SPT Switchover Does Not Occur

Problem: Traffic keeps flowing through the RP and does not switch to the SPT.

Checks:

  1. SPT switchover is not disabled:

    show protocols pim

    There should be no spt-switchover infinity-and-beyond.

  2. PIM State:

    show ip pim state

    You should see both (*,G) and (S,G) entries after the first packet is received.

  3. Unicast route to the source:

    show ip route <source-ip>
  4. Mroute table:

    show ip mroute <group>

    After the SPT switchover, the Incoming interface should change from the RP path to the source path.

Solution:

  1. Remove infinity-and-beyond (if set):

    delete protocols pim spt-switchover infinity-and-beyond
    commit
  2. Check the RPF to the source:

    show ip rpf <source-ip>
  3. Restart PIM:

    restart pim

BSR Is Not Elected

Problem: BSR election does not occur and there are no RP mappings.

Checks:

  1. Candidate-BSR is configured:

    show protocols pim bsr
  2. BSR status:

    show ip pim bsr

    It should show the BSR address and RP Set.

  3. PIM neighbors:

    show ip pim neighbor

    BSR messages are propagated through PIM.

  4. Bootstrap messages:

    tcpdump -i eth0 -n proto 103 and 'ip[20] == 4'

    Type 4 is a Bootstrap Message.

Solution:

# On the Primary BSR
set protocols pim bsr candidate-bsr address <loopback-ip>
set protocols pim bsr candidate-bsr priority 200

# On the Backup BSR
set protocols pim bsr candidate-bsr address <loopback-ip>
set protocols pim bsr candidate-bsr priority 100

# Candidate-RP
set protocols pim bsr candidate-rp address <loopback-ip>
set protocols pim bsr candidate-rp priority 200

# Restart
restart pim

commit
save

High CPU from PIM

Problem: High CPU load from the FRR pimd process.

Causes:

  • Too much (S,G) state
  • Frequent Join/Prune messages
  • Source instability (flapping)

Diagnostics:

# Number of mroute entries
show ip mroute | count

# PIM state
show ip pim state | count

# PIM statistics
show ip pim statistics

Solution:

  1. Increase the Join-Prune Interval:

    set protocols pim join-prune-interval 120
    commit
  2. Increase the Keep-Alive Timer:

    set protocols pim keep-alive-timer 300
    commit
  3. Use SSM instead of ASM (less state):

    set protocols pim ssm prefix-list SSM-RANGE
    commit
  4. Limit the number of groups via the firewall or an RP accept-list.

Monitoring and Logging

Continuous Monitoring

Monitoring PIM neighbors:

watch -n 5 'show ip pim neighbor'

Monitoring PIM state:

watch -n 10 'show ip pim state'

Monitoring IGMP groups:

watch -n 5 'show igmp groups'

Multicast traffic:

# PIM protocol
tcpdump -i eth0 -n -v proto 103

# A specific multicast group
tcpdump -i eth0 -n host 239.10.1.1

# All multicast
tcpdump -i eth0 -n 'dst net 224.0.0.0/4'

Logging

System logs:

show log tail 100 | match pim

Syslog for PIM:

set system syslog global facility protocols level info
commit

External syslog:

set system syslog host 192.168.1.100 facility protocols level info
set system syslog host 192.168.1.100 port 514
commit

FRR debug (caution, very verbose):

# Enter the FRR shell
vtysh

# Debug PIM
debug pim events
debug pim packets

# Debug IGMP
debug igmp events
debug igmp packets

# Disable debug
no debug pim events
no debug pim packets

exit

Logs to a file:

vtysh
configure
log file /var/log/frr/pim.log
log syslog informational
exit
write

SNMP Monitoring

SNMP for multicast statistics:

# Install SNMP
set service snmp community public authorization ro
set service snmp community public network 192.168.1.0/24

commit

SNMP OIDs for PIM:

  • .1.3.6.1.2.1.157 - PIM-MIB
  • .1.3.6.1.2.1.83 - IGMP-MIB
  • .1.3.6.1.2.1.15 - IPMROUTE-MIB

SNMP query:

snmpwalk -v2c -c public <vyos-ip> .1.3.6.1.2.1.157

Performance Metrics

Bandwidth monitoring:

# Install bmon
sudo apt install bmon

# Run
bmon -p eth0,eth1 -b

# Or iftop for multicast
sudo iftop -i eth0 -f 'dst net 224.0.0.0/4'

Multicast packet statistics:

# Incoming multicast packets
show interfaces ethernet eth0 | match multicast

# mroute statistics
show ip mroute count

Best Practices

RP Design

  1. RP placement:

    • Central location in the topology
    • Loopback address (stable)
    • High availability (use Anycast RP or BSR)
  2. Redundancy:

    • Multiple Candidate-RPs with BSR
    • Or Anycast RP (advanced)
    • VRRP on the RP interfaces
  3. Load Balancing:

    • Different RPs for different group ranges
    • Monitor the load on the RPs

PIM Configuration

  1. DR Priority:

    • Configure it explicitly on multi-access segments
    • Prefer more powerful routers
  2. Hello Interval:

    • The standard 30 seconds for stable networks
    • 10-15 seconds for fast convergence
    • No lower than 10 seconds (excessive traffic)
  3. SPT Switchover:

    • Leave the default (immediate) for optimal paths
    • Use infinity-and-beyond only for special cases
  4. SSM vs ASM:

    • Prefer SSM if the sources are known
    • SSM is simpler, more secure, and has less state
    • ASM for dynamic sources

Security

  1. Firewall for PIM:

    set firewall ipv4 input filter rule 100 action accept
    set firewall ipv4 input filter rule 100 protocol pim
    set firewall ipv4 input filter rule 100 source address 10.0.0.0/8
  2. Limiting multicast groups:

    set firewall ipv4 input filter rule 110 action accept
    set firewall ipv4 input filter rule 110 destination address 239.0.0.0/8
    
    set firewall ipv4 input filter rule 999 action drop
    set firewall ipv4 input filter rule 999 destination address 224.0.0.0/4
    set firewall ipv4 input filter rule 999 description 'Drop unknown multicast'
  3. Rate limiting:

    set firewall ipv4 input filter rule 100 limit rate 100/second
  4. IGMP control:

    # Limit the number of IGMP groups per interface
    # (not supported by the VyOS CLI, use FRR)

Performance

  1. ECMP:

    set protocols pim ecmp
    set protocols pim ecmp rebalance
  2. Timer optimization:

    # Increase to reduce CPU
    set protocols pim join-prune-interval 120
    set protocols pim keep-alive-timer 300
  3. Limit (S,G) state:

    • Use SSM where possible
    • Limit the number of sources

Scaling

  1. Number of groups:

    • PIM-SM scales to thousands of groups
    • Monitoring: show ip pim state | count
  2. Number of (S,G) entries:

    • Depends on the router’s memory
    • SSM reduces the amount of state
  3. Bandwidth:

    • Account for multicast traffic replication
    • Use QoS for prioritization

Integration with Other Protocols

PIM + OSPF

Scenario: PIM on top of OSPF for unicast routing.

# OSPF
set protocols ospf parameters router-id 10.255.0.1
set protocols ospf area 0 network 10.0.0.0/8

# PIM uses the OSPF routing table for RPF
set protocols pim interface eth0
set protocols pim rp address 10.255.0.2

commit

Important: The RP address must be in OSPF.

PIM + BGP

Scenario: Inter-AS multicast with BGP.

# BGP
set protocols bgp system-as 65001
set protocols bgp neighbor 203.0.113.1 remote-as 65000

# PIM
set protocols pim interface eth0
set protocols pim rp address 10.255.0.2

commit

MSDP (Multicast Source Discovery Protocol): Not supported by the current version of VyOS.

PIM + BFD

BFD (Bidirectional Forwarding Detection) - fast detection of a neighbor failure.

Configuration:

# BFD globally
set protocols bfd peer 10.0.1.2
set protocols bfd peer 10.0.1.2 interval transmit 300
set protocols bfd peer 10.0.1.2 interval receive 300
set protocols bfd peer 10.0.1.2 interval multiplier 3

# PIM will use BFD automatically if configured
set protocols pim interface eth0

commit

Advantages:

  • Sub-second detection of a PIM neighbor failure
  • Fast convergence

Note: VyOS PIM (FRR) supports BFD for PIM neighbors.

PIM + VPN (IPsec/WireGuard)

Multicast over a VPN tunnel.

Requirements:

  • A VTI interface (not policy-based VPN)
  • PIM on the VTI interface
  • Unicast routing over the VPN

Configuration:

# VTI interface
set interfaces vti vti0 address 172.16.0.1/30

# IPsec VPN
set vpn ipsec site-to-site peer 203.0.113.2 vti bind vti0

# PIM on the VTI
set protocols pim interface vti0
set protocols pim interface vti0 hello 10

# OSPF over the VPN
set protocols ospf area 0 network 172.16.0.0/30

# RP
set protocols pim rp address 10.255.0.2

commit

Comparison of Solutions

PIM-SM vs IGMP Proxy

CharacteristicPIM-SMIGMP Proxy
TopologyAnySimple (tree)
ScalabilityThousands of groupsHundreds of groups
RedundancyFullLimited
ComplexityHighLow
RPRequiredNot required
CPU/MemoryMediumLow
Use caseEnterprise/SPEdge/Home

PIM-SM vs PIM-SSM

CharacteristicPIM-SMPIM-SSM
RPRequiredNot required
SourcesAnyKnown
IGMP versionv2/v3v3 mandatory
State(*,G) + (S,G)(S,G) only
ComplexityHigherLower
SecurityMediumHigh
Use caseDynamic sourcesKnown sources

Static RP vs BSR

CharacteristicStatic RPBSR
ConfigurationManual on allAutomatic
FailoverManualAutomatic
ScalabilityLimitedHigh
ComplexityLowMedium
Use caseSmall networksLarge networks

References and Resources

RFC Documents

  • RFC 7761 - PIM-SM (Sparse Mode) - the primary standard
  • RFC 4601 - PIM-SM v2
  • RFC 3973 - PIM-DM (Dense Mode)
  • RFC 4607 - SSM (Source-Specific Multicast)
  • RFC 5059 - BSR (Bootstrap Router Mechanism)
  • RFC 5015 - Bidirectional PIM
  • RFC 3376 - IGMPv3 (for SSM)

VyOS Documentation

FRR Documentation

Useful Tools

  • pimd - PIM daemon (used by FRR)
  • smcroute - Static multicast routing
  • iperf - Multicast performance testing
  • VLC - Multicast streaming player
  • tcpdump - Packet capture
  • Wireshark - Protocol analyzer
  • Zabbix/Prometheus - Monitoring

Community

Next Steps

After configuring PIM, we recommend exploring:

  • IGMP Proxy - for simple topologies
  • MPLS - for MVPN (Multicast VPN)
  • QoS - for prioritizing multicast traffic
  • Firewall - for protecting multicast networks
  • OSPF - for unicast routing
  • BFD - for fast failover

Conclusion

PIM (Protocol Independent Multicast) is a powerful solution for multicast routing in complex topologies. PIM-SM with a Rendezvous Point provides efficient distribution of multicast traffic to distributed receivers, PIM-SSM simplifies configuration for known sources, and the Bootstrap Router automates RP management.

Key points:

  • PIM-SM for complex topologies with an RP
  • PIM-SSM for known sources (requires IGMPv3)
  • BSR for automatic RP distribution
  • SPT switchover for optimal paths
  • ECMP for balancing multicast flows
  • Integration with OSPF/BGP for unicast routing
  • Monitoring PIM neighbors, state, and RP

Choosing a solution:

  • IGMP Proxy - for simple topologies (home/small office)
  • PIM-SM - for enterprise and service provider networks
  • PIM-SSM - for IPTV and video streaming with known sources
Reviewed by OpenNix LLC · Last updated on