All of lore.kernel.org
 help / color / mirror / Atom feed
* bridging + load balancing bonding
@ 2009-10-22 12:23 Jasper Spaans
  2009-10-22 15:41 ` Eric Dumazet
  0 siblings, 1 reply; 19+ messages in thread
From: Jasper Spaans @ 2009-10-22 12:23 UTC (permalink / raw)
  To: netdev

Hi,

We're using the following setup for bonding and bridging, to be able to put
large amounts of data through multiple IDS analyzers:

                             +---[br0]----+     +--- eth1 ---(IDS machine 1)
(Span port from switch) -- eth0          bond0--+
                                                +--- eth2 ---(IDS machine 2)

eth0 receives network traffic, which should be passed to machines which are
connected to eth1 and eth2. These machines run an IDS package, and there are
two of those for performance reasons.

bond0 is configured to load balance the packets using "balance-xor", in this
case combined with xmit_hash_policy layer2.

However, we're seeing problems: packets from one flow do not end up at the
same IDS machine.  This is because this selection is not based on the source
_and_ destination mac addresses of the original packet, but on the mac
address of the bonding device and the destination mac address of the
package.

This is also clear in the code:
For example, in bond_main.c, in bond_xmit_hash_policy_l2:
	return (data->h_dest[5] ^ bond_dev->dev_addr[5]) % count;

Changing this to
	return (data->h_dest[5] ^ data->h_source[5]) % count;
fixes our problems, but is this harmful for packets originating locally (or
being routed?)

If not, can this be applied? Or does anyone have other ideas?

Thanks,
Jasper Spaans
-- 
Fox-IT Experts in IT Security!
T: +31 (0) 15 284 79 99
KvK Haaglanden 27301624

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-10-24 14:02 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-22 12:23 bridging + load balancing bonding Jasper Spaans
2009-10-22 15:41 ` Eric Dumazet
2009-10-22 17:36   ` Jay Vosburgh
2009-10-22 17:53     ` Eric Dumazet
2009-10-23 11:45     ` Jasper Spaans
2009-10-23 11:58       ` [PATCH] Modify bonding hash transmit policies to use the packet's source MAC address Jasper Spaans
2009-10-23 12:37         ` Eric Dumazet
2009-10-23 14:08           ` Jasper Spaans
2009-10-23 16:02             ` Eric Dumazet
2009-10-23 16:23             ` Jay Vosburgh
2009-10-24 14:02               ` David Miller
2009-10-23 14:09           ` [PATCH] Remove bond_dev from xmit_hash_policy call Jasper Spaans
2009-10-23 16:05             ` Eric Dumazet
2009-10-23 16:24             ` Jay Vosburgh
2009-10-24 14:00               ` David Miller
2009-10-23  8:38   ` bridging + load balancing bonding Jasper Spaans
2009-10-23  8:55     ` Eric Dumazet
2009-10-23  9:51       ` Jasper Spaans
2009-10-23  9:54         ` Eric Dumazet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.