Very interesting.
Looking under the hood, it's actually handled by the /etc/sysconfig/network-scripts/ifup-eth script, which writes the values to the pseudo-files under /sys/class/net/bondX/bonding/, so there you go, another way to change that dinamically without having to restart the interface. Would you be kind to see if you can change the primary "on-the-fly" using this method?
Thanks, Filipe
Yes, indeed. I have successfully changed both the primary interface and the miimon value **while the interface is up** by directly writing to the /sys/class/net/bondX/bonding/{Key} files. Changing the bonding mode is not allowed while the interface is up (probably a good thing).
This is a great improvement over previous incarnations of Red Hat bonding support. I have even successfully configured two bonds on the same machine using different bonding modes for each. VERY useful!
Sam
Art Age Software wrote:
Yes, indeed. I have successfully changed both the primary interface and the miimon value **while the interface is up** by directly writing to the /sys/class/net/bondX/bonding/{Key} files. Changing the bonding mode is not allowed while the interface is up (probably a good thing).
Out of curiosity only, why do you care which is the primary interface? I have been using bonding for several years now and it's never concerned me. I have a pair of switches(active-active) that the system(s) are plugged into, and it doesn't matter which link or which switch they use, they'll always have connectivity. The switches themselves have two pairs of active/passive uplinks to the "core" switches, as well. If one of those links were to fail the core switches fail over, providing maximum bandwidth and availability.
I can see the need for different bonding methods, though to-date for me at least I've only used active-passive in linux. I do use active-active (usually 4 links going to two different switches) in VMWare ESX.
nate