VMware Workstation 12
Normal real-world environment, the network card to do Bond Configure the following (False Set is a bond0 ) :
1, Ifcfg-eth0
Device=eth0
Onboot=yes
Master=bond0
Bootproto=none
Slave=yes
2, Ifcfg-eth1
Device=eth1
Bootproto=none
Master=bond0
Slave=yes
Onboot=yes
3 ,ifcfg-bond0
Device=bond0
Bootproto=static
ipaddr=172.16.3.22
netmask=255.255.248.0
Onboot=yes
broadcast=10.1.7.255
4,/etc/modprobe.conf
After the original file content, append the following configuration:
Alias Bond0 Bonding
Options Bond0 miimon=100 mode=1
Configuration Explanation : miimon=100 , the system every 100ms Monitor the link connection status once, mode=1 , which means the NIC eth0,eth1 using hot Standby mode ( if mode=1, it means that eth0 and eth1 are in load-balanced mode )
5,/etc/rc.local
After the original file content, append the following configuration:
Ifenslave bond0 eth0 eth1
Configuration Explanation : Specify the hot standby mode eth0 and the eth1 working order of network cards
6 , Restart the server
different from the real-world environment, VMware the virtual machine gives Linux system to do bond0 NIC configuration, as done, the test found Down off eth0 after the bond0 Network card Ping does not work, unable to play the network card backup effect.
looked up the information and found it necessary to bond0 Add a parameter configuration to the configuration file, i.e. the modified bond0 The network card configuration file is as follows:
Device=bond0
Bootproto=static
ipaddr=172.16.3.22
netmask=255.255.248.0
Onboot=yes
broadcast=10.1.7.255
Bonding_opts= "Fail_over_mac=1"
Configuration Explanation : default fail_over_mac=0 , when an error occurs, change only slave of the mac Do not change Bond ; fail_over_mac=1 , you only change Bond Do not change slave .
after the change, Service Network Restart Restart The network adapter configuration, Down off eth0 , bond0 it'll make sense.
This article is from the "Sky Blog" blog, be sure to keep this source http://yesit.blog.51cto.com/2609379/1857875
Linux NIC bond configuration under VMware Virtual machine environment