IGMP Membership under Linux (igmp_max_memberships)

I'm experiencing issues related to OSPF (which relies on Multicast) not allowing us to work with enough adjacencies and was told to look at: /proc/sys/net/ipv4/igmp_max_memberships

Now, while it's easy to just increase this number to infinity, is there a way to know how many IGMP memberships are currently held by the OS so I can ensure this is indeed the problem and what number should be used?


Solution 1:

Yes, there is a way:

# cat /proc/net/igmp

It should print out all the IGMP groups currently in use by the machine:

# cat /proc/net/igmp
Idx Device    : Count Querier   Group    Users Timer    Reporter
1   lo        :     0      V3
                4B4B00E0     2 0:00000000       0
                010000E0     1 0:00000000       0
3   eth0      :     4      V3
                4B4B00E0     2 0:00000000       0
                010000E0     1 0:00000000       0
9   tap2      :     4      V3
                4B4B00E0     2 0:00000000       0
                010000E0     1 0:00000000       0
10  tap1      :     4      V3
                4B4B00E0     2 0:00000000       0
                010000E0     1 0:00000000       0
11  tap0      :     5      V3
                4B4B00E0     2 0:00000000       0
                080808E4     2 0:00000000       0
                010000E0     1 0:00000000       0

Solution 2:

netstat -g

or for numeric only output: netstat -ng