System Servicesnetworkingbondingload-balancinginterfaces

ifenslave

ifenslave is a tool to attach and detach slave network interfaces to a bonding device for parallel routing. It enables simple load-balancing by sending packets via slave devices using a round-robin scheduler.

Description

ifenslave configures network interfaces for bonding, allowing multiple physical interfaces to act as a single logical device. This tool attaches and detaches slave network interfaces to a bonding device, which appears as a normal Ethernet device to the kernel but distributes traffic across slaves.

The primary use case is achieving load-balancing similar to channel bonding or trunking techniques used in switches. This setup improves network throughput by parallelizing traffic across multiple interfaces.

ifenslave requires kernel support for bonding devices to function. It integrates with standard networking tools and is particularly useful in environments needing high availability or increased bandwidth without complex configurations.

How It Works

ifenslave manages slave interfaces for a bonding device supported by the Linux kernel. The bonding device uses a simple round-robin scheduler to distribute outgoing packets across attached slave devices. Incoming traffic is handled normally by the kernel's Ethernet stack, while the bonding layer ensures load distribution for transmission, mimicking switch trunking behavior.

Installation

bash
sudo apt install ifenslave

Examples

Attaches eth0 as a slave interface to the bond0 bonding device
ifenslave bond0 eth0
Attaches eth1 as an additional slave interface to bond0 for load balancing
ifenslave bond0 eth1
Detaches eth0 from the bond0 bonding device
ifenslave -d bond0 eth0
Displays current slave interfaces attached to bond0
ifenslave bond0
Forces attachment of eth0 to bond0 even if conditions are not ideal
ifenslave -f bond0 eth0
Detaches all slave interfaces from bond0 bonding device
ifenslave -d bond0
Updated 2026-04-16kali.org ↗