Network Bonding with Ubuntu 13 Desktop


Maybe you want to add resiliancy to your networking, or you need to aggregate your network connections to improve throughput. This tutorial will walk you through bonding your network connections to accomplish those tasks, from the Unity desktop in Ubuntu 13.

Hardware Requirements

In order to bond network connections, you will need at least two network interface cards installed. Each interface must be connected to the same network. For more advanced bonding techniques, like true interface aggregation, you will also need a switch that supports 802.3ad.

Verify Available Network Interfaces

  1. Ensure two or more network connections exist from different NICs and that they are connected to the network. To verify, click the network icon (up/down arrow) in the Application Indicator bar.

Install the Required Packages

A default installation of Ubuntu 13.X will not contain the required packages. We need to download and install them.

  1. Open a new Terminal window.
  2. Install the ifenslave package.
    sudo apt-get install ifenslave-2.6
  3. Load the bonding module into kernel
    sudo modprobe bonding

Create the Virtual Network Interface

  1. Click the network icon (up/down arrow) in the Application Indicator bar, and the click Edit Connections…

  2. In the Network Connections application, click the Add button.
  3. When the Choose a Connection Type dialog box appears, select Bond from the drop down menu, and then click Create…

  4. Under the Bond tab, give your bonded interface a name by typing it into the Interface name input field. The default name is bond0.
  5. Click Add to add the network interfaces to the bond.
  6. When the Choose a Connection Type dialog box appears, select Ethernet, and then click Create… to create the first slave interface.
  7. Select the network interface for the first slave by selecting its MAC address from the Device MAC Address drop-down list.
  8. Click Save… to add the slave interface to Bond0.
  9. In the Edit Bond Connection dialog box, click Add to add the second slave.
  10. In the dialog box the appears, select the second network interface for bond0 by choosing its MAC address from the Device MAC address drop-down list.
  11. Click Save… to add the slave interface to Bond0.
  12. You should now see both interfaces listed for the bond0 virtual interface.
  13. Select the bond mode by choosing it from the Mode drop-down list. The available bonding modes are listed below.
    Mode Description
    Round Robin Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance. Note: DNS caching may cause one slave to receive more traffic, creating a possibly large inbalance.
    Active Backup Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond’s MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance. The primary option affects the behavior of this mode.
    XOR XOR policy: Transmit based on [(source MAC address XOR’d with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.
    Broadcast This mode causes all slave’s to transmit the same packets to the destination to provide fault tolerance. This mode does not provide load balancing.
    802.3ad Increases network throughput by combining the two interfaces into a single virtual interface. For example, two 1Gb interfaces can be aggregated into a single 2Gb interface.This mode requires a network switch capable of 802.3ad.
    Adaptive transmit load balancing
    Linux bonding driver mode that does not require any special network switch support. The outgoing network packet traffic is distributed according to the current load (computed relative to the speed) on each network interface slave. Incoming traffic is received by one currently designated slave network interface. If this receiving slave fails, another slave takes over the MAC address of the failed receiving slave
    Adaptive load balancing
    The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the NIC slaves in the single logical bonded interface such that different network-peers use different MAC addresses for their network packet traffic.
  14. Next, we’ll set the bond’s IPv4 settings.

Setting the Bond’s IP Address

  1. With the Editing Bond connection dialog box still open, click the IPv4 Settings tab.
  2. For DHCP settings, leave the default selection in the Method drop-down list.
  3. To configure a static IP, select Manual from the Method drop-down list. Then click the Add button to set the IP address, Netmask, and Gateway for the interface. Next, add the IP addresses of the DNS servers and define the domain search suffexes.
  4. Click Save… to save create the bonded network interface, bond0.
  5. You should now see the new bond0 network interface in the Network Connections dialog box.
  6. Reboot the computer to ensure the bonding module is loaded into the kernel and to restart the network daemon. Simply restarting the network daemon from the terminal kept crashing my system, however, your mileage may vary, as my tests where done in a virtual lab.

Testing the Bonded Connection

You should now have a fully working bonded network. To test it, do the following.

  1. Open up a new Terminal window.
  2. Check bond0’s configuration by using ifconfig.
    ifconfig bond0
  3. Ping another system or a known Internet address to ensure packets are send and received.
  4. If all went well, you should have similar results as in the figure below.


Bonding network interfaces in Ubuntu 13’s Unity Desktop was a little flaky, and not nearly as intuitive as it should be. However, I was able to get it to work after fiddling around with the configuration process.

It’s important to remember that, although the mechanics underneath are all the same, Ubuntu Desktop networking is different from Ubuntu Server networking. The former has a system that expects configurations to be done through a GUI application, with configuration files being stored in atypical locations, while the latter relies on an admin configuring conf files located in standard areas directly.

Other than in some niche areas, like video production, for example, bonding isn’t typically used in desktop environments. This may explain why it felt so flaky configuring it through Unity. It’s likely not a highly demanded feature on desktop versions of Ubuntu; therefore, it doesn’t receive the polish it so desparately needs.