Linux under multiple NIC bindings

Source: Internet
Author: User

Assuming that Eth0,eth1,eth2,eth3 is bound to bond0, the steps are as follows:

(1) #vi/etc/modprobe.conf, add the following 2 lines: Alias bond0 bonding options Bonding miimon=100 MoD E=4

When mode=0, the corresponding port of the switch does not need trunk, but the Ping Gateway (192.*.*.*) from the node has a large delay. The solution to this problem is to change mode to 4, while configuring the switch corresponding port to turn on link aggregation and bundle as trunk.

In the modprobe.conf file,

The Miimon parameter is used to monitor the physical connection of the NIC and is recommended at least 100

The mode parameter is used to set the binding mode

0 Load balancing (Round robin strategy)

1 active/backup mode, only one NIC is used at the same time.

2 Load Balancing (XOR algorithm)

3 Broadcast Mode

4 802.3AD mode, LAGP protocol, double the bandwidth.

mode cannot be written wrong

Here is prone to unstable situation, most of the mode is wrong to choose, so in the implementation of the need to be careful, the mode is determined, and then in the hands.

(2) Modify the/etc/sysconfig/network-scripts/directory ifcfg-bond0, Ifcfg-eth0, Ifcfg-eth1,ifcfg-eth2,ifcfg-eth3. The specific contents are as follows:

[Email protected] network-scripts]# Pwd/etc/sysconfig/network-scripts[[email protected] network-scripts]# cat ifcfg-bond0device=bond0bootprote=staticonboot=yesipaddr=192.*.*.*netmask=255.255.255.0usertcl=nogateway=192.*. *.*
[email protected] network-scripts]# cat ifcfg-eth0device=eth0bootproto=noneonboot=yestype=ethernetusertcl= Nomaster=bond0slave=yes
[email protected] network-scripts]# cat ifcfg-eth1device=eth1bootproto=noneonboot=yestype=ethernetusertcl= Nomaster=bond0slave=yes
[email protected] network-scripts]# cat ifcfg-eth2device=eth2bootproto=noneonboot=yestype=ethernetusertcl= Nomaster=bond0slave=yes
[email protected] network-scripts]# cat ifcfg-eth3device=eth3bootproto=noneonboot=yestype=ethernetusertcl= Nomaster=bond0slave=yes

(3) View the status of Bond0

[[Email protected] ~]# more /proc/net/bonding/bond0ethernet channel bonding  Driver: v2.6.3-rh  (june 8, 2005) bonding mode: ieee 802.3ad  dynamic link aggregationmii status: upmii polling interval  (ms):  100Up  Delay  (ms): 0down delay  (ms):  0802.3ad infolacp rate: slowactive  Aggregator Info:        Aggregator ID: 1         Number of ports: 4         actor key: 17        partner key:  480        partner mac address: 00:12:f2:cd : 68:00slave interface: eth0mii status: uplink failure count: 0permanent  hw addr: 00:1e:0b:73:56:26Aggregator id: 1slave interface: eth1mii status: uplink failure count:  0permanent hw addr: 00:1e:0b:73:56:a2aggregator id: 1slave interface:  eth2mii status: uplink failure count: 0permanent hw addr: 00:1e : 0b:d5:34:d2aggregator id: 1slave interface: eth3mii status: uplink failure  count: 0permanent hw addr: 00:1e:0b:d5:34:d0aggregator id: 1

The trunk is then done on the switch (where the switch is foundry)

The use of bundling multiple network cards of the same server into a single logical line, increasing the bandwidth between the server and the switch, and being able to load balance traffic on multiple network cards, and redundancy between multiple network cards when one of the NICs is bad, the other NIC will split the traffic on the NIC. Does not affect data forwarding between the server and the switch. Note If the switch is configured as trunk then the server segment should also be configured with the appropriate trunk to be used correctly

  [email protected]_SX_1600#show trunk Configured trunks:Trunk ID:  897hw trunk id: 6ports_configured: 4primary port monitored: jointlyports          15/1    15/2     15/3    15/4    port names    none     none    none    none    port_ status   enable  enable  enable  enable  monitor        off     off     off      off     Rx Mirr Port  N/A      N/A     N/A     N/A      tx mirr port  n/a     n/a     n/a      n/a     monitor dir   n/a     n/a      n/a     n/a     trunk id:  901Hw Trunk ID: 11Ports_Configured: 4Primary Port Monitored:  jointlyports         15/5    15/6     15/7    15/8    Port Names     none    none    none    none     Port_Status   enable  enable  enable  enable                        monitor       off     off     off      off     Rx Mirr Port  N/A      N/A     N/A     N/A      tx mirr port  n/a     n/a     n/a      N/A     Monitor Dir   N/A      n/a     n/a     n/a

View the red callout information as above port status is enable this group of trunks includes 15/5 15/6 15/7 15/8 These 4 ports this group of trunks has been in effect


The trunk is then done on the switch (where the switch is foundry)

The use of bundling multiple network cards of the same server into a single logical line, increasing the bandwidth between the server and the switch, and being able to load balance traffic on multiple network cards, and redundancy between multiple network cards when one of the NICs is bad, the other NIC will split the traffic on the NIC. Does not affect data forwarding between the server and the switch. Note If the switch is configured as trunk then the server segment should also be configured with the appropriate trunk to be used correctly

  [email protected]_sx_1600#show trunkconfigured trunks:trunk id: 897hw  Trunk ID: 6Ports_Configured: 4Primary Port Monitored: JointlyPorts          15/1    15/2    15/3     15/4   Port Names    none     none    none    none   Port_Status    enable  enable  enable  enable Monitor        off     off     off      off    Rx Mirr Port  N/A     N/A      n/a     n/a    tx mirr port   n/a   &nBsp; n/a     n/a     n/a    monitor  Dir   N/A     N/A     N/A      n/a    trunk id: 901hw trunk id: 11ports_ configured: 4primary port monitored: jointlyports          15/5    15/6    15/7    15/8    Port Names    none    none     none    none   port_status   enable  enable   enable  enable                      monitor       off      off&nbsP;    off     off    rx mirr port   N/A     N/A     N/A      N/A    Tx Mirr Port  N/A     N/A      N/A     N/A    Monitor Dir    N/A     N/A     N/A      n/a


View the red callout information as above port status is enable this group of trunks includes 15/5 15/6 15/7 15/8 These 4 ports this group of trunks has been in effect

In the modprobe.conf file,

The Miimon parameter is used to monitor the physical connection of the NIC and is recommended at least 100

The mode parameter is used to set the binding mode

0 Load balancing (Round robin strategy)

1 active/backup mode, only one NIC is used at the same time.

2 Load Balancing (XOR algorithm)

3 Broadcast Mode

4 802.3AD mode, LAGP protocol, double the bandwidth.

mode cannot be written wrong


This article from "11726068" blog, declined reprint!

Linux under multiple NIC bindings

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.