Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2002 18:24:29 -0400 (EDT)
From:      Mark <maxiter@inetu.net>
To:        freebsd-hackers@freebsd.org
Subject:   bridge(4)
Message-ID:  <Pine.BSF.4.10.10208271814530.28248-100000@norad.inetu.net>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10208271814530.28248-100000>