Linux NIC binding mode

Source: Internet
Author: User
Tags switches

The Linux bonding driver provides 7 modes, namely: BALANCE-RR, Active-backup, Balance-xor, broadcast, 802.3AD, Balance-tlb, Balance-alb.

BALANCE-RR or 0: Polling mode, which provides load balancing and fault tolerance. Two network ports in this mode are working

Active-backup or 1: Primary and Standby switching mode, provides redundancy, the mode only one network port work, the other to do backup.

Balance-xor or 2: Based on the hash algorithm load Balancing mode, the network card shunt in accordance with the Xmit_hash_policy TCP protocol layer settings for hash calculation shunt, so that the various processing sources of access are as far as possible on the same network card processing.

Broadcast or 3: Broadcast mode, all the bundled NICs will get the same data, generally for very special network requirements.

802.3ad or 4:802.3AD mode, requires the switch also supports 802.3AD mode, theoretically the server and switch support this mode, the network card bandwidth can be doubled (such as from 1Gbps to 2Gbps).

Balance-tlb or 5: The adapter output load Balancing mode, the output of the data will pass through all the bundled network card output, only one of the network card is selected when receiving data. If the NIC that is being used to receive data fails, it is taken over by other network cards, and the network card and the NIC driver are required to get speed information through the Ethtool command.

Balance-alb or 6: Adapter input/Output load Balancing mode, on the basis of "mode 5", while receiving data load balancing, in addition to require the Ethtool command to get speed information, but also require support for the network card MAC address dynamic modification function.

Where the Active-backup, balance-tlb, and BALANCE-ALB modes do not require any configuration of the switch.

802.3ad mode requires that the switch has a corresponding port configured for 802.3AD aggregation, the specific configuration method varies by switch type, for example, the Cisco 3550 series switches require that the corresponding ports must first be grouped in a separate EtherChannel instance, Then this etherchannel is set to "LACP" mode enabled 802.3AD (supersedes the standard EtherChannel).

The BALANCE-RR, Balance-xor, and broadcast modes typically require the ports of the switch to be grouped together, and different switches have different names for the groupings, which may be called "EtherChannel" (for example, the Cisco example above), or " Trunk group ", or other similar commands. For these modes, each switch will also have its own configuration options for the transport policy to bond. Typical choices include XOR operations on each MAC address or IP address, and transmission policies on both ends are not necessarily identical. For these three modes, the bonding mode selects a transport policy for a EtherChannel group, and all three modes interoperate with another EtherChannel group.

There are 0-6 seven modes in the value of mode, commonly used for 0,1,6 three kinds. Mode=0: Balanced load mode with automatic redundancy, but requires "Switch" support and settings. Mode=1: Automatic redundancy mode, where one line is disconnected, other lines will be automatically redundant. MODE=6: Balanced load mode, automatic redundancy, no "Switch" support and settings required.

  

Configuration Example Information:

[Email protected] network-scripts]# more ifcfg-bond0 type=bondbonding_master=yesbootproto=staticdefroute= yespeerdns=yespeerroutes=yesipv4_failure_fatal=noipv6init=yesipv6_autoconf=yesipv6_defroute=yesipv6_peerdns= yesipv6_peerroutes=yesipv6_failure_fatal=noname=bond0device=bond0onboot=yesipaddr=192.100.100.178netmask= 255.255.255.0gateway=192.100.100.1bonding_opts= "Mode=0 miimon=100" # #应修改为mode 6, do not rely on switch # #BONDING_OPTS = "mode=6 miimon=100" [[email protected] network-scripts]# more ifcfg-em2device=em2hwaddr=f8:bc:12:48:8b:bdtype=ethernetuuid= 344d668d-1a2d-424f-9e9b-699e259e94d1onboot=nonm_controlled=yesmaster=bond0slave=yes[[email protected] network-scripts]# more ifcfg-em3device=em3hwaddr=f8:bc:12:48:8b:betype=ethernetuuid= Cabae77c-a50d-47d5-be42-f113ee361f84onboot=nonm_controlled=yesmaster=bond0slave=yes[[email protected] network-scripts]# ifconfigbond0 Link encap:ethernet HWaddr f8:bc:12:48:8b:bd inet addr:192.100.100.178 BC  ast:192.100.100.255 mask:255.255.255.0 inet6 addr:fe80::fabc:12ff:fe48:8bbd/64 scope:link up BROADCAST RUNNING MASTER multicast mtu:1500 metric:1 RX packets:1179700 errors:0 dropped:0 overruns:0 frame:0 T           X packets:195915 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0            RX bytes:1661568472 (1.5 GiB) TX bytes:14695260 (14.0 MiB) em2 Link encap:ethernet HWaddr f8:bc:12:48:8b:bdUp broadcast RUNNING SLAVE multicast mtu:1500 metric:1 RX packets:597660 errors:0 dropped:0 overruns:0 frame:0 TX packets:97959 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes : 842373157 (803.3 MiB) TX bytes:7355398 (7.0 MiB) interrupt:38 em3 Link encap:ethernet HWaddr f8:bc:12:48 : 8B:BD up broadcast RUNNING SLAVE multicast mtu:1500 metric:1 RX packets:582040 errors:0 dropped:0 o          verruns:0 frame:0 TX packets:97956 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:81919531  5 (781.2 MiB) TX bytes:7339862 (6.9 MiB) interrupt:34

  

Linux NIC binding mode

Related Article

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.