GekBuzz

Answers, Explainers & Everyday Guides

Troubleshoot Network Bonding Not Working on Ubuntu: 10 Fixes

Troubleshoot Network Bonding Not Working on Ubuntu: 10 Fixes

Network bonding is a powerful feature in Ubuntu that combines multiple network interfaces into a single logical interface for redundancy and increased throughput. However, configuring and troubleshooting bonding can be challenging, especially for system administrators and users managing critical network infrastructure. This listicle covers 10 practical steps to diagnose and fix common issues when network bonding is not working on Ubuntu.

Check Kernel Module Loading

Network bonding in Ubuntu requires the bonding kernel module to be loaded. Use lsmod | grep bonding to confirm if the module is active. If it’s not loaded, run sudo modprobe bonding to load it. Without this module, bonding interfaces won’t function, making this the first essential check.

Verify Network Interface Names

Ubuntu uses predictable network interface names like enp3s0 or ens33

. Ensure the interfaces you want to bond actually exist and are correctly named by running ip link show. Using incorrect or non-existent interface names in bonding configuration files causes the bond to fail.

Inspect Bonding Configuration in Netplan or /etc/network/interfaces

Ubuntu uses Netplan (18.04 and later) or /etc/network/interfaces (older versions) for network configuration. Verify the bonding configuration syntax matches your Ubuntu version and includes correct parameters like mode, slaves, and miimon. Misconfiguration here is a frequent cause of bonding failure.

Set Proper Bonding Mode for Your Use Case

Bonding supports multiple modes such as balance-rr, active-backup, 802.3ad (LACP), and others. Choosing the wrong mode can cause the bond to not establish or drop traffic. For example, 802.3ad requires switch support and correct LACP configuration, while active-backup works without switch support but offers no load balancing.

Check Link Monitoring Settings (miimon)

The miimon parameter monitors link status to ensure failover works. A typical value is 100 (milliseconds). If miimon is not set or set too high, the bond may not detect interface failures promptly, causing network issues. Confirm it is enabled and set appropriately.

Verify Switch Configuration and Compatibility

If using modes like 802.3ad (LACP), the connected switch must support and be configured for link aggregation. Check switch settings to ensure ports are grouped correctly. Incompatible or misconfigured switches can prevent bonds from forming or cause intermittent connectivity.

Examine System Logs for Bonding Errors

System logs often contain clues about bonding issues. Use journalctl -xe or check /var/log/syslog for messages related to bonding or network interfaces. Errors such as "bonding: link status down" or "slave interface failure" provide actionable information for troubleshooting.

Test Network Interfaces Individually

Before bonding, ensure each physical interface works correctly on its own. Use ethtool to check link status and speed with ethtool enp3s0. Faulty or misconfigured interfaces will cause the bond to fail, so isolating interface issues is critical.

Restart Network Services and Reapply Configuration

After making changes, restart networking services to apply configurations. On Ubuntu 18.04 and newer, use sudo netplan apply. For older versions, restart networking with sudo systemctl restart networking. Failing to reload configurations can leave bonding non-functional despite correct settings.

Update Ubuntu and Network Packages

Occasionally, bonding-related bugs exist in specific kernel or network package versions. Ensure your system is up to date using sudo apt update && sudo apt upgrade. Updated kernels and drivers may resolve underlying issues affecting bonding.

How to Choose

When troubleshooting network bonding on Ubuntu, prioritize checks based on your environment. Start with verifying kernel module loading and interface names, as these are foundational. Next, review your configuration files and bonding mode to ensure compatibility with your switch and network goals. Always confirm physical interface health before diving into complex switch configurations or kernel updates. Logs provide valuable insights, so use them to guide your efforts. Applying updates and restarting services are final steps that often fix residual issues.

Frequently Asked Questions

Q: How can I tell if bonding is working?
Use cat /proc/net/bonding/bond0 to see bond status, including active slaves and mode. Successful bonding shows all configured interfaces as slaves and an active link.

Q: What bonding mode should I use if my switch doesn’t support LACP?
Use active-backup mode, which provides failover without requiring switch support, though it does not load balance traffic.

Q: How do I enable bonding on Ubuntu 20.04 using Netplan?
Define a bonds section in your Netplan YAML file with parameters like interfaces, parameters.mode, and parameters.miimon, then apply with sudo netplan apply.

Q: Why does my bond interface show as DOWN?
This can occur if slave interfaces are down, the bonding module isn’t loaded, or there is a misconfiguration in the bonding mode or parameters. Check each component step-by-step.

Q: Can I bond wireless interfaces on Ubuntu?
Wireless bonding is generally not supported or reliable due to the nature of wireless connections and driver limitations. Ethernet interfaces are recommended for bonding.

Q: What is the difference between balance-rr and 802.3ad modes?
balance-rr sends packets in round-robin fashion without switch support but can cause out-of-order packets. 802.3ad (LACP) requires switch support and aggregates links more efficiently and reliably.

Final Thoughts

Network bonding on Ubuntu can significantly enhance network performance and reliability, but it requires careful setup and troubleshooting. By systematically verifying kernel modules, interface status, configuration files, bonding modes, and switch compatibility, most bonding issues can be resolved effectively. Remember to leverage system logs and keep your Ubuntu system updated to avoid bugs. With these steps, you can confidently diagnose and fix network bonding problems, ensuring your network runs smoothly and resiliently.

Related

Troubleshoot Network Bonding Not Working on Ubuntu: 10 Fixes

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top