NIC bonding on Debian

From Thomas-Krenn-Wiki
Jump to navigation Jump to search

Different kinds of bonding

  • mode=0 (balance-rr)
  • mode=1 (active-backup)
  • mode=2 (balance-xor)
  • mode=3 (broadcast)
  • mode=4 (802.3ad) (see also Link Aggregation and LACP basics)
  • mode=5 (balance-tlb)
  • mode=6 (balance-alb)

Install packages

 apt-get install ifenslave-2.6

Configuration Debian 5.0 Lenny and newer

In this example, we explain a configuration with mode 4 (802.3ad).

For the link aggregation, we use:

  • eth0 and
  • eth1

/etc/network/interfaces contains the following configuration:

auto lo bond0

iface bond0 inet static
  address 10.10.10.174
  netmask 255.255.255.0
  network 10.10.10.0
  gateway 10.10.10.1
  slaves eth0 eth1
  bond_mode 802.3ad

As remote station, we use the switch of an Intel modular server. Eth0 and eth1 of the server are connected to the LAN-ports 1 and 2 on the modular server switch. Both LAN-ports are configured for the link aggregation. Details on this can be found in the articles Link Aggregation for the Modular Server and Link Aggregation Load Balancing Test Modular Server Switch.

Configuration Debian 4.0 Etch

Adjustment of /etc/network/interfaces

iface bond0 inet static
   address 192.168.0.9
   netmask 255.255.255.0
   network 192.168.0.0
   gateway 192.168.0.1
   up /sbin/ifenslave bond0 eth0 eth1
   down /sbin/ifenslave -d bond0 eth0 eth1

Editing of /etc/modprobe.d/arch/i386 file

Add the following line there:

alias bond0 bonding
 options bonding mode=5 miimon=100 downdelay=200 updelay=200

Restart networking

 /etc/init.d/networking restart

How does bonding work with mode=5

The incoming traffic is received only from the active slave. Outgoing traffic is distributed across both slaves based on their respective loads.

Further links


Translator: Alina Ranzinger

Alina has been working at Thomas-Krenn.AG since 2024. After her training as multilingual business assistant, she got her job as assistant of the Product Management and is responsible for the translation of texts and for the organisation of the department.


Related articles

Compiling Linux kernel under Ubuntu or Debian
Debian GNU/Linux
Docker installation on Debian 12