The bond Linux Advanced Link Aggregation

A brief:
Generally, the production environment must provide 7 × 24 hours of network transport services. NIC teaming by means of technology can not only improve the network transmission speeds, more importantly, can also ensure that in case a network card fails, the network can still provide normal service. We assume the implementation of the two NIC binding technology so that they can jointly transmit data in normal operation, making the network transmission speed becomes faster; and even if there is a network card suddenly fails, another piece of card will automatically and immediately replace up to ensure that data transmission will not be interrupted.
Second, the three modes:
Common NIC teaming drive has three modes -mode0, mode1 and mode6. Here to bind two network cards, for example, used to explain the situation.
MODE0 (balanced load mode) (balance-rr): two cards are functioning normally, and automatic backup, but the ports to the polymerization technique to support binding in the switch device and a server connected to the local network card.
MODE1 (automatic backup mode) (active-backup): usually only one working card, and after it is replaced with another fail-card. (Advantages: high redundancy; disadvantages: low link utilization, a two card only at work)
MODE6 (balanced load mode): two cards are functioning normally, and automatic backup, without providing auxiliary support for the switch devices.
For example, there used to provide an NFS file server or samba service, the maximum transmission speed of the network it can provide is 100Mbit / s, but a particularly large number of users to access the server, then its pressure is necessarily great. In a production environment, network reliability is extremely important, and the transmission speed of the network must also be guaranteed. For this situation, the better choice is mode6 NIC binding mode of the drive. Because mode6 allow two network cards to work together at the same time, after which a network card fails to automatically backup, and no equipment to support the switch, thus providing a reliable network transmission protection.
Third, the operation
Experimental turn off NetworkManager
The first step: add two network cards, two network cards need the same network mode
Step 2: Use nmcli order to achieve bond
Command: nmcli
nmcli connection add type bond ifname bond0 mode 0
nmcli connection add type bond-slave ifname ens37 master bond0
nmcli connection add type bond-slave ifname ens38 master bond0
The third step: bond edit the configuration file (set the NIC IP and other information)
vim ifcfg-bond-bond0
Step four: Restart Service
systemctl restart network
Step five: Confirm bond status
cat /proc/net/bonding/bond0
Other :( bond pattern may be modified accordingly in the configuration file)
BONDING_OPTS=mode=balance-rr
BONDING_OPTS=mode=active-backup

Guess you like

Origin www.cnblogs.com/renyz/p/11329043.html