<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div>On Feb 22, 2015, at 3:29 PM, Jason Keltz <<a href="mailto:jas@cse.yorku.ca">jas@cse.yorku.ca</a>> wrote:<br><br></div><blockquote type="cite"><div><span>I've setup bonding between two 1 Gb/s interfaces using ..</span><br><span></span><br><span>Bonding Mode: load balancing (xor)</span><br><span>Transmit Hash Policy: layer2+3 (2)</span><br><span></span><br><span>The link is up, and I can access it from various hosts.</span><br><span></span><br><span>I have a group of identical clients.  If I ping/ssh from each of those clients, then one of these things happens:</span><br><span>1) traffic goes over 1 interface of the bond</span><br><span>2) traffic goes over the other interface of the bond</span><br><span>3) traffic goes over BOTH interfaces .... (client -> server over one NIC, and server -> client over the other)</span><br><span></span><br><span>I can understand 1 & 2 - but why 3?</span><br><span></span><br><span>Finally, is there any way with balance-xor (and without special switch support) to ensure a load balance in such a way that if one interface is too busy, the other is used?</span><br><span>(Eg. clientA talks to the serverA over NIC1 of 2.  ClientA uses NIC1 to capacity.  ClientB also wants to talk to serverA, and because of MAC ADDR/IP is assigned to NIC1 of the bond -- but NIC1 is too busy - NIC2 isn't being used though...  Can ClientB be assigned NIC2 instead)</span><br><span></span><br><span>Jason.</span><br></div></blockquote><br><div>The NIC of the bond is chosen via a deterministic hashing algorithm allowing all packets of any given single flow(src ip/src port/src mac/dst ip/dst port/dst mac) are always sent through the exact same path through the network. This prevents out of order and many other unwanted things.</div><div><br></div><div>By changing the mac/ip of the destination one might be able to over-engineer the traffic flow.</div><div><br></div><div><a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Using_Channel_Bonding.html">https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Using_Channel_Bonding.html</a></div></body></html>