Linux Bonding Modes



  • Another one from January, 2008: Linux Bonding Modes

    When bonding Ethernet channels in Linux there are several modes that can be chosen that affect the way in which the bonding will occur. These modes are enumerated from zero to six. Let’s look briefly at each and see how they differ. Remember that when looking at these modes that bonding can include two or more Ethernet channels. It is not limited to just two.

    The mode is set view the modprobe command or, more commonly, is simply inserted into the /etc/modprobe.conf (or /etc/modules.conf) configuration file so that it is configured every time that the Linux Bonding Driver is initialized.

    Mode 0: Round Robin. Transmissions are load balanced by sending from available interfaces sequentially packet by packet. Transmissions only are load balanced. Provides load balancing and fault tolerance.

    Mode 1: Active-Backup. This is the simplest mode of operation for bonding. Only one Ethernet slave is active at any one time. When the active connection fails another slave is chosen to take over as the active slave and the MAC address is transferred to that connection. The switch will effectively view this the same as if the host was disconnected from one port and then connected to another port. This mode provides fault tolerance but does not provide any increase in performance.

    Mode 2: Balanced XOR. This is a simple form of load balancing using the XOR of the MAC addresses of the host and the destination. It works in general fairly well but always sends the packets through the same channel when sending to the same destination. This means that it is relatively effective when communicating with a large number of different remote hosts but loses effectiveness as the number decreases becoming worthless as the value becomes one. This mode provides fault tolerance and some load balancing.

    Mode 3: Broadcast. This mode simply uses all channels to mirror all transmissions. It does not provide any load balancing but is for fault tolerance only.

    Mode 4: IEEE 803.ad Dynamic Link Aggregation. This mode provides fault tolerance as well as load balancing. It is highly effective but requires configuration changes on the switch and the switch must support 802.3ad Link Aggregation.

    Mode 5: Adaptive Transmit Load Balancing. This mode provides fault tolerance and transmit (out going) load balancing. It provides no receiving load balancing. This mode does not require any configuration on the switch. Ethtool support is required in the network adapter (NIC) driver.

    Mode 6: Adaptive Load Balancing. Like mode five but provides fault tolerance and bidirectional load balancing. The transmit load balancing is identical but receipt load balancing is accomplished by ARP trickery.



  • @scottalanmiller As u provided the theory of modes.Can u please provide the real time example where these modes are necessary??



  • Anytime that you need more speed than a single NIC can provide or when you want to protect against link failure.



  • Found this post which neatly explains about linux bonding setup and the different modes - [moderated]



  • @redtigey said in Linux Bonding Modes:

    Found this post which neatly explains about linux bonding setup and the different modes - [moderated]

    Found? Promotional posts must be clear, and we ask that you be a participating member before linking to your own material.

    If you don't feel you are prepared to participate in the discussions, you could post the content of the post here instead - rather than just providing a link to your own site.



  • @scottalanmiller Sure. Thanks



  • @redtigey said in Linux Bonding Modes:

    @scottalanmiller Sure. Thanks

    No problem. Don't want to discourage participation. And once you are an active member, linking to your own stuff is fine (but say it is yours, of course.)

    Or better, post the content here AND link it.