To bind a Linux dual-nic, you can use two NICs to virtualize an Eni (which must be supported by a switch). The aggregated device looks like a separate Ethernet interface device, in general, two NICs have the same IP address, and parallel links are aggregated into a logical link. This document describes in detail how to bind a dual-network card to centos 6.4.
Determine whether the NetworkManager service has been stopped before the operation. Otherwise, an error is reported.
# Service NetworkManager status
The NetworkManager is stopped.
Binding operation:
1. Create a ifcfg-bond0 file in the/etc/sysconfig/network-scripts/directory with the following content: DEVICE = bond0
USERCTL = noBOOTPROTO = staticONBOOT = yesIPADDR = 10.0.0.10 # enter the IP Address Mask gateway to bind as needed.
NETMASK = 255.255.255.0GATEWAY = 10.0.0.1TYPE = Ethernet2. modify the ifcfg-em1 file as follows: DEVICE = em1ONBOOT = yesBOOTPROTO = noneMASTER = bond0SLAVE = yesUSERCTL = no modify the ifcfg-em2 file as follows: DEVICE = em2ONBOOT = yesBOOTPROTO = noneMASTER = bond0SLAVE = yesUSERCTL = no3./etc/modprobe. d/create bonding in the directory. conf file. The file content is as follows: alias bond0 bonding and then restart the network service network restart
4. Test
Start terminal on the server and ping the gateway.
Unplug a network cable and check the ping data. After you confirm that there is no problem, connect it to the network cable and unplug another network cable to observe the effect of Dual-nic binding.