From owner-freebsd-stable@FreeBSD.ORG Thu Apr 13 13:02:34 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F53C16A400 for ; Thu, 13 Apr 2006 13:02:34 +0000 (UTC) (envelope-from Stephen.Clark@seclark.us) Received: from smtpout04-04.prod.mesa1.secureserver.net (smtpout04-04.prod.mesa1.secureserver.net [64.202.165.199]) by mx1.FreeBSD.org (Postfix) with SMTP id B10B443D45 for ; Thu, 13 Apr 2006 13:02:33 +0000 (GMT) (envelope-from Stephen.Clark@seclark.us) Received: (qmail 30279 invoked from network); 13 Apr 2006 13:02:33 -0000 Received: from unknown (24.144.77.138) by smtpout04-04.prod.mesa1.secureserver.net (64.202.165.199) with ESMTP; 13 Apr 2006 13:02:32 -0000 Message-ID: <443E4BE8.5080806@seclark.us> Date: Thu, 13 Apr 2006 09:02:32 -0400 From: Stephen Clark User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.16-22smp i686; en-US; m18) Gecko/20010110 Netscape6/6.5 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce M Simpson References: <443DB8A5.1020006@seclark.us> <20060413063214.GA94628@spc.org> In-Reply-To: <20060413063214.GA94628@spc.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: IP_MAX_MEMBERSHIPS X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Stephen.Clark@seclark.us List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2006 13:02:34 -0000 Bruce M Simpson wrote: >On Wed, Apr 12, 2006 at 10:34:13PM -0400, Stephen Clark wrote: > > >>Can anyone tell me why the maximum number of members in a multicast >>group is set at >>20? >>Are there issues with increasing this number? >> >> > >Why would one wish to join more than 20 groups on a single socket? > >I realize making such a statement leaves me wide open to the charge of >640KB being enough for anyone, but... > >This limit in no way affects multicast routing, btw. Based on my reading >of the code... > >This is a per-socket limit. The structures to support per-socket multicast >group membership are simple linked lists or statically allocated arrays. >The reason for this is so as not to break the ABI for struct ip_moptions >which has been present since 4.4BSD. > >Changing this structure to not use the static allocation would probably >break your kernel for modules compiled without such a change. Also there >are IGMP timers involved. > >The other poster who replied is probably talking about a per-interface-card >limit to do with the multicast hash filter on most Ethernet cards - this >is a hard limit, and the driver/hardware has to either support multicast >promiscuous mode (IFF_ALLMULTI) or be able to support full promiscuous mode >(which may not work correctly with IP forwarding in my experience). > >Patches to refactor kernel multicast system gladly accepted! > >Regards, >BMS > >P.S. Someone was meant to be porting IGMPv3/SSM but there were licensing >issues with Apple. > > > Well I was trying to set up an ospf system with more than 20 neighbors and could only get 20 neighors to show up in quagga, so I posed the question to the quagga mailing list and got the following responses: 1) Hi Steve, I think you might be hitting the IGMP limit. The 244.0.0.5/6 multicast address is joined using IGMP and there is a kernel variable that needs to get bumped up higher to peer with more than 20 neighbors. I'm fuzzy on this 'cuz I haven't seen anyone post this particular problem in a while. cat /proc/sys/net/ipv4/igmp_max_memberships 20 Bump it up to whatever number is higher than your max. neighbor count. -Kris Kris Olander kriso@packetdesign.com 2) Hmm... ok on a 4.8 Freebsd system I see the following in the kernel build area: /usr/src/sys# grep -i membership */* | grep -i max netinet/icmp6.h:#define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */ netinet/in.h:#define IP_MAX_MEMBERSHIPS 20 /* per socket */ netinet/ip_output.c: if (i == IP_MAX_MEMBERSHIPS) { netinet/ip_var.h: struct in_multi *imo_membership [IP_MAX_MEMBERSHIPS]; I wonder if IP_MAX_MEMBERSHIP is the right parameter that needs bumping up. I suppose you could give it a try and see if changing this value (and then building a new kernel) increases the IGMP membership too. I don't see why it would cause any harm. Anyone with more FreeBSD kernel experience want to chime in? -KO (Kris Olander) When I bumped the limit and recompiled my kernel I saw all my neighbors listed when I queried ospfd. So my assumption was that this limit was affecting how many neighbors I could have. Steve -- "They that give up essential liberty to obtain temporary safety, deserve neither liberty nor safety." (Ben Franklin) "The course of history shows that as a government grows, liberty decreases." (Thomas Jefferson)