Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As the title says, is there a way to increase the limit of 20 multicast groups that you can join on a given socket? Is there some system setting that I am missing or is there some hard limit which cannot be exceeded?

share|improve this question
up vote 2 down vote accepted

Well, incase someone is searching for this, the following parameter exists:


Currently my install says 20, in the sources, I also see:

bits/in.h:#define IP_MAX_MEMBERSHIPS              20

I think bumping up the system parameter may be enough, else will have to patch the header as well!

EDIT: looks like bumping up the system parameter does the trick.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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