1. Use the yast tool to configure the first network card. At this time, a configuration file will be generated under /etc/sysconfig/network (for example: ifcfg-eth-xx:xx:xx:xx:xx:xx)
2.cp /etc/sysconfig/network/ifcfg-eth-xx:xx:xx:xx:xx:xx /etc/sysconfig/network/ifcfg-bond0
3. Edit ifcfg-bond0 file:
Add the following lines:
BONDING_SLAVE_0='eth0'
BONDING_SLAVE_1='eth1'
BONDING_MASTER=yes
BONDING_MODULE_OPTS=
The modified ifcfg-bond0 file is as follows:
BOOTPROTO='static'
BROADCAST='192.168.23.255'
IPADDR='192.168.23.6'
MTU=''
NETMASK='255.255.255.0'
NETWORK='192.168.23.0'
REMOTE_IPADDR=''
STARTMODE='onboot'
UNIQUE='WMHV.+EMLITqy0YF'
BONDING_MASTER=yes
BONDING_SLAVE_0='eth0'
BONDING_SLAVE_1='eth1'
BONDING_MODULE_OPTS='miimon=100 mode=1 use_carrier=0' - Note: mode=1 is the main and backup network card, mode=0 is load sharing.
4. Delete the configuration file of the bound network card under /etc/sysconfig/network (such as: ifcfg-eth-xx:xx:xx:xx:xx:xx)
5. Use rcnetwork restart to restart the service
6. Use the ifconfig -a command to check whether there is an IP address on bond0, but there are no IP addresses on eth0 and eth1.
The easiest way:
a. Do not configure any network card, so there will be no files similar to ifcfg-eth-xx:xx:xx:xx:xx:xx in the /etc/sysconfig/network directory, so there is no need to delete them.
b. In the /etc/sysconfig/network directory, create a new file ifcfg-bond0 with the following content:
BOOTPROTO='static'
BROADCAST='192.168.23.255'
IPADDR='192.168.23.6'
MTU=''
NETMASK='255.255.255.0'
NETWORK='192.168.23.0'
REMOTE_IPADDR=''
STARTMODE='onboot'
UNIQUE='WMHV.+EMLITqy0YF'
BONDING_MASTER=yes
BONDING_SLAVE_0='eth0'
BONDING_SLAVE_1='eth1'
c. Use the rcnetwork restart command to restart the service.
d. Use ifconfig -a to check the help setting results and it will be OK.
If there are two other network cards to help determine, copy ifcfg-bind0 to ifcfg-bond0, change the IP information and network port information, and then restart the service, it will be OK. It is very simple.