9

I'm configuring two ethernet interfaces into an aggregation group to double bandwidth, and I was wondering if bond mode=0 works for all switches? What about dumb switches that don't support LACP? Will this methodology double bandwidth for a single host ("session")?

ensnare
  • 2,132
  • 6
  • 23
  • 39

3 Answers3

11

The document on Linux bonding is worth the read, it goes into what sort of support you need from switches for various bonding methods. In this case:

The balance-rr, balance-xor and broadcast modes generally require that the switch have the appropriate ports grouped together. The nomenclature for such a group differs between switches, it may be called an "etherchannel" (as in the Cisco example, above), a "trunk group" or some other similar variation.

So you will need to group the ports on your switch (often just creating a LAG). Gets a bit more involved sometimes though if you want to plug the same bond into multiple switches.

If you don't want the switches involved you probably want balance-alb which includes both transmit and receive balancing:

The active-backup, balance-tlb and balance-alb modes do not require any specific configuration of the switch.

Kyle Brandt
  • 82,107
  • 71
  • 302
  • 444
  • 1
    this document is the better one: https://www.kernel.org/doc/Documentation/networking/bonding.txt – benba May 17 '18 at 18:53
4

From my experience, actually balance-rr and balance-xor works just fine without any further switch configuration on any other switches than Cisco (OTOH I always have bizarre problems with Cisco switches...).

balance-rr performance is OK with 2 ports, but sucks with more; CIFS doesn't play well with balance-rr, either. BUT balance-rr is the only mode were one single TCP connection can actually reach 2 Gb/s; in all other modes, one given connection will always go through one particular port, so you'll need as many connections as you have ports to saturate your network.

wazoox
  • 6,782
  • 4
  • 30
  • 62
  • 1
    Note that with balance-alb/tlb a TCP connection *is* distributed over multiple ports. – Roman Jul 18 '13 at 12:14
  • @Roman: not really, it depends on your network. Have a look on the documentation from kernel.org https://www.kernel.org/doc/Documentation/networking/bonding.txt – benba May 17 '18 at 18:51
  • With balance-rr and balance-xor, all slaves get the same MAC. If the switch ports aren't aggregated you're left with multiple connections that have the same MAC address. It might seem like it works just fine, but it doesn't. – Ryan Davies Dec 12 '19 at 03:51
0

I've just tested balance-rr with a cisco switch and servers running lxc containers on top of Ubuntu 18.10. This didn't work - for some reason the arp tables never get updated inside the containers. The problem disappears when switching to active-backup.

Terje
  • 1