In this post I will explain how to create a bonding interface in Arch Linux using netcfg and systemd (to load the kernel module and start netcfg service).

First of all, configure the bonding kernel module.

root@sabertooth ~ # vim /etc/modprobe.d/bonding.conf options bonding mode=0 options bonding miimon=100

For more bonding module options and parameters, please refer to: kernel.org bondig documentation

Now create the netcfg profile for your bond interface. You can check /etc/network.d/examples for more sample config files.

root@sabertooth ~ # vim /etc/network.d/bond CONNECTION='bond' INTERFACE='bond0' SLAVE_INTERFACES=('eth0' 'eth1') #IP='dhcp' IP='static' ADDR='192.168.1.100' NETMASK='255.255.255.0' GATEWAY='192.168.1.1' DNS=('192.168.1.1') SKIPNOCARRIER='yes'



You can skip this part and go straight to the last 2 commands. Thanks to Thomas for noticing.

Last config step, add the profile to the netcfg NETWORKS array.

root@sabertooth ~ # vim /etc/conf.d/netcfg # Enable these netcfg profiles at boot time. # - prefix an entry with a '@' to background its startup # - set to 'last' to restore the profiles running at the last shutdown # - set to 'menu' to present a menu (requires the dialog package) # Network profiles are found in /etc/network.d NETWORKS=(bond) # Specify the name of your wired interface for net-auto-wired #WIRED_INTERFACE="bond0" # Specify the name of your wireless interface for net-auto-wireless #WIRELESS_INTERFACE="wlan0" # Array of profiles that may be started by net-auto-wireless. # When not specified, all wireless profiles are considered. #AUTO_PROFILES=("profile1" "profile2")

As you can see, I only use the NETWORKS line, all the rest is not needed in this case.

Lets test it. Make sure the bonding module is NOT loaded, systemd will do this for you.

root@sabertooth ~ # systemctl start netcfg@bond.service

Check ‘journalctl’ if anything goes wrong.

And start at boot.

root@sabertooth ~ # systemctl enable netcfg@bond.service