Providing more than one ethernet card to the network for communication over the server helps in introducing hardware redundancy thereby providing additional layer for protection from downtime of the server.

In this tutorial we shall be learning how to bond two ethernet cards to provide redundancy to the server running Ubuntu 12.04 LTS Edition

Step 1: Disable AppArmor – Ubuntu comes preloaded with AppArmor which can cause issues with bonding therefore it is should be disabled.

sudo invoke-rc.d apparmor stop

sudo update-rc.d -f apparmor remove

Step 2: Install ifenslave

sudo apt-get install ifenslave

Step 3: Create or edit /etc/modprobe.d/aliases.conf

alias bond0 bonding
options bond0 mode=0 miimon=100 downdelay=200 updelay=200 max_bonds=2

Step 4: Edit /etc/network/interfaces

Example /etc/network/interfaces:

# The loopback network interface
auto lo
iface lo inet loopback

# The interfaces that will be bonded
auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

# The target-accessible network interface
auto bond0
iface bond0 inet static
        up /sbin/ifenslave bond0 eth0
        up /sbin/ifenslave bond0 eth1

Step 5: Reboot the system

That’s all you have now created a new bonded interface with name bond0

Bonding Ethernet Cards in Linux

Leave a Reply