The purpose of the experiment is to bind the two NICs, and solve the load balancing and automatic switching.
Linux operating system 6.5,bond0,eth1,eth2.
Bond0 10.10.9.126 eth1 no eth2.
The configuration is as follows:
cd/etc/sysconfig/network-scripts//Enter the network configuration file
CP ifcfg-eth0 ifcfg-bond0/Copy ifcfg-eth0 renamed to ifcfg-bond0 the original Ifcfg-eth0 continues to exist
Configure IFCFG-BOND0
Device=bond0
Bootproto=none
Onboot=yes
ipaddr=10.10.9.126
dns=202.106.196.115
netmask=255.255.255.0
gateway=10.10.9.3
Type=ethernet
Configure Ifcfg-eth1
Type=ethernet
Device=eth1
Bootproto=static
Onboot=yes
Configure Ifcfg-eth2
Device=eth2
Bootproto=static
Onboot=yes
Configure Vi/etc/rc.d/rc.local
Ifenslave bond0 eth2 eth1
Route Add-net 10.10.0.0. netmask 255.255.255.0 bond0
Configure etc/moprobe.conf
Alias Eth2 e1000
Alias Eth1 e1000
Alias Bond0 Bonding
Option bond0 miimon=100 mode=0/mode parameter has 0,1,2,3
0= load Balancing mode, both NICs are working
1 = Only one NIC works and the other is backed up
Save the end. Restart the NIC. Ok
This article is from the "opportunity to prepare the person von." Blog, declined reprint!
Linux Network first quarter OPS 001