OpenWrt Forum Archive

Topic: multicast receiver software running on openwrt router does not work

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have written a simple multicast receiver program, which is currently running in the openwrt router. But this software does not receive any data from the multicast group. I have a working multicast environment in the router (my wireless devices can send and receive data from the same multicast group), but if i try to listen to that group from the router using custom software, it is not working.

NOTE: The same software works fine, if i run in the linux desktop machine.

I did tcpdump on the multicast, 11.11.11.15 and 11.11.11.32 are two know multicast senders in the network.

root@OpenWrt:/# tcpdump -n multicast
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 65535 bytes
14:03:19.478476 IP 11.11.11.15.60472 > 239.0.0.38.12345: UDP, length 50
14:03:24.480007 IP 11.11.11.15.60472 > 239.0.0.38.12345: UDP, length 50
14:03:29.483429 IP 11.11.11.15.60472 > 239.0.0.38.12345: UDP, length 50
14:03:34.479858 IP 11.11.11.15.60472 > 239.0.0.38.12345: UDP, length 50
14:03:39.484171 IP 11.11.11.15.60472 > 239.0.0.38.12345: UDP, length 50
14:03:44.483130 IP 11.11.11.15.60472 > 239.0.0.38.12345: UDP, length 50
14:03:49.486375 IP 11.11.11.15.60472 > 239.0.0.38.12345: UDP, length 50
14:03:54.492302 IP 11.11.11.15.60472 > 239.0.0.38.12345: UDP, length 50
14:03:59.493509 IP 11.11.11.15.60472 > 239.0.0.38.12345: UDP, length 50
14:04:04.495279 IP 11.11.11.15.60472 > 239.0.0.38.12345: UDP, length 50
14:04:08.432849 IP 11.11.11.32.48484 > 239.0.0.38.12345: UDP, length 26
14:04:08.432962 IP 11.11.11.32.48484 > 239.0.0.38.12345: UDP, length 26
14:04:09.423884 IP 11.11.11.32.48484 > 239.0.0.38.12345: UDP, length 26
14:04:09.424013 IP 11.11.11.32.48484 > 239.0.0.38.12345: UDP, length 26

I recall your other thread on this same subject....first, turn off igmp snooping (consult the other thread). Then check your firewall rules. Just because tcpdump shows the traffic doesn't mean it isn't being blocked by your firewall rules. You can temporarily test by

iptables -I INPUT 1 -i br-lan -j ACCEPT
iptables -I FORWARD 1 -i br-lan -j ACCEPT

Hi dl12345, thanks for your reply.

I disabled igmp snooping by doing the below steps

1) network config
root@OpenWrt:/# cat /etc/config/network
config interface 'lan'
option igmp_snooping '0'

2) multicast snooping is disabled
root@OpenWrt:/# cat /sys/devices/virtual/net/br-lan/bridge/multicast_snooping
0

3) your iptables command
iptables -I INPUT 1 -i br-lan -j ACCEPT
iptables -I FORWARD 1 -i br-lan -j ACCEPT

But still i don't see multicast traffic from the wireless devices to the router.

4) I also tried stopping the firewall completely, but no use.
root@OpenWrt:/# /etc/init.d/firewall stop
Warning: Unable to locate ipset utility, disabling ipset support
Warning: Section @zone[1] (wan) cannot resolve device of network 'wan'
Warning: Section @zone[1] (wan) cannot resolve device of network 'wan6'
Warning: Section @zone[1] (wan) has no device, network, subnet or extra options
* Flushing IPv4 filter table
* Flushing IPv4 nat table
* Flushing IPv4 mangle table
* Flushing IPv4 raw table
* Flushing IPv6 filter table
* Flushing IPv6 mangle table
* Flushing IPv6 raw table
* Flushing conntrack table ...

I have now found the solution for this issue. I guess my router was not listening by default on this ip route. When i did ifconfig i saw this, so i got distracted thinking 'MULTICAST' below means router too listening to the multicast.

wlan0     Link encap:Ethernet  HWaddr 00:11:33:22:44:55
          inet addr:11.11.11.1  Bcast:11.11.11.255  Mask:255.255.255.0
          inet6 addr: fe80::211:33ff:fe22:4455/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1


route add -net 224.0.0.0 netmask 224.0.0.0 wlan0

The discussion might have continued from here.