In the era of Internet, the high availability of the network has always been a very critical part, network failures directly lead to the interruption of application services, and the development of IT technology In terms of trends, in addition to high availability, the network will have higher and higher requirements for high performance. In order to provide high availability or high performance of the network, we may need to bundle multiple NICs into one virtual NIC to provide external services, so that higher bandwidth can be obtained, and even if one physical NIC fails, it will not cause The connection is broken. The word multi-network card binding has different names on different platforms. It is called bonding under Linux. Let's look at how to configure bonding.
Two Prerequisites
This article uses RHEL 6 as an example. The configuration of other versions of OS
is basically the same. The difference is the configuration file. I will not repeat them here. If necessary, according to this article, it should be a problem. Linux network card binding is generally double network card, more than two network card binding is the same step, this article describes the configuration of four network cards.
Three steps
3.1 Confirm that the NIC device is eth1-4
3.2 Edit the NIC configuration file ifcfg-eth* as follows: Br>
[root@dddhost Desktop]# cat /etc/sysconfig/network-scripts/ifcfg-eth1DEVICE=eth1ONBOOT=yesBOOTPROTO=noneMASTER=bond0SLAVE=yesUSERCTL=noEdit 4 NICs in turn, where DEVICE is the device name (eth1) -4), MASTER is the bond network card name (bond0).
3.3 Create a bond NIC configuration file ifcfg-bond0 in the folder /etc/sysconfig/network-scripts/:
[root@dddhost Desktop]# vi /etc/sysconfig/network- Scripts/ifcfg-bond0DEVICE=bond0USERCTL=noONBOOT=yesBOOTPROTO=staticIPADDR=10.2.1.123NETMASK=255.255.255.0GATEWAY=10.2.1.1BONDING_OPTS="miimon=80 mode=1"Set IP, subnet mask, gateway and other parameters, And the mode of network card binding, where BONDING_OPTS option:
3.4 Create bonding.conf in the folder /etc/modprobe.d and write the following:
[root@dddhost Desktop]# cat /etc/modprobe. d/bonding.confalias bond0 bonding
3.5 At this point, the configuration of the NIC binding has been completed. It should be noted that the NetworkManager in the Linux system will affect the bond NIC. Therefore, you need to disable the service and execute the following command:
[root@dddhost Desktop]# service NetworkManager stopStopping NetworkManager daemon: [ OK ][root@dddhost Desktop]# chkconfig NetworkManager off
3.6 Restart the network for all configurations to take effect
[root@dddhost Desktop]# service network restartShutting down interface bond0: [ OK ]Shutting down loopback interface: [ OK ]Bringing up loopback interface: [ OK ]Bringing up interface bond0: [ OK ]
3.7 Check the status of the bond NIC
cat /proc/net/bonding/bond0, you can see the status of each NIC, such as using the active/standby mode (and mode=1), you can see the currently active NIC
3.8Test
From the output above, you can see that the activated network card is eth1. In order to test whether the network card binding is successful, we find another computer to ping bond0. IP, then disable eth1 and observe network connectivity. The test is completed and the network card binding works normally.
There are WINDOWS on the computer and LINUX Some people like GRUB, and some people like NT Loader to
1. Get root privileges without logging in. If you dont set GRUB password, then we can use the easie
The network is often dropped. Many technicians think that the router is unstable. The ac
The reverse proxy can be divided into two types from the transmission: 1: synchronous mode (apache-
Wrong way to modify linux system file permissions
XenServer multi-NIC binding implementation tutorial
How to implement DNS service under Linux
Simple file synchronization between Linux
Nginx anti-theft chain configuration
Linux source code installation apache+mysql+php5 and several forums installed
Various Linux common fault solutions
Three lightweight WebServer--lighttpd, thttpd, shttpd introduction
The difference between Linux synchronous/asynchronous and blocking/non-blocking
360 driver master backup where
Linux monitoring system resource usage rate
How to set the number of switching windows displayed in win7 computer?
Automatically clean up page file
How to uninstall cydia in iphone4s?
Windows XP classic Internet problem four
How to "easy to use" the buttons of the Win8.1/RT 8.1 system?
Windows 10 open the software prompts "can not open this application" how to solve?
Let Linux run Windows programs Wine
Win10 installation disk integrates all versions and patches for free download