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. 233.89.188.1 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.
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 * 224.10.10.10 y eth0.100 pimreg(I ), eth0.100(IJ )
1 10.0.3.2 224.10.10.10 n eth0.300 pimreg( J ), eth0.100( * )
1 10.0.4.2 224.10.10.10 n eth0.400 pimreg( J ), eth0.100( * )
vyos@vyos:~$ sh ip multicast route
Source Group Proto Input Output TTL Uptime
* 224.10.10.10 IGMP eth0.100 pimreg 1 00:07:59
IGMP eth0.100 1 00:07:59
10.0.3.2 224.10.10.10 PIM eth0.300 pimreg 1 00:07:59
STAR eth0.100 1 00:07:59
10.0.4.2 224.10.10.10 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 10.0.0.1 224.10.10.10 EXCL 00:03:51 1 3 00:04:20
set interfaces ethernet eth0 vif 100 address '10.0.0.1/24'
set interfaces ethernet eth0 vif 300 address '10.0.3.1/24'
set interfaces ethernet eth0 vif 400 address '10.0.4.1/24'
set interfaces loopback lo address '10.255.255.1/32'
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 10.0.0.1 group '224.0.0.0/4'