How to increase bandwidth of bonding interface in mode 6?

5,299

I think you're expecting something out of bonding that a lot of people expect: at least doubled performance. This expectation isn't the case in a lot of scenarios, since bonding typically doesn't balance traffic at the link layer (but rather the network and / or session layer).

Bonding mode 6 acts on the network layer, and operates by manipulating ARP into creating connections with multiple clients that are bound to multiple different hardware interfaces on the bonded interfaces. This will increase capacity for traffic, but it won't increase the speed of any single connection.

If you want to measure the practical bandwidth of a bonded link, you need to use multiple simultaneous clients.

Share:
5,299

Related videos on Youtube

Raunak
Author by

Raunak

Updated on September 18, 2022

Comments

  • Raunak
    Raunak almost 2 years

    I am new to Linux Bonding Driver. I have configured a bond in mode 6 which combines 2 ethernet interfaces. Their individual bandwidth is 937Mbps and 700 Mbps. But when both the interfaces are up, the bandwidth of the bonding interfacs is always that of the higher one (which is 937Mbps) here.I am using iperf to measure the bandwidth. I want a bandwidth which almost equals to the combined bandwidth of the 2 interfaces when both of them are active.

    • Mikhail Khirgiy
      Mikhail Khirgiy almost 7 years
      What switch do you use?
    • Raunak
      Raunak almost 7 years
      I dont think mode 6 requires any switch
    • Spooler
      Spooler almost 7 years
      You're correct, it doesn't have any special switch requirements. This is all done on the host side.
    • Mikhail Khirgiy
      Mikhail Khirgiy almost 7 years
      Only bond interface in mode 0 (roudrobin) can increase individual network connection bandwidth. But switch must allow static link aggregation (Cisco etherchannel).
  • Raunak
    Raunak almost 7 years
    I have the bonded interface in the client. How do i measure the capcacity of the bonded link in such a case? im using iperf to ping another pc in the same LAN.
  • Raunak
    Raunak almost 7 years
    I just used ethtool bond0 command. speed - 2000 Mbps. Speed of slaves interfaces both 1000Mbps. I dont know why iperf is showing <1000Mbps bandwidth
  • Raunak
    Raunak almost 7 years
    is there any other way to measure correct bandwidth?
  • Spooler
    Spooler almost 7 years
    You can use iperf to measure it, but you'll need to use multiple connections from either a machine with the same amount of bonded links or multiple machines. The reason ethtool reports your bond as 2Gib/s is because that's your "effective bandwidth". You'll never reach more than a gigabit with a single connection, because we're just balancing multiple connections with a bond, rather than striping traffic across multiple interfaces.
  • Raunak
    Raunak almost 7 years
    Thanks a lot for explaining it to me. Any other tool is there? for multiple streams instead of multiple machines?
  • Spooler
    Spooler almost 7 years
    Well, you can always run two instances or more of iperf. However, if you're doing this from one machine to one machine, they both need to be utilizing some kind of bond to make that worthwhile. It's not as if a single 1Gib/s link on one machine can generate enough traffic to adequately test a bonded link on a second machine. And since mode 6 bonding works on the network layer, you would need two MAC addresses on either single machine in order to get it to balance.