Network host-backup strategy in Linux system NIC bonding technology

Source: Internet
Author: User

Operating system: CentOS Linux release 7.1.1503 (Core)

NIC Adapter: Eno1, Eno2

Bonding type:mode=1 (active-backup), master-backup policy

NIC binding mode A total of seven kinds, each mode, have their own use, the author because in the work of the mode=1 (active-backup) mode

In this author will work in the use of NIC binding bonding technology mode=1 (active-backup) mode configuration implementation process is recorded as follows:

1, in CentOS 7, we can use the modinfo bonding command to view the bonding module information, by default bonding module is not loaded

We can log in as root, enter the following command to open the load bonding module

modprobe --first- time bonding          //--first-time   Fail if module already inserted or removed

2, create the BOND0 configuration file, create the/etc/sysconfig/network-scripts/ifcfg-bond0 file, add the following content

device=bond0name=Bond0type=bondbonding_master=yesipaddr=10.101. 230.30 PREFIX=GATEWAY=10.101. 230.1 onboot=Yesbootproto=nonebonding_opts="mode=1 miimon=100 "

where bonding_opts Specifies the bonding mode, where 10.101.230.30/27 will be the IP address of the bond0

3, configure the Eno1 and ENO2 network card configuration file, the file is located in the/etc/sysconfig/network-scripts/directory, respectively, Ifcfg-eno1,ifcfg-eno2. Here, first modify the Ifcfg-eno1

Type=Ethernetbootproto=None #默认为dhcp, modified here to none, can also be modified into Staticdefroute=Yespeerdns=yespeerroutes=Yesipv4_failure_fatal=Noipv6init=yesipv6_autoconf=Yesipv6_defroute=Yesipv6_peerdns=yesipv6_peerroutes=Yesipv6_failure_fatal=NoNAME=Eno1uuid=26ea0bd1-0837-4b1a-9039-F147abd19632device=Eno1onboot=Yes #默认为no, this is modified to yes# the following two items for the new configuration option Master=Bond0slave=yes

4, in the same way, modify the Ifcfg-eno2 configuration file, after the completion of the modification, we use the following command to let the network configuration production, and then restart the Network.service service

Nmcli con Reload                        //makeNetwork Manager aware the changes. Systemctl Restart Network.service       // Restart Network Service

5, finally we can use the following command to detect whether the Bond0 interface has been started and working.

6, test, the author used the test method, for the disconnection of one of the network cable card, and then access the server, normal is the success.

Respect for the work of others reproduced please be sure to indicate the source: http://www.cnblogs.com/5201351/p/4898342.html

Network host-backup strategy in Linux system NIC bonding technology

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.