The practice of Centos6.6-based R720 server four port aggregation

Source: Internet
Author: User

Server multi-port aggregation, the main purpose is to network card disaster recovery and increase the bandwidth. Linux port bindings, available in 7 modes, are as follows:

There are 0-6 and 7 modes in mode, please refer to the official manual for details!
The value of mode indicates the mode of operation, he has a total of 0,1,2,3,4,5,6 these 7 modes, commonly used for 0, 12 kinds.
The mode=0 indicates that load balancing (round-robin) is balanced, and both NICs work.
Mode=1 indicates that fault-tolerance (active-backup) provides redundancy, working in a way that the primary and standby means that only one NIC works by default, and the other is backed up.
The mode=2 represents Balance-x, which provides load balancing and redundancy capabilities.
Mode=3 represents broadcast, a mode that provides fault tolerance.
The mode=4 represents 802.3AD, provides a quick Ethtool, and uses 802.3AD mode.
Mode=5 represents balance-tlb, automatically adapts to load balancing, and automatically switches faults. On this basis Ethtool support driver.
Mode=6 indicates that the broadcast information of ARP is optimized based on the 5 mode.

The following main mode=4 802.3ad mode configuration, 02.3AD support requires both the server and the switch support, configuration is also required at both ends.

The IEEE 802.3AD concept is the standard method for performing link aggregation. Conceptually, aggregating multiple Ethernet adapters into separate virtual adapters has the same functionality as "Ethernet channel (EtherChannel)", providing higher bandwidth to prevent failures. For example, ent0 and Ent1 can aggregate to an IEEE 802.3AD link aggregation called Ent3, and then configure the interface en3 with an IP address. These clustered adapters are considered by the system as an adapter. Therefore, you can configure their IP as if they were on any Ethernet adapter.

Linux server configuration, server configuration needs to configure two places, one is the network card configuration, one is the binding module configuration

#add ifcfg-bond0 files to the/etc/sysconfig/network-script/directory #ifcfg-bond0bootproto=Nonedevice=Bond0onboot=yesipaddr=192.168.1.61NETMASK=255.255.255.0GATEWAY=192.168.1.1Userctl=NoTYPE=EthernetDNS1=192.168.1.1#Modify the configuration of the physical NICDevice=Em1type=Ethernetonboot=yesnm_controlled=Yesbootproto=none#The main is to add the following linesMaster=Bond0slave=Yesuserctl=No#Enter/etc/modprobe.d/Modify dist.conf config file # at the end of the file, Miimon for check time, mode for port bindingalias bond0 bondingoptions bond0 Miimon= -Mode=4

Switch configuration requires the switch to support 802.3AD, the first step is to create a eth-trunk port, and then promote the port to LACD, this example is used in the Huawei s5352 model switch

#Create a Eth-trunk port[Huawei]intEth-trunk1            #Create Eth-trunk[HUAWEI-ETH-TRUNK1]intg0/0/Ten[Huawei-gigabitethernet0/0/Ten]eth-trunk1  #Add 10 ports to Eth-trunk[Huawei]vlan2[Huawei-VLAN2]intEth-trunk1[Huawei-eth-trunk1]port Default VLAN2   #adding Eth-trunk to VLAN 2[huawei-eth-Trunk1]dis vlanvid Type Ports--------------------------------------------------------------------------------1Common ut:ge0/0/1(D) ge0/0/2(D) ge0/0/3(D) ge0/0/4(D) GE0/0/5(D) ge0/0/6(D) ge0/0/7(D) ge0/0/8(D) GE0/0/9(D) ge0/0/ One(U) ge0/0/ A(U) ge0/0/ -(U) GE0/0/ -(D) ge0/0/ the(D) ge0/0/ -(D) ge0/0/ -(D) GE0/0/ -(D) ge0/0/ +(D) ge0/0/ -(D) ge0/0/ +(D) GE0/0/ A(D) ge0/0/ at(D) ge0/0/ -(D)2Common ut:eth-Trunk1 (U) VID Status Property MAC-LRN Statistics Description--------------------------------------------------------------------------------1Enable default enable Disable VLAN0001                         2Enable default enable Disable VLAN0002  

Key steps to convert the Eth-trunk mode to LACP

[Huawei-eth-trunk1]mode lacp-Static[quidway]dis ETH-trunk1Eth-trunk1's state information Is:Local:LAG id:1 WORKINGMODE:LACP Preempt Delay:                         Disabled Hash arithmetic:according to Sa-xor-da system priority:32768 system id:5439-df15-6110          Least active-linknumber:1 Max active-linknumber:8 Operate status:up Number of up Port in Trunk:4---------------------------------------------------------------------  -----------actorportname Status PortType portpri portno portkey portstate weightgigabitethernet0/0/21 Selected  1GE 32768 1 305 10111100 1 GIGABITETHERNET0/0/22 Selected 1GE 32768 2 305 10111100       1 gigabitethernet0/0/23 Selected 1GE 32768 3 305 10111100 1 gigabitethernet0/0/24 Selected 1GE 32768 4 305 10111100 1 Partner:--------------------------------------------------------------------- -----------Actorportname          Syspri systemid portpri portno portkey portstategigabitethernet0/0/21 65535 f8bc-1250-6e74 255 2 10111100GIGABITETHERNET0/0/22 65535 f8bc-1250-6e74 255 4 10111100gigabitethernet0/0/      65535 f8bc-1250-6e74 255 3 10111100gigabitethernet0/0/24 65535 f8bc-1250-6e74 255 1 17 10111100

After Setup is complete, restart the server and save the switch configuration.

After the reboot is complete, review the binding configuration

[had@Slave1~]$ cat/proc/net/bonding/bond0ethernet Channel Bonding Driver: V3.6.0(September -, the) Bonding Mode: IEEE802.3AD DynamicLinkaggregationtransmit Hash Policy: Layer2 (0) MII Status:upmii Polling Interval (ms): -Up Delay (ms):0Down Delay (ms):0802.3ad INFOLACP Rate:slowaggregator Selection Policy (ad_select):stableactive aggregator Info:Aggregator ID:2Number of ports:4       #This place is critical, if you have a couple of ports, you need to be realistic, otherwise you won't succeed.Actor Key: -Partner Key:305Partner Mac Address: Wu: the:d F: the: A:Xxslave Interface:em1mii Status:Upspeed: +Mbpsduplex: FullLinkFailure Count:0Permanent HW Addr: F8:BC: A: -: 6e:Xxaggregator ID:2Slave Queue ID:0Slave Interface:em2mii Status:Upspeed: +Mbpsduplex: FullLinkFailure Count:0Permanent HW Addr: F8:BC: A: -: 6e:Xxaggregator ID:2Slave Queue ID:0Slave Interface:em3mii Status:Upspeed: +Mbpsduplex: FullLinkFailure Count:0Permanent HW Addr: F8:BC: A: -: 6e:Xxaggregator ID:2Slave Queue ID:0Slave Interface:em4mii Status:Upspeed: +Mbpsduplex: FullLinkFailure Count:0Permanent HW Addr: F8:BC: A: -: 6e:Xxaggregator ID:2Slave Queue ID:0

The practice of Centos6.6-based R720 server four port aggregation

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.