From owner-freebsd-hackers Tue Aug 27 15:42:48 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DB5B37B400 for ; Tue, 27 Aug 2002 15:42:44 -0700 (PDT) Received: from norad.inetu.net (norad.inetu.net [209.235.223.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 634BE43E4A for ; Tue, 27 Aug 2002 15:42:43 -0700 (PDT) (envelope-from maxiter@inetu.net) Received: from localhost (maxiter@localhost) by norad.inetu.net (8.9.3/8.9.3) with ESMTP id SAA28971 for ; Tue, 27 Aug 2002 18:42:42 -0400 (EDT) Date: Tue, 27 Aug 2002 18:42:42 -0400 (EDT) From: Mark To: freebsd-hackers@freebsd.org Subject: Re: bridge(4) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG To follow-up to my own message, in case this was of interest to anybody.... I have tried this approach with a link generating less traffic, and I'm successfully duplicating traffic from 1 interface to 4 others. I still welcome any input to the original problem, especially if there is an alternate way to accomplish what I'd like. Thx. --------------------------------------------------- Mark Rekai - INetU, Inc.(tm) - http://www.INetU.net Electronic commerce - Web development - Web hosting Mark@INetU.net - Phone: (610) 266-7441 On Tue, 27 Aug 2002, Mark wrote: > > Greets. I'm using bridge(4) for some slightly unintended purposes, and > need some insight or alternative suggestions. > > I have a FreeBSD 4.6.2 box with six NICs. :) I want to use bridge to > mirror traffic from xl1 to xl2 and xl3 (and possibly others). > > I don't have a hub. :( > > Of course, I'm not using bridge in the traditional sense. The xl1 > interface is connected to the SPAN port of a switch. Since the switch > only gives me 1 span port, I have to replicate it somehow. This is where > I use bridge(4). > > Knowing that FreeBSD's kernel bridge is not normally going to work the way > I want it (it tries to be smart), I changed the bridge_in() function in > /usr/src/sys/net/bridge.c to return BDG_BCAST for just about everything. > > This *almost* works. It gets *ALL* traffic mirrored out to xl2. The xl3 > get's *SOME* of the traffic, apparently in a random (about 10% of > traffic). Dunno why. > > This trickery get's me to about 40% cpu (I'm forwarding 15,000+ pps). > Don't know if this would have anything to do with it. > > Anybody know why I might be seeing such behavior... or if I can get the > kernel to allocate more CPU to doing such things... (it's 60% idle). > > Thanks. > > --------------------------------------------------- > Mark Rekai - INetU, Inc.(tm) - http://www.INetU.net > Electronic commerce - Web development - Web hosting > Mark@INetU.net - Phone: (610) 266-7441 > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message