Configure multi-Nic aggregation for CentOS_6.5_X86

Source: Internet
Author: User
CentOS_6.5_X86 multi-network card aggregation (bonding) Some applications may have the biggest bottleneck in network data transmission (such as diskless network systems in some places). to explain this bottleneck, the aggregation technology of multiple NICs is powerful here. aggregation can be understood as the combination of multiple NICs into a parallel logical Nic, and the transmitted traffic is the sum of these NICs (of course, depends on whether your Nic aggregation mode CentOS_6.5_X86 is configured with multi-Nic aggregation (bonding)

Some applications may have the biggest bottleneck in network data transmission (such as diskless network systems in some places). to solve this bottleneck, the convergence technology of multiple network cards is amazing here, aggregation can be understood as the combination of multiple NICs into a parallel logical Nic, and the transmitted traffic is the sum of these NICs (of course, it depends on your Nic aggregation mode)
 

There are 7 clustering modes in Linux, the most common ones are 0, 1, and 6. we mainly introduce these three modes:
0(Balance-rr) is also the round robin (RR) mode. it is very familiar with the contact ipvs. the traffic of each network card in this mode is almost equal. VSwitch support is required.
1(Active-backup) redundancy mode, that is, only one network card is working. when a work network card fails, it is immediately replaced. it is mostly used in high-availability environments.
6(Balance-alb) adaptive load. if the packet sent is transmitted to the first Nic, the remaining one goes to the second Nic, and so on.


1. enable the system to boot the bonding kernel and specify its working mode.

 

[Root @ vqiu ~] # Vi/etc/modprobe. d/bonding. conf
Alias bond0 bonding
Options bond0 miimon = 100 mode = [, 6]

# Manually create this file without it

2. edit the NIC (pay attention to the red part)

 

[Root @ vqiu ~] # Vi/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = eth0
TYPE = Ethernet
ONBOOT = yes
NM_CONTROLLED = yes
USERCTL = no
IPV6INIT = no
MASTER = bond0
SLAVE = yes

 

[root@vqiu ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1DEVICE=eth1TYPE=EthernetONBOOT=yesNM_CONTROLLED=yesUSERCTL=noIPV6INIT=noMASTER=bond0SLAVE=yes

 

 

[Root @ vqiu ~] # Vi/etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE = bond0
NAME = bond0
TYPE = Ethernet
ONBOOT = yes
BOOTPROTO = static
USERCTL = no
IPV6INIT = no
IPADDR = 10.0.2.15
PREFIX = 24
GATEWAY = 10.0.2.2
DNS1 = 8.8.8.8
DNS1 = 8.8.4.4


3. restart the system
View the traffic of each network card
[Root @ vqiu ~] #Netstat-I | grep-v 'Lo'
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR Flg
Bond0 1500 0 3301 0 0 3278 0 0 0 BMmRU
Eth0 1500 0 2248 0 0 2192 0 0 0 0 BMsRU
Eth1 1500 0 1053 0 0 1086 0 0 0 0 BMsU

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.