1

I create a NIC bond with two NICs with mode 6 in Cent OS 6.5. This is the configuration file:

# cat /etc/sysconfig/network-scripts/ifcfg-bond0 
DEVICE=bond0
ONBOOT=yes
TYPE=ethernet
BOOTPROTO=static
IPADDR=192.168.1.8
NETMASK=255.255.255.0
MTU=1500
BONDING_OPTS="mode=6 miimon=100 xmit_hash_policy=1"

However, after reboot, I can't see bond0. Then I view the bond configuration file again, I find the last line disappears:

# cat /etc/sysconfig/network-scripts/ifcfg-bond0 
DEVICE=bond0
ONBOOT=yes
TYPE=ethernet
BOOTPROTO=static
IPADDR=192.168.8.81
NETMASK=255.255.0.0
MTU=1500

I add this line and restart, then the bond NIC can work.

BONDING_OPTS="mode=6 miimon=100 xmit_hash_policy=1"

Does anyone know what's wrong with it? I don't change the file manually when the problem occurs.

Thanks a lot!

flypen
  • 205
  • 1
  • 3
  • 7

2 Answers2

0

Looks like this is NetworkManager issue, it's remove BONDING_OPTS from configuration file. There is two ways to fix this issue, first one to add NM_CONTROLLED=no in configuration file and try to restart. Second one, to create new file in /etc/modprobe.d/bond0.conf and put there:

alias bond0 bonding
options bonding mode=6 miimon=100 xmit_hash_policy=1

This file wouldn't be overwritten after reboot.

Alexander Tolkachev
  • 4,608
  • 3
  • 14
  • 23
0

Add NM_CONTROLLED=no to your configuration files and enable the 'network' service at startup.

chkconfig network on

Then disable the NetworkManager service.

/bin/systemctl disable NetworkManager.service

Restart your machine.

Glorfindel
  • 1,213
  • 4
  • 15
  • 22