[clue] [tech] ethernet bonding versus bridging?

Quentin Hartman qhartman at gmail.com
Mon Mar 25 14:46:34 MDT 2013


(Note that this is just my understanding, which may be imperfect)

At a high level, brctl does essentially what you described, makes the
various interfaces involved act like a switch, or a "bridge" (hence the
name). You get redundancy because the kernel transparently forwards all
packets received on any interface to all interfaces, but no real increase
in b/w because at an IP level, your computer still only exists in one
place. It's theoretically possible to configure things so that you do get
some extra b/w if you are talking to multiple devices on your local network
at the same time with this method, but it's not an inherent attribute.

Bonding (or link aggregation) is typically done with ifenslave, and also
gets you simple and easy failover. However, it can also get you significant
bandwidth improvements, but only if you are connecting to a switch that
support 802.3ad .

In practice, if all you are after if redundancy then I don't think there is
a big difference between the two, but I would say that ifenslave (bonding)
would be the "right" solution, it also seems much more flexible. If you
need your computer to imitate a switch, then you want to use brctl
(bridging)

More info:

http://en.wikipedia.org/wiki/Link_aggregation#Linux_bonding_driver
http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding




On Mon, Mar 25, 2013 at 2:15 PM, Jim Ockers <ockers at ockers.net> wrote:

> Hi CLUEbies,
>
> Maybe I am the only person with this question but I was wondering if
> someone could help me understand the pros and cons of ethernet bonding
> versus bridging.  I even googled it but didn't really find a good
> explanation of why I should use bridging instead of bonding or vice
> versa.
> http://kaivanov.blogspot.com/2010/09/network-card-bonding-on-centos.html
>
> I've always just used bridging (brctl add br br0 ; brctrl addif br0 eth0
> ; ...) to, um, "bond" multiple ethernet interfaces together into one
> apparent ethernet interface.  Bridging seems automatic and wizzy and
> seems to just work, it's like having an ethernet switch in the box with
> multiple uplinks to the next switch.  Automatic fault tolerance, and
> without doing any serious performance testing I thought you would get
> more bandwidth/throughput (in both directions) by creating a bridge and
> putting the physical NICs in the bridge.
>
> Is this not the case?  I see that bonding has a bunch of different modes
> you can set based on what you want it to do, and one of the modes is
> transmit load balancing.  I also see that you can do traffic shaping/QoS
> with tc and various qdiscs and I guess I've never needed or tried to set
> that on a bridge interface.
>
> Anyway if someone out there knows all about both of these concepts
> {bridge|bond} and cares to illuminate me and this list a bit about
> what's better about each and why to use one or the other, I would
> appreciate it.
>
> Thanks in advance,
> Jim
>
> --
> Jim Ockers, P.E., P.Eng. (ockers at ockers.net)
> Contact info: http://www.ockers.net/
>
> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20130325/3bf77ade/attachment.html 


More information about the clue mailing list