I have one RHEL 6 server with two NIC ports (each Port is connected to different switch). I need to create bonded interface from those two physical ports.

Which bonding mode should I use? I don't want to use mode 1, active /backup won't help me with performance.

Please be informed that two switches are totally separated switches. (no stacking, no cascading).

Thanks in advance.


Well your valid options are:

balance-rr or 0 — Sets a round-robin policy for fault tolerance and load balancing. Transmissions are received and sent out sequentially on each bonded slave interface beginning with the first one available.

active-backup or 1 — Sets an active-backup policy for fault tolerance. Transmissions are received and sent out via the first available bonded slave interface. Another bonded slave interface is only used if the active bonded slave interface fails.

balance-xor or 2 — Sets an XOR (exclusive-or) policy for fault tolerance and load balancing. Using this method, the interface matches up the incoming request's MAC address with the MAC address for one of the slave NICs. Once this link is established, transmissions are sent out sequentially beginning with the first available interface.

broadcast or 3 — Sets a broadcast policy for fault tolerance. All transmissions are sent on all slave interfaces.

802.3ad or 4 — Sets an IEEE 802.3ad dynamic link aggregation policy. Creates aggregation groups that share the same speed and duplex settings. Transmits and receives on all slaves in the active aggregator. Requires a switch that is 802.3ad compliant.

balance-tlb or 5 — Sets a Transmit Load Balancing (TLB) policy for fault tolerance and load balancing. The outgoing traffic is distributed according to the current load on each slave interface. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed slave.

balance-alb or 6 — Sets an Active Load Balancing (ALB) policy for fault tolerance and load balancing. Includes transmit and receive load balancing for IPV4 traffic. Receive load balancing is achieved through ARP negotiation.

You've already eliminated active-backup since it doesn't give you the performance gains you're after.

broadcast won't give you performance gains, and 802.3ad is out since you can't do that with disparate switches.

So that leaves you with balance-rr, balance-xor, balance-tlb or balance-alb. Without knowing your workload, you'll be best off to test each method to see which gives you the best performance for your workload.

Don't forget you can tweak xmit_hash_policy as well which may improve your performance in balance-xor mode.

| improve this answer | |
  • Hi Fukawi2, Thanks for your reply. I have tried balance tlb/alb and balance xor. With balance tlb and balance alb,I can ping to IP address of bond for 10 sec when server is booting up. And I can't ping to bond IP anymore until I restart the network service. When I change mode to 2 balance xor, it is okay and working fine. However some people said I need to configure switches to use balance xor. Is that true? – TRA Jul 12 '13 at 1:08
  • 1
    No matter what option you choose, you will never be able to increase the throughput to a single host, even with balance-rr. You will always be sending to a single MAC address, which will always end up at a single port. – longneck Jul 12 '13 at 1:14
  • Not quite; with xmit_hash_policy=1 and balance-xor you can spread different CONNECTIONS to the same host over multiple slaves. – fukawi2 Jul 12 '13 at 5:36
  • Actually you can do Mode 4 to two switches, you'll just have two link bundles which fail over when a switch goes down. – suprjami Jul 12 '13 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.