đ Executive Summary
TL;DR: Changing a Linux network bondâs mode via systemctl restart networking is often insufficient because the kernelâs bonding driver retains its initial configuration. To apply bond mode changes live without a full system reboot, directly update the kernelâs bonding parameters through sysfs or by bouncing the specific bond interface.
đŻ Key Takeaways
- The
systemctl restart networkingcommand only affects user-space scripts and does not instruct the Linux kernelâs loaded bonding driver to change its fundamental mode. - The most professional and least disruptive method for live bond mode changes is to write the new mode directly to
/sys/class/net/bondX/bonding/modevia sysfs. - Regardless of the live application method, the
/etc/network/interfacesfile must always be updated to ensure bond mode changes persist across reboots.
Changing a network bondâs mode should be simple, but the Linux kernel often holds onto old configurations. Learn why a networking service restart isnât enough and how to apply bond changes live without a full server reboot.
That Awful Moment: When âsystemctl restart networkingâ Isnât Enough
I remember it like it was yesterday. 2 AM, a tight maintenance window for our primary database cluster, prod-db-01. The task seemed simple: change the bond mode from active-backup (mode 1) to LACP (mode 4) for better throughput. I confidently edited /etc/network/interfaces, ran systemctl restart networking, and⌠nothing. The bond was stubbornly stuck in its old mode. My change window was closing, and the thought of telling my manager we needed to reboot a critical production database for a âsimpleâ network tweak sent a cold shiver down my spine. Weâve all been there, staring at a terminal, wondering why the simple things are suddenly so hard.
So, Whatâs Actually Going On Here?
This is a classic case of the disconnect between user-space services and the Linux kernel. When you run systemctl restart networking (or /etc/init.d/networking restart on older systems), youâre just re-running the scripts that read config files and manage interfaces. You are not telling the kernelâs bonding driverâwhich is already loaded and running with its initial parametersâto change its fundamental behavior. The kernel module is holding onto that old state for dear life.
A reboot works because itâs the ultimate reset. On startup, the kernel loads the bonding driver from scratch and configures it using the parameters it finds in your config file. But you donât need to go that far.
The Fixes: From a Tap to a Sledgehammer
Here are three ways to solve this, ranging from a quick tap to the big red button.
Solution 1: The âQuick & Dirtyâ Interface Bounce
This is the most common approach. Instead of restarting the entire networking service, you just target the specific bond interface. You force it to tear itself down and then bring it back up, which makes it re-read its configuration from /etc/network/interfaces during the âupâ phase.
Be warned: This will cause a brief network interruption on that interface, usually just a few seconds, but that could be enough to disrupt a sensitive application. Use with caution on production systems.
# First, make sure your /etc/network/interfaces file has the new mode
# For example, changing to LACP (802.3ad)
# bond-mode 4
# Then, bounce the interface
ifdown bond0
ifup bond0
Pro Tip: Always run these commands from a console session (like an iDRAC, iLO, or VM console), not an SSH session. If
ifup bond0fails for some reason, youâll be locked out of your own server. Donât ask me how I know.
Solution 2: The âSurgical Strikeâ via Sysfs
This is my preferred method for live changes. Itâs the most professional and causes the least disruption. Instead of tearing anything down, weâre going to talk directly to the kernel driver through its filesystem interface (sysfs) and tell it to change the parameter on the fly.
This changes the running configuration but does not make it permanent. You MUST also update /etc/network/interfaces so the change persists after the next reboot.
# To change a live bond (bond0) to LACP (mode 4)
echo 4 > /sys/class/net/bond0/bonding/mode
You can verify the change immediately:
cat /proc/net/bonding/bond0
Youâll see the âBonding Modeâ line reflect the new setting. Itâs clean, instant, and usually has no noticeable packet loss.
Hereâs a quick reference for the bonding modes:
| Mode Number | Mode Name | Common Use Case |
0 |
balance-rr |
Round-robin. Simple load balancing. |
1 |
active-backup |
Failover. Only one slave is active. |
4 |
802.3ad (LACP) |
Dynamic Link Aggregation. Requires switch support. |
6 |
balance-alb |
Adaptive Load Balancing. Doesnât require switch support. |
Solution 3: The âBig Red Buttonâ (The Reboot)
Letâs be honest. Sometimes, you just need it to work, no questions asked. The reboot is the ultimate âturn it off and on again.â Itâs guaranteed to apply your changes from /etc/network/interfaces because the entire system state is wiped clean and rebuilt from config files on disk.
I call this the âPlanned Maintenanceâ option. If youâre already in a scheduled downtime window and canât afford any surprises from a finicky live change, a clean reboot is often the safest, albeit loudest, choice. Thereâs no shame in it when reliability is your top priority.
Just make sure your changes are saved correctly first!
đ Read the original article on TechResolve.blog
â Support my work
If this article helped you, you can buy me a coffee:

Top comments (0)