I am an old-time debian user/sysadmin, but have never really attempted
to go deeper than that. I am currently massively deploying debian in the
company (a small telco/VoIP company in France) I now work for, and I am
facing issues with bonding and VLANs configuration.
In order to simplify my systems configuration and be able to use FAI
more easily, I've developed some ifup/ifdown hooks in /etc/network/*.d,
to add bonding and automatic VLAN creation on top of it.
I've also assembled a quick and dirty .deb with checkconfig in order to
I was wondering if my work would raise interest of debian
developers/debian users. In the later case, I am willing to properly
package it (I started reading maint-guide and policy, etc.) and maintain it.
However, I am seeking advice on how to do it / which list to post on /
which people to contact in order not to mess up with somebody's else's
work (i.e. vlan package also contain ifupdown hooks, however not
directly supporting bondX.Y notation in interfaces).
Please find below the short README I wrote (no manpage yet ... will make
one if this is of interest).
What do you think ?
This is version 0.1 of the package, as of 10/17/2005.
For information or bug reports, please contact Jerome Martin at
This package contains hooks for ifupdown in order to add bonding and
VLAN for bonding syntax to /etc/network/interfaces. It also enables the
administrator to fully control bonding options from inside the interface
definition, while providing reasonable defaults where possible. VLANs
over a bondN interface can be
defined by creating interfaces named bondN.V, just like ethN devices.
Moreover, reasonable defaults are used for bonding module parameters,
and you can create as many bonding interfaces as you wish, either with
an attached IP address or in an unamed fashion (in order to use VLANs on
top of it).
Quick notes :
- No proper documentation exist yet, just this README and examples below.
- You do not need to define aliases and option lines for bondN modules
ifupdown-bonding hooks will take care of loading/unloading one
instance of the bonding
module per interface you create, either with default values (see
below) or specified values.
As of today, you can use all documented options from kernel 2.6.8
- In fact you SHOULD NOT / MUST NOT use any alias/options parameters for
the bonding modules,
as this is not tested, and defining thos in your interfaces file is
much more practical.
- VLANs definitions are handled exactly the same as with the vlan
package hooks. See below.
- You should not assign an IP address to bond interfaces on top of which
you want to create
VLAN interfaces. This is a limitation of the VLAN kernel support. In
order to define an
interface without an assigned IP address, use the "manual" inet type
(as opposed to static
or dhcp). See below for an example.
- If you want to override default values passed to the bonding modules
without specifying those
values in all your interface definitions, use the /etc/network/options
- As you will notice. ifup and ifdown are relatively verbose, so
debugging should be easy.
- After you load a bondN bonding interface with ifup, you should have a
bondN module listed when
issuing the lsmod command. Also, you can check bonding parameters and
interface states by
looking at the files in /proc/net/bonding/bond*
Example device sections in /etc/network/interfaces :
# load bonding 0 interface at startup
# use "manual" in order not to attach an IP address to the interface
# this is usefull because as we later add VLAN on top of this interface
# we don't want to use it directly
iface bond0 inet manual
# this is an option that will be passed to the bonding module
# you can use any option from the following list :
# mode miimon downdelay updelay use_carrier primary arp_interval
arp_ip_target lacp_rate max_bonds
# if no mode option is used, default is 1 (active-backup)
# if neither miimon or arp_interval is specified, miimon=500
will be used
# updelay and downdelay both default to 1000 (one second)
# use_carrier is set to 0 by default, in order for bonding to
work on the widest range of hardware
# you should set it to 1 if your hardware supports it, as it
will be faster
# Here you specify as many slaves as you want, separarated by spaces
slaves eth1 eth2
# You can have as many bonding interfaces as you like, separate module
instances will be launched
# Here is and example of a boning interface with an assigned IP address
(we will not use any VLAN on top of it)
iface bond1 inet static
# Classic address/network definition
# three slaves attached
slaves eth3 eth4 eth5
# load-balancing mode
# Here is an automatic VLAN definition
# You can use both bondX.Y and bondX.0Y syntaxes, like with ethX.Y VLANs
iface bond0.50 inet static
# Here is an other VLAN attached to our bond0 interface
iface bond0.60 inet static