Creating a bond and bridge interface Ubuntu

Here is a hint in order to bond two interfaces together and then bridge the bond within Ubuntu

Firstly install the bond software

sudo apt-get install ifenslave
sudo modprobe bonding

Now edit the /etc/network/interfaces. I set up the interfaces em1 and em2 into bond0 and then bridged.

Note: you can find the name of your interfaces with the command ‘ip link’

auto lo
iface lo inet loopback

auto bond0
iface bond0 inet manual
bond-mode 1
bond-miimon 100
bond-slaves none

auto em1
iface em1 inet manual
bond-master bond0

auto em2
iface em2 inet manual
bond-master bond0

auto br0
iface br0 inet static
bridge_ports bond0
bridge_stp off
bridge_fd 0
bridge_maxwait 0

After the configuration it’s easiest just to reboot, as stopping and reloading the networking didn’t work.

Posted in Linux, Virtualization Tagged with:

Leave a Reply