If you want to add a bonded interface in Debian Linux, you don’t need the package ifenslave anymore. You can create/modify/delete the bonded interface completly through sysfs.
at first load the required bonding-driver into kernel:
modprobe 'bonding'
create a virtual (bonding) interface, called bond0: (the prefix ‘+’ adds an interface, ‘-‘ removes the interface)
echo '+bond0' > /sys/class/net/bonding/bonding_masters
set the bonding mode: (4 = 802.3ad LACP)
echo '4' > /sys/class/net/bonding/bond0/mode
add the NICs to the bonding interface: (the prefix ‘+’ adds an interface, ‘-‘ removes the interface)
echo '+eth0' > /sys/class/net/bonding/bond0/slaves
echo '+eth1' > /sys/class/net/bonding/bond0/slaves
activate the interfaces: (if you got ‘no carrier/connection’, check twice if the interfaces are up)
ifconfig eth0 up
ifconfig eth1 up
ifconfig bond0 up
Info: you can list all details about your created bonding interface at anytime with the following command:
cat /proc/net/bonding/bond0