centos6.x Configure NIC Bindings
(mainly understand three kinds of modes: mode=0,1,6.)
Stop NetworkManager first.
Service NetworkManager Stop
Chkconfig NetworkManager off//power-on self-boot shutdown
In the/etc/sysconfig/network-scripts/directory to establish ifcfg-bond0 files, the contents of the document are as follows:
Device=bond0
Userctl=no
Bootproto=none
Onboot=yes
ipaddr=192.168.100.17//IP you have set
netmask=255.255.255.0
gateway=192.168.100.1
Type=unknown//or Ethernet (if NetworkManager is not closed, use UnKnown)
bonding_opts= "miimon=80 mode=0"//This step can also be filled in below/etc/modprobe.d/bonidng.conf
Binding mode is 0, which is the Rond-robin mode.
Then modify the Ifcfg-eth0 file separately, as follows:
Device= "Eth0"
onboot= "Yes"
Bootproto=none
Master=bond0
Slave=yes
Userctl=no
In the Ifcfg-eth1 file modified as follows:
Device= "Eth1"
onboot= "Yes"
Bootproto=none
Master=bond0
Slave=yes
Userctl=no
In the/etc/modprobe.d/directory to establish bonding.conf files, the contents of the document are as follows:
Alias Bond0 Bonding
---If the previous bond0 configuration is not filled bonding_opts, here is another line: Options bond0 miimon=100 mode=0
Perform modprobe bonding
Then restart the Network Service network restart
-------If using remote connection, please use: modprobe bonding&&service Network restart
Then you can use IFCONFIG-A to see the bundled BOND0 network card, BOND0 and Eth0,eth1 MAC address are the same.
You can cat/proc/net/bonding/bond0 this command to see the bindings
NIC Binding lifted:
Delete ifcfg-bond0, and delete/etc/modprobe.d/bonding.conf
Modify the appearance of Ifcfg-eth0 and ifcfg-eth0 before binding
Rmmod bonding (Very important)
Service Network restart