0

I have three machines running Manjaro, two work just fine, but the third (a Raspberry Pi) seems to not pass multicast packets to the registering application.

This is similar to this question.

On the problem machine, I ran:

socat UDP4-RECVFROM:6666,ip-add-membership=224.1.0.1:192.168.1.71,fork EXEC:hostname

On a working machine, I ran:

socat STDIO UDP4-DATAGRAM:224.1.0.1:6666,range=192.168.1.1/24

I then typed some junk and sent it. Sure enough, the problem machine didn't respond.

On the problem machine (the receiver), I ran tcpdump:

nate@flere-imsaho:~$ sudo tcpdump -i eth0 host 224.1.0.1
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes

13:48:20.632215 IP hassipura-plyn-frie.fios-router.home.56318 > 224.1.0.1.6666: UDP, length 5

Whereas on a working machine (the sender):

nate@hassipura-plyn-frie:~$ sudo tcpdump -i wlan0 host 224.1.0.1
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), snapshot length 262144 bytes

13:48:20.627910 IP hassipura-plyn-frie.56318 > 224.1.0.1.6666: UDP, length 5

Both see the packet sent at the same time, but there is no response. When I receive from my other working machine the sender shows the receiver's response.

When on the problem machine I run:

strace socat UDP4-RECVFROM:6666,ip-add-membership=224.1.0.1:192.168.1.71,fork EXEC:hostname

I see that it hangs on a call to pselect that never returns when the packet is received.

This seems like some sort of kernel issue, perhaps a driver bug, but it's not clear to me how to move forward diagnosing it.

Nate
  • 319
  • 2
  • 3
  • 8
  • You tag it as routing. Multicast is not crossing router boundaries per definition. It ism meant to be limited to an ethernet domain (which can span multiple switches). Otherwise every multicast packet would be out on the internet. – TomTom Jul 30 '22 at 16:31
  • You should not be using a multicast group in the [RESERVED (224.1.0.0-224.1.255.255 (224.1/16))](https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml#multicast-addresses-4) range. Typically, you will use something in the [239.0.0.0-239.255.255.255 Organization-Local Scope](https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml#multicast-addresses-12). Using multicast groups assigned to another application or that are reserved may cause you future problems. – Ron Maupin Jul 30 '22 at 16:33

2 Answers2

0

Check with ip all if the MULTICAST flag of the interface is set; if not, set it:

ip link set eth0 multicast on

However, my tests succeeded even without this flag.

Or your WiFi router needs to be configured for multicast.

0

This turned out to be a misconfigured firewall. While this doesn't work for my random port and address, I was originally doing this for mdns, which I enabled like this:

firewall-cmd --zone public --add-service mdns --permanent
sudo systemctl restart firewalld
Nate
  • 319
  • 2
  • 3
  • 8