We have a set of ~40 embedded devices, each one equipped with a wifi module. All the devices are connected to the same wireless network. All the devices send packets to the same "master" computer. Each device sends at 10KB/s, 50 pps. Data is sent using UDP, mainly because our application can tolerate out-of-order or missed packets.

In our current configuration each device sends to a different multicast address, and the computer joins as many multicast groups as the number of devices. The same multicast address is not shared by multiple devices. Now the problem is that linux has a limit of 20 multicast groups that can be joined by the system, so we can't scale such a configuration to 40 devices.

Therefore I have two questions:

  1. Is there any drawback in increasing the number of multicast groups that can be joined on Linux from 20 to, say, 100?
  2. Is there any advantage in using a different multicast address for each device? Could I send data from all the devices to the same multicast address?
  • 2
    Multicast over wireless is generally a bad idea, unless you are using a high-end access point. All packets have to be broadcast at the lowest rate.
    – Ron Trunk
    Mar 1, 2016 at 17:03
  • Could you kindly explain a bit further your statement, or point me to a resource that I can read? Does what you say apply also if the devices do not join the multicast group (but just send to it)?
    – Fabio
    Mar 2, 2016 at 8:22
  • This may help: wi-fiplanet.com/tutorials/article.php/3433451/…
    – Ron Trunk
    Mar 2, 2016 at 16:16

2 Answers 2


Is there any advantage in using a different multicast address for each device?

No, unless your application needs distinct destination multicast addresses.

Could I send data from all the devices to the same multicast address?

Yes, of course, unless some behavior in your application opposes it.


Yes, you can increase the max number of multicast memberships.

Check out:


By default it is set to 20, but you can change the value to 40 (or more).

Proper way to do this would be via sysctl setting.

For the second part, if all the devices were in the same multicast group, all the devices would recieve all the other packets from all the other devices (as in broadcast), which can cause more power usage and/or processing power usage on embedded devices.

  • 2
    Multicast senders aren't necessarily multicast receivers. One can send to a multicast group without listening on ("joining") that group.
    – Ricky
    Mar 1, 2016 at 19:38
  • @mulaz I'm aware of the fact that you can change that value, but I'm wondering what are the consequences
    – Fabio
    Mar 2, 2016 at 8:24
  • 1
    As @RickyBeam said, if you just send a packet, you can do it without joining a group (if you do not need to recieve data from that multicast group). Increasing the number of max memberships allows you to just more groups, which means, if you join more busy groups, you get more traffic. I dont think there is any other serious* overhead in increasing this number, except of potentially more ingress data from more multicast groups. (* there are a bit more IGMP messages, due to being joined to more groups)
    – mulaz
    Mar 2, 2016 at 9:54
  • damn typo, s/to just more groups/to join more groups/
    – mulaz
    Mar 3, 2016 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.