Configuring bonding – Debian style

Hotpluging bonding interfaces

The idea of the Bonding of network interfaces (sometimes called Teaming) is to
have two interfaces to work together and it appears that it is the same
physical device, ie, having the same MAC. This is achieved by the tool
ifenslave which set the kernel to only see/use a device while sending
the packets via the slave devices using a Round-Robbin planner.

Bounding Configuration

1. Installing the tool ifenslave:


# Apt-get install ifenslave-2.6 (depending on the branch of the kernel in use)

2. Configuring the kernel module. This step is performed in two stages:

– Loading of the module:


modprobe bonding mode = 1 miimon = 100 downdelay = 200 updelay = 200 max_bonds = 1

– Setting up the operator to load the module in the boot of the machine.

Edit the file”/”etc/modprobe.d/arch/i386 (depending on architecture) and add the following:


alias bond0 bonding

options bonding mode = 1 miimon = 100 downdelay = 200 updelay = 200 max_bonds = 1

An example of bonding would be 2 interfaces:


alias bond0 bonding
options bond0 mode = 1 miimon = 100 downdelay = 200 updelay = 200 max_bonds = 2
aka bond1 bonding
bond1 options miimon mode = 1 = 100 downdelay = 200 updelay = 200 max_bonds = 2

Max_bonds parameter indicates the number of bonding interfaces that will be in the machine
For more information on the mode parameter, see: http://systemadmin.es/2009/04/los-modos-de-bonding

3. Edit the file ”/etc/network/interfaces” to set the new bounding interface.
At this point it is important to note that:

– If you restart the service and networking of the machine have been
removed from the file previously configured interfaces, these devices are built
creating a potential point of failure.

– If you had a firewall configured on the machine, it is necessary to
adapt to new interfaces created in the bonding face to continue working
correctly.

– Ensure that the routing table is consistent with the new configuration.

Taking these three points in mind, the change to face bonding is as follows:

– Device configuration desired bond with the ips and all the machine
had previously been added as an alias for this new device.

Example configuration:


auto bond0
iface bond0 inet static
address 193.144.63.25
netmask 255.255.255.240
up /sbin/ifenslave bond0 eth0
down /sbin/ifenslave-d bond0 eth0
auto bond0:1
iface bond0:1 inet static
address 193.144.63.29
netmask 255.255.255.240

When you add the device alias on bonding is critical to be added after the creation of the configuration of the device and not configure the devices first and then the alias

– Adapting to the new firewall devices.
– Restarting the network service system.
– Decrease manual of all interfaces before using the command” ”’ifdown’.
– Remove all previous interfaces file”/ etc / network / interfaces”
– Restarting the network service system.
– If possible / necessary to reboot the system to verify that all load at boot time either from the machine.

Advertisements