Anyone have a simple example of PIM/IGMP within a single router for multiple interfaces or VLANs?

I want to accomplish something that I thought would be rather simple, but is turning out to not so much be…

I want to configure multicast forwarding (even better if I can limit it to certain multicast addresses and ports [“groups”], and to certain multicast senders) between multiple VLANs on a single router. The “simple” example for PIM/IGMP in the documentation involves three routers, which is much more complicated than my setup.

I have only one router, and on it I have multiple VLANs on a single interface. Specifically, when a certain host on “vif 300” and a certain host on “vif 400” publish to their respective multicast groups (e.g. port 10001 in one case), I want those multicast packets to get forwarded to “vif 100.” Additionally, when any host on “vif 100” publishes to these multicast groups, I want those multicast packets to get forwarded to “vif 300” or “vif 400,” respectively. I’m having a hard time translating the documented example for my use case.

Does anyone have a simple working example involving VLANs (I suppose even just individual interfaces would essentially be equivalent) without involving multiple routers?

@beamerblvd I think the part the VyOS documentation leaves out is that PIM/IGMP (Multicast) also involves your network switch. You can use a single router and configure it as the PIM RP, but you will also need to enable IGMP Snooping and MLD/MVR Snooping on the network switch. In 1.3 the configuration options are fairly basic, it’s just about what interfaces will participate in IGMP and PIM. I think everything else happens on the switch.

The documentation example, I think, was to express that if multiple routers are involved, then the configuration needs to be similar.

1 Like

I labbed this up pretty quick. I have a VyOS router connected to a strictly layer 2 Cisco switch with three hosts connected. One is acting as the source on VLAN 100 and you can see the source being selected by the * and that eth0.300/eth0.400 are joining the multicast group.

vyos@vyos:~$ sh ip pim state
Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
Active Source           Group            RPT  IIF               OIL
1      *           y    eth0.100          pimreg(I    ), eth0.100(IJ   )
1     n    eth0.300          pimreg( J   ), eth0.100(   * )
1     n    eth0.400          pimreg( J   ), eth0.100(   * )
vyos@vyos:~$ sh ip multicast route
Source          Group           Proto  Input            Output           TTL  Uptime
*         IGMP   eth0.100         pimreg           1    00:07:59
                                IGMP                    eth0.100         1    00:07:59    PIM    eth0.300         pimreg           1    00:07:59
                                STAR                    eth0.100         1    00:07:59    PIM    eth0.400         pimreg           1    00:00:12
                                STAR                    eth0.100         1    00:00:12
vyos@vyos:~$ sh ip igmp groups
Interface        Address         Group           Mode Timer    Srcs V Uptime
eth0.100    EXCL 00:03:51    1 3 00:04:20
set interfaces ethernet eth0 vif 100 address ''
set interfaces ethernet eth0 vif 300 address ''
set interfaces ethernet eth0 vif 400 address ''
set interfaces loopback lo address ''
set protocols igmp interface eth0.100
set protocols igmp interface eth0.300
set protocols igmp interface eth0.400
set protocols pim interface eth0.100
set protocols pim interface eth0.300
set protocols pim interface eth0.400
set protocols pim rp address group ''


conf t

interface GigabitEthernet1/0/1
 switchport mode trunk

interface GigabitEthernet1/0/2
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast

interface GigabitEthernet1/0/3
 switchport access vlan 300
 switchport mode access
 spanning-tree portfast

interface GigabitEthernet1/0/4
 switchport access vlan 400
 switchport mode access
 spanning-tree portfast

Hopefully this helps you some!