Bug #431
closedMulticast optimization doesn't work with bridges
0%
Description
First, Thanks for your support and thanks in advance.
There is a mention that a routable multicast address(239.1.2.3)is supported by multicast optimization with bridges,
if it is 5.14 kernel or newer and batman-adv 2021.2 or newer.(https://www.open-mesh.org/projects/batman-adv/wiki/Multicast-optimizations-tech)
However, I can see the log message that
"[ 87.971093] batman_adv: bat0: No IGMP Querier present - multicast optimizations disabled
[ 87.971108] batman_adv: bat0: No MLD Querier present - multicast optimizations disabled"
And I tested as below and it looks like multicast optimization does not work with bridges.
Can I know multicast optimization can be supported with bridges if we meet any kind of condition if there are?
Test environment
1. Raspberry pi4 with bookworm.
2. Linux kernel : 6.12.20
3. batman-adv : 2024.02
Test Process
1. Connect 3 raspberry pi with batman mesh. 2 of them are bridged to connect other computers to the mesh network.
2. One computer send multicast message(239.1.2.3) and other 2 devices listen to the multicast.
3. Set multicast_fanout to 1 in order to make multicast forwarding instead of unicast.
4. Observe wi-fi interface to check the type of multicast transmission(whether it is broadcast/uni-cast/multicast)
Expected:
1. Multicast type because it uses routable multicast.
Actual result
If it is under fanout number, there is unicast.
If it is more than fanout number, there is broadcast.
Thanks.
Updated by Linus Lüssing 10 days ago
Hi Juha, thanks for the detailed report!
multicast_fanout is only to determine whether to use a batman-adv broadcast vs. one or more batman-adv unicast packets, as can be seen in the diagram here: https://www.open-mesh.org/projects/batman-adv/wiki/Multicast-optimizations#Overview
"No IGMP Querier present - multicast optimizations disabled"
It seems you don't have an IGMP querier on your link. For IPv4 multicast IGMP reports are needed to be able to learn about IPv4 multicast listeners on your link: https://en.wikipedia.org/wiki/Internet_Group_Management_Protocol. If there is no IGMP querier then there are(/is) no (reliable amount of) IGMP reports.
The easiest thing you can do is something like: "ip link set dev br0 type bridge mcast_querier 1". Or "echo 1 > /sys/class/net/br0/bridge/multicast_querier". (Or if you were running some layer 3 multicast router then these implementations typically come with an IGMP/MLD querier, too.) Then you should see something like: "batman_adv: bat0: IGMP Querier appeared" in dmesg. And the flags in "batctl mcast_flags" should change accordingly. You can find out more about their meaning in the batctl README here: https://git.open-mesh.org/batctl.git/blob/refs/heads/main:/README.rst (or typically also in /usr/share/doc/batctl/README.rst.gz).
Let me know if this helps.