Bonding fails after reboot on RHEL 8 – fix ifcfg config
Network bonding in Linux dies after reboot because ifcfg files miss a key line. Here's the real fix.
Quick answer
Add BONDING_OPTS="mode=1 miimon=100" to /etc/sysconfig/network-scripts/ifcfg-bond0 and remove NM_CONTROLLED=no from slave interfaces.
Why this happens
You set up a bond interface – say bond0 with two slaves, eth0 and eth1. It works great until the next reboot. Then the bond isn't there. NetworkManager doesn't know how to activate it because the bond config files miss a critical parameter: BONDING_OPTS. Without it, the kernel doesn't apply bonding settings after restart. The bond interface shows as down, or the slaves don't join. I've seen this on RHEL 8.4, CentOS 8, and Rocky Linux 8. The trigger is usually a reboot after manually editing ifcfg files instead of using nmcli.
Fix steps
- Check current bond status
Runcat /proc/net/bonding/bond0to see if the bond exists. If it shows nothing, the bond isn't loaded yet. - Open the bond config
Typesudo vi /etc/sysconfig/network-scripts/ifcfg-bond0. You should see something like:DEVICE=bond0
TYPE=Bond
NAME=bond0
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1 - Add BONDING_OPTS
Insert this line afterONBOOT=yes:
ReplaceBONDING_OPTS="mode=1 miimon=100"mode=1with your preferred mode (0 for balance-rr, 4 for 802.3ad). Save and exit. - Fix slave interfaces
Open each slave config, like/etc/sysconfig/network-scripts/ifcfg-eth0andifcfg-eth1. Make sure they look like this:
IfDEVICE=eth0
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
NM_CONTROLLED=noNM_CONTROLLED=nois missing, add it. If it's set toyes, change it tono. Do the same for eth1. - Remove stale NetworkManager connection
Runsudo nmcli con show. Look for a connection namedbond0oreth0. Delete them withsudo nmcli con delete <name>. NetworkManager sometimes creates its own profiles that conflict. - Restart network
Typesudo systemctl restart NetworkManager. Then check withcat /proc/net/bonding/bond0. You should see the bond active with slaves attached. Also ping your gateway to confirm connectivity.
Alternative fixes
If the bond still doesn't come up after reboot:
- Use nmcli instead – run
sudo nmcli con add type bond con-name bond0 ifname bond0 mode active-backup. Then add slaves withsudo nmcli con add type bond-slave ifname eth0 master bond0. This creates correct configs automatically. I recommend this for new setups. - Check kernel module – the bonding module may not load. Add
bondingto/etc/modules-load.d/bonding.confand runsudo modprobe bonding. - Disable NetworkManager entirely – set
NM_CONTROLLED=noin/etc/sysconfig/network-scripts/ifcfg-*for all interfaces including the bond. Then use oldnetworkservice:sudo systemctl enable network && sudo systemctl start network. This works but is heavy-handed.
Prevention tip
Always use nmcli to create bonds. Don't hand-edit ifcfg files. If you must edit manually, triple-check that BONDING_OPTS is present and that slave interfaces have NM_CONTROLLED=no. After any change, test with a reboot before deploying to production.
Was this solution helpful?