1. View Server version
Lsb_release-a
2. then enter the NIC information directory: cd/etc/sysconfig/network-scripts
3, then we want to create a new file, the file name is Ifcfg-bond0, can be created in three ways.
(vi ifcfg-bond0; Touch ifcfg-bond0; CP Ifcfg-eth0 IFCFG-BOND0) Here I choose the last one
execute CP ifcfg-eth0 ifcfg-bond0 after
in the > /etc/sysconfig/network-scripts directory
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/78/06/wKiom1ZzynbB039hAAAo0gKsWYs518.png "title=" 2.png " alt= "Wkiom1zzynbb039haaao0gkswys518.png"/>
4. Edit Ifcfg-bond0 Enter the following:
device=bond0onboot=yesbootproto=staticipaddr=192.168.1.8prefix=24gateway=192.168.1.1bonding_opts= "Mode=1 Miimon =100 "
Note: Mode=1 represents the primary standby mode, mode=0 indicates load balancing mode
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/78/07/wKiom1ZzzeKznVaXAAAl0vDuQn4613.png "title=" 7.png " alt= "Wkiom1zzzekznvaxaaal0vduqn4613.png"/>
5, next edit the physical network card: VI ifcfg-eth0 Enter the following content,
Device=eth0onboot=yesbootproto=nonemaster=bond0slave=yes
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/78/07/wKiom1ZzzrnDWY3EAAAfPg-uR44590.png "style=" float: none; "title=" 3.png "alt=" Wkiom1zzzrndwy3eaaafpg-ur44590.png "/>
6, similarly edit ifcfg-eth1, enter the picture to show the content
Device=eth1onboot=yesbootproto=nonemaster=bond0slave=yes
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/78/07/wKiom1ZzzrmwMkfSAAAfu0HbbUs315.png "style=" float: none; "title=" 4.png "alt=" Wkiom1zzzrmwmkfsaaafu0hbbus315.png "/>
7, Edit the/etc/modprobe.d/dist.conf file, add the following content:
Alias Bond0 bondingoptions bond0 miimon=100 mode=1
(Note: Because this is already written in ifcfg-bond0, this can be added or not added here.)
8, in the end we need to manually import the bonding driver, execute this command: modprobe-i bonding after execution can be checked by lsmod | grep bonding command to see if it is loaded.
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/78/05/wKioL1Zz0Eeg2FSLAAAm9UCDds8123.png "title=" 5.png " alt= "Wkiol1zz0eeg2fslaaam9ucdds8123.png"/>.
9, use dual network card, need to shut down NetworkManager service.
Service NetworkManager Stopchkconfig NetworkManager off
10, Restart Web Services: Service network restart dual NIC bindings are OK, check the network information by Ifconfig as follows:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/78/07/wKiom1Zz0H2AzT8rAAB99pUqeGI483.png "title=" 1.png " alt= "Wkiom1zz0h2azt8raab99puqegi483.png"/>
This article from "Fat Brother Study Blog" blog, reproduced please contact the author!
Linux RHEL6.4 binding dual NIC Master Standby mode