bond详解(bond详解)
1, the principle of bonding:
What is needed from work card bonding hybrid (promisc) mode of speaking. We know that, in normal circumstances, work card only receives the target hardware address (MAC Address) is the frame of its own Mac, filtering for other data frames, in order to reduce the burden on the driver. But the card also supports another are called hybrid promisc model, work can receive all the frames, such as tcpdump, is running in this operation in this mode, and modify the driver's MAC address, the work card Mac address into the same data frame. You can receive a specific mac. Then the data frame transmission corresponding to the bond driver processing.
2 、 bonding module working mode:
Bonding mode=1 miimon= is used to link monitoring. For example: miimon=100, then each 100ms system to monitor a link state, if a line is disconnected to another line; mode value represents the work mode, he has 0-6 seven models, used for 0, 1, 6, three.
Mode=0: load balancing mode, automatic backup, but need to "Switch" and set support.
Mode=1: automatic standby mode, one line if the line, other lines will be automatic backup.
Mode=6: load balancing mode, automatic backup, do not need to
support and set the "Switch".
Be careful:
MODE=0 test results: if the switch is not configured link aggregation, MAC turbulence will occur, after the configuration of the link polymerization will not appear, the packet issued MAC Bond0 MAC
Conclusion: MODE=6 test switch without special configuration, can achieve load balancing. The packets sent by the work cards use their respective MAC, so it will not cause the turbulence of the MAC address table of the switch
3 、 installation and configuration of Debian system
, install ifenslave
Apt-get install ifenslave
, let the system automatically boot loading module bonding
Sudo sh -c echo bonding mode=1 miimon=100 "/etc/modules""
, network card configuration
Sudo VI /work/interface
bond详解(bond详解) 来自淘豆网www.taodocs.com转载请标明出处.