Interface Bonding on Debian
This step by step guide is for configuring interface bonding on Debian based operating systems.
For the following guide we will use the following data and assume that you are running all commands as the root user:
Type | Value |
---|---|
Primary interface | em1 |
Secondary interface | em2 |
Bond interface | bond0 |
IP Address | 192.0.2.2 |
Netmask | 255.255.255.0 |
Gateway | 192.0.2.1 |
Primary MAC address | 00:00:5E:00:53:00 |
Step-by-step guide
How to do it:
- Determine whether the bonding module is loaded and package ifenslave is installed:
lsmod | grep bonding dpkg-query -l | grep ifenslave
- If it is loaded and ifenslave is installed, go to step 3, otherwise:
apt-get install ifenslave modprobe bonding && echo "bonding" >> /etc/modules
- With the bonding module loaded into the kernel we need to determine what the interfaces are called:
ls /sys/class/net/
- From this list we need to select which interfaces we are going to use in the bond (the slaves). In most cases this will be the first two interfaces (eth0 & eth1, em1 & em2, eno0 & eno1 etc.)
Debian uses a single file to manage the interface configurations, as such we can simply edit the file and create the bond in a single step.
auto eth0 iface eth0 inet manual auto eth1 iface eth1 inet manual auto bond0 iface bond0 inet static address 192.0.2.2 gateway 192.0.2.1 netmask 255.255.255.0 bond-mode 802.3ad bond-miimon 100 bond-downdelay 200 bond-updelay 200 bond-lacp-rate 1 bond-slaves eth0 eth1 dns-nameservers 192.0.2.53
- With our interfaces configured we need to restart networking to bring up the bond and start using it:
Debian 6/Ubuntu 12: "/etc/init.d/networking stop; /etc/init.d/networking start" Debian 7/Ubuntu 14: "/etc/init.d/networking stop; /etc/init.d/networking start" Debian 8/Ubuntu 16: "systemctl restart networking"
Get in touch
If you need advice on your Interface Bonding for Debian requirements, we’re here to help.
Call us on 0333 247 0222: Monday – Friday, 9am – 5.30pm.
Chat with us on LiveChat: Monday – Friday, 9am – 5.30pm.
Write to us: Send us a support ticket from your Simply portal and we’ll get back to you as soon as we can.
If you don’t have an account with Simply Hosting yet, you can also send our Sales team an enquiry and we’ll get back to you between 9am and 5.30pm, Monday to Friday.