Linux under the dual NIC binding bond0

Source: Internet
Author: User
Tags bind backup linux

One: Principle:

Linux operating system under the two-NIC binding has seven different modes. Now the general enterprise will use dual network card access, so that both can add network bandwidth, but also to do the corresponding redundancy, can be said to be a lot of benefits. And the general enterprise will use the Linux operating system with the network card binding mode, of course, now the network card manufacturers will also be some for Windows operating system network card management software to do network card binding (Windows operating system does not have the ability to bind the network card needs Third-party support). To get to the point, Linux has seven kinds of network card binding mode: 0. Round robin,1.active-backup,2.load Balancing (XOR), 3.fault-tolerance (broadcast), 4.LACP, 5.transmit load balancing, 6. Adaptive load Balancing.

Two: Case one: mode=1 (active-backup): A NIC is active, one is in the backup state, all traffic is processed on the main link. Enable the backup NIC when the active NIC is down.

1:[root@lyt ~]# vim/etc/sysconfig/network-scripts/ifcfg-eth0 #编辑该设备eth0如图:

[Root@lyt ~]# vim/etc/sysconfig/network-scripts/ifcfg-eth1 #编辑该设备eth1 as shown in figure:

2:[root@lyt ~]# cd/etc/sysconfig/network-scripts/

[Root@lyt network-scripts]# cp ifcfg-eth0 ifcfg-bond0 #生成一个bond0的虚拟网卡

[Root@lyt network-scripts]# vim ifcfg-bond0 #编辑该网卡内容

3:[root@lyt network-scripts]# vim/etc/modprobe.conf #编辑该配置文件

The following figure 1 indicates that the system loads the bonding module at startup, and the external virtual network Interface Device BOND0;MIIMON=100 the system to monitor the link connection status every 100ms, if one of the lines does not pass, it is transferred to another line.

Mode=1 means that fault-tolerance (active-backup) provides redundancy, working in a way that is normally done, that is, by default, only one network card works and the other is backed up.

4:[root@lyt network-scripts]# vim/etc/rc.local #编辑该开机脚本, bind eth0 and eth1 network cards

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.