[Server-devel] Notes on replacing bridging with bonding

Jerry Vonau jvonau at shaw.ca
Mon Sep 8 17:19:39 EDT 2008


Jerry Vonau wrote:
> Jerry Vonau wrote:
>> Jerry Vonau wrote:
>>> Martin Langhoff wrote:
>>>> On Mon, Sep 8, 2008 at 7:43 PM, Alexander Dupuy <alex.dupuy at mac.com> wrote:
>>>>> I have placed TYPE=Bonding in the ifcfg-bond0 config files, but this is not
>>>>> needed for Fedora 7 or later (it doesn't hurt to have it, though)
>>>> well, I grepped network-functions and ifup-eth and none of the TYPE
>>>> checks are for bonding anything. The check is done against the output
>>>> of modprobe. So if it's going to be ignored, I'll save the
>>>> corresponding bytes (and potential confusion later).
>>>>
>>> ifup does a check for type=Bridge
>>>
>> Bonding can be handled via VLAN=yes and PHYDEV=msh0 in the ifcfg files 
>> for the bond device, ifup uses those values to setup the bonding in a 
>> hotplug environment. The slave (msh0) should have SLAVE=yes MASTER=bond0 
>> in its file. Hotplug works also, bond0 doesn't need to have its slave 
>> present to become active, plug the slave in, becomes active and bonding 
>> does the right thing. Bye, bye dummy interface.
>>
In order to have the hotplug work and enable the bond device without an 
AA/nic present, the device name must be bondX, that is what ifup keys in 
on, ifup uses VLAN=yes as the trigger to exit if the device is not present.

#  OLPC School server
#  This is an active antenna wireless mesh interface,
#  infrastructure mode side
#  (this device also appears as msh0)
DEVICE=wlan0
TYPE=Wireless
MODE=ad-hoc
CHANNEL=1
ESSID=school-mesh-0
ONBOOT=yes
#ALIAS=usb8xxx
BOOTPROTO=none
IPV6INIT=no
HOTPLUG=yes
NM_CONTROLLED=no
SLAVE=yes
MASTER=msh0


#  Marvell mesh network module, mesh side
#  (this device also appears as ethN+2)
DEVICE=msh0
TYPE=Ethernet
ONBOOT=no
NM_CONTROLLED=no
HOTPLUG=yes
SLAVE=yes
MASTER=bond0

#  OLPC School server
#  This is a bridge serving a single mesh interface, msh0
#  (which may come and go as it is an external USB device).
DEVICE=bond0
#TYPE=Bonding
IPV6INIT=no
ONBOOT=yes
BOOTPROTO=none
IPADDR=172.18.10.1
NETMASK=255.255.254.0
NETWORK=172.18.10.0
BROADCAST=172.18.11.255
NM_CONTROLLED=no
ALIAS=bonding
PHYSDEV=msh0
VLAN=yes
BONDING_OPTS=mode=mode=active-backup miimon=100

repeat for bond[12]
The /sbin/ifup-local can go away, the chain loading is in the config 
files now.

make bond3 for the eth1, the aliases work.

ifup parses the files in alpha order, bondXs comes up first, then eth0.

>>>>>> # cat /etc/modprobe.d/xs-bonding
>>>>>> alias bond0 bonding
>>>>>>
>>>>> A modprobe.d/ directory - that's a nice trick!  I wasn't aware of this, so
>>>>> just added some lines to the /etc/modprobe.conf file:
>>>> that's what the most modern doco could find suggested. And the
>>>> ifup-eth src is clearly looking at the output of modprobe, so there's
>>>> something to it...
>>>>
>>> well, udev loads the modules on boot, for configured devices. "network" 
>>> checks to see if the required module for the nic is loaded, if missing 
>>> loads it.
>>>
>> Think we can just dump a file in /etc/modprobe.d/ with the bonding 
>> options needed. I've been using bonding mode=active-backup miimon=100" 
>> to test with, any idea what we may be using here?
>>
> 
> Better yet just add BONDING_OPTS= it the ifcfg file.
> 

I covered my but with both modprobe and in the ifcfg files

alias bond0 bonding
alias bond1 bonding
alias bond2 bonding
alias bond3 bonding
options bond0 mode=mode=active-backup miimon=100
options bond1 mode=mode=active-backup miimon=100
options bond2 mode=mode=active-backup miimon=100
options bond3 mode=mode=active-backup miimon=100

Think it all works, got to have by buddy with a laptop drop by.

Jerry



More information about the Server-devel mailing list