NIC Active/Passive bonding with priority

15,266

The bonding mode for the is active-backup mode and to specify a preferred interface you use the primary keyword specifying the preferred interface:

BONDING_OPTS="mode=1 miimon=100 primary=eth0"

So in this example you want it to always be eth0 if it is available.

primary
A string (eth0, eth2, etc) specifying which slave is the primary device. The specified device will always be the active slave while it is available. Only when the primary is off-line will alternate devices be used. This is useful when one slave is preferred over another, e.g., when one slave has higher throughput than another. The primary option is only valid for active-backup mode.

The documentation for Linux bonding is actually quite thorough. I highly recommend reading at least the more relevant parts.

Share:
15,266

Related videos on Youtube

user2836202
Author by

user2836202

Updated on September 17, 2022

Comments

  • user2836202
    user2836202 almost 2 years

    I will configure a bond of three NIC's. I want to define which one will be first used and which NIC will be used as the second and third NIC when failover is done. Is this possible?

    Thanks

  • Kyle Brandt
    Kyle Brandt almost 14 years
    Oh I missed the 3 NIC requirement. I am not aware of a way to specify more than one preferred nic. This makes me curious as to why the 3 are being use and why the 3 way priority matters....
  • user2836202
    user2836202 almost 14 years
    Two are in a 1 Gb switch, one in a 100 Mb switch which only should be used when the 1 Gb switch (or the two interfaces in the 1 Gb switch) fails.
  • user2836202
    user2836202 almost 14 years
    Option "secondary=eth1" does not work (unknown parameter). I also could not find any other doc. Someone tried this? In ESXi, I can define the order of failover for more than two interfaces. Can I do this in Red Hat also? Thanks.