Subject: Re: ethernet channel bonding
To: Matt Bell <mtbell@micropede.com>
From: Andrew Gillham <gillham@vaultron.com>
List: tech-net
Date: 09/10/2001 22:21:54
On Mon, Sep 10, 2001 at 06:38:56AM -0400, Matt Bell wrote:
> 
> I'll try it out, can you give me the location where you uploaded the
> kernel/ifconfig...
> 
> -Matt

Ok, a test i386 GENERIC kernel and ifconfig can be found at:
	http://www.roadsign.com/netbsd/cec-test.tgz

I have only tested this with Intel cards (fxp) and I currently have
4 cards configured as a Cisco EtherChannel.  I have tested roundrobin
also.  Two links work fine as well.  The default mode is to use a
roundrobin strategy and two links.
My code is kind of crappy, so it doesn't automatically figure out how
many active links there are, and removing links doesn't work yet.

Basic use:
/etc/ifconfig.fxp0:
up

/etc/ifconfig.fxp1:
up

/etc/ifconfig.cec0:
create
chan fxp0
chan fxp1
inet 1.2.3.4 netmask 255.255.255.0


Currently the 'link0' flag turns on "Cisco Ether Channel" mode where the
last bits of the destination address are XOR'ed to figure out which channel
to use.  Without 'link0' the default is to use round-robin across the links.
The 'link1' flag switches from two links to four links, with the default being
two links.
I am still working on cleaning up the whole mess and adding some error
checking.

Anyway, it is usable right now, though I haven't been able to seriously stress
test it yet.  Note that trying to use 'ifconfig cec0 -chan fxp1' to remove a
channel / link will probably crash and burn, as will telling the driver to use
four links when you don't have four.  There is some basic logic that checks
if the link exists and if not uses link 0, but I haven't tested it well.

So, it works for me, and I'm cleaning up the code more before posting it as
well.

Let me know how it goes.

-Andrew