How bridge works on top of bond interface?
Solution 1
Bonding happens at a lower level than bridging. So, to get them to work together, you would take physical interfaces and bond them together, then take the bonded (virtual interface) and bridge that together with other interfaces. The other way around (bonding on top of bridging) doesn't make any sense.
For completeness:
Bonding lets you aggregate multiple physical ethernet cables together into a single virtual ethernet cable. The protocol takes care of issues like load balancing and packet ordering across multiple links. Bonding must be configured on both ends of the cable (i.e. on the switches at both ends, on the hosts at both ends, or on the switch as one end and the host at the other end).
Bridging is connection multiple complete layer 2 broadcast domains together, and it the same thing that ethernet switches do across all of their ports.
Solution 2
There are some Linux bonding modes that may not work properly when added to a bridge, namely mode 6 adaptive load balancing because it is based on sending different ARP replies to different remote endpoints. I don't think the bonding driver would modify ARP replies for VMs on the other side of a bridge. If you want to use something like ALB I believe you need to create a bridge per port then a virtio interface in the VM to each bridge and bond the virtio inside the VM. The best documentation I found on bridging a bond is unfortunately not for Linux but for OVS and for windows.
References:
- https://www.kernel.org/doc/Documentation/networking/bonding.txt
- http://docs.openvswitch.org/en/latest/topics/bonding/
- https://docs.microsoft.com/en-us/windows-server/networking/technologies/nic-teaming/nic-teaming
Related videos on Youtube
user2720323
Updated on September 18, 2022Comments
-
user2720323 almost 2 years
I am always confused in understanding network bonding and network bridging.
Bridging is different and Bonding is different , I want to know how they work together.
Thanks in advance.
-
user2720323 over 8 yearsThanks for the answer. In my Linux machine I could see ipaddress for both bond interface and bridge interface. How they will work in this case ?
-
Celada over 8 yearsNot enough information to answer that. If the bond interface is a member of the bridge, then it has no business having an IP address on it: interfaces that are members of the bridge are sort of subsumed by the bridge and are no longer layer 3 interfaces in their own right. Check with
brctl show
which interfaces are members of the bridge. -
Rajnish Kumar Soni over 6 yearsFinally a good and understandable answer after many search.