tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How usable is agr(4)?



On Tue, Jun 09, 2009 at 11:57:36AM -0400, Thor Lancelot Simon wrote:
> On Tue, Jun 09, 2009 at 03:16:38PM +0200, Manuel Bouyer wrote:
> > On Tue, Jun 09, 2009 at 01:43:00PM +0200, Hauke Fath wrote:
> > > All,
> > >
> > > while upgrading a busy nfs fileserver, I have changed it to aggregate  
> > > two wm(4) GBit interfaces with agr(4); on the other end is a HP procurve 
> > > 2848 switch.
> > 
> > The balance is done based on a hash of the source and destination
> > MAC addresses. So if your traffic is going though a router, you won't have
> > load-balancing. If the clients are local (and there's enough of them)
> > I would expect it to work.
> 
> MAC *and* IP addresses.

Indeed, I checked the code.
But I'm not sure if a switch will hash on the IP address itself, so for
the client->server path it may end up using always the same link.

> But the IP address portion of the hash is weird
> and I am not sure it works well in the general case.

I think for inet6 autoconfigured hosts (or local-link addresses) it's going
to always return either odd or even numbers, if the source and destinations
are both on the local network (because we do, in fact, hash the ethernet
addresses twice, and the non-ethernet part is constant for all hosts on the
local network).

In the case we're discussing, all but the last byte of the dst IP address
is constant. As there's 2 interfaces the link is choosen by the least
significant bit of the IP address. If the client's IP addresses are all-odd or
all-even there's no balancing. If they are mixed there should be some
balancing.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index