To bind multiple NICs in linux, perform the following steps to bind eth0, eth1, eth2, and eth3 to bond0: (1) # vi/etc/modprobe. conf, add the following two lines: alias bond0 bonding options bonding miimon = 100 mode = 4 when mode = 0, the corresponding port of the switch does not need to be trunk, but ping the gateway (192. *. *. *) Large latency. To solve this problem, change the mode to 4 and configure the corresponding port of the switch to enable link aggregation and bind it to trunk. Www.2cto.com in modprobe. in the conf file, the miimon parameter is used to monitor the physical connection of the network adapter. We recommend that you set at least the 100mode parameter to set the binding mode 0 Server Load balancer (round robin Policy) 1 active/backup mode, only one network card is used at a time. 2 Load Balancing (xor algorithm) 3 broadcast mode 4 802.3ad mode, lagp protocol, doubled bandwidth. The mode cannot be written incorrectly. Here it is easy to see instability. Most of the reasons are that the mode is selected incorrectly. Therefore, you must be careful when implementing the mode. (2) modify the/etc/sysconfig/network-scripts/directory under the ifcfg-bond0, ifcfg-eth0, ifcfg-eth1, ifcfg-eth2, ifcfg-eth3. the details are as follows: [root @ io102 network-scripts] # pwd/etc/sysconfig/network-scripts [root @ io102 network-scripts] # cat ifcfg-bond0DEVICE = bond0BOOTPROTE = staticONBOOT = yesIPADDR = 192. *. *. * NETMASK = 255.255.255.0USERTCL = noGATEWAY = 192. *. *. * [root @ io102 network-scripts] # cat ifcfg-eth0DEVICE = eth0BOOTPROTO = noneONBOOT = yesTYPE = EthernetUSERTCL = noMASTER = bond0SLAVE = yes [root @ io102 network-scripts] # cat ifcfg-eth1DEVICE = eth1BOOTPROTO = noneONBOOT = yesTYPE = EthernetUSERTCL = noMASTER = bond0SLAVE = yes [root @ io102 network-scripts] # cat ifcfg-eth2DEVICE = Nobody = noneONBOOT = yesTYPE = EthernetUSERTCL = noMASTER = Nobody = yes [root @ io102 network-scripts] # cat ifcfg-eth3DEVICE = eth3BOOTPROTO = noneONBOOT = yesTYPE = EthernetUSERTCL = noMASTER = bond0S LAVE = yes www.2cto.com (3) view bond0 status [root @ io102 ~] # 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): 0 Down 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: 00 Slave Interface: eth0MII Status: upLink Failure Count: 0 Permanent HW addr: 00: 1e: 0b: 73: 56: 26 Aggregator ID: 1 Slave Interface: eth1MII Status: upLink Failure Count: 0 Permanent HW addr: 00: 1e: 0b: 73: 56: a2Aggregator ID: 1 Slave Interface: eth2MII Status: upLink Failure Count: 0 Permanent HW addr: 00: 1e: 0b: d5: 34: d2Aggregator ID: 1 Slave Interface: eth3MII Status: upLink Failure Count: 0 Permanent HW addr: 00: 1e: 0b: d5: 34: d0Aggregator ID: 1
Then, at the vswitch (here the vswitch is Foundry) end, the TRUNK binds multiple NICs of the same server into a logical line to improve the bandwidth between the server and the vswitch, in addition, Server Load balancer can balance the traffic on multiple NICs and the redundancy between multiple NICs. When one of the NICS breaks down, other NICS will equally split the traffic on the NICS, data Forwarding between the server and vswitch is not affected. Note: If the switch is Configured as a trunk, you must configure the trunk for the server segment to use BR-telnet @ YJY_SX_1600 # show trunk Configured trunks: Trunk ID: 897Hw Trunk ID: 6Ports_Configured: 4 Primary Port Monitored: jointly Ports 15/1 15/2 15/3 Port Names none Port_Status enable Monitor off Rx Mirr Port N/A Tx Mirr Port n/A Monitor Dir N/A Trunk ID: 901Hw Trunk ID: 11Ports_Configured: 4 Primary Port Monitored: jointlyPorts 15/5 15/6 15/7 Port Names none Port_Status enable Monitor off Rx Mirr Port N/A Tx Mirr Port N /a n/A Monitor Dir N/
View the above red information port status is enable this group of trunk including 15/5 15/6 15/7 15/8 these four ports this group of trunk has taken effect www.2cto.com and then in the switch (the switch here is Foundry) the terminal uses TRUNK to bind multiple NICs of the same server into a logical line to improve the bandwidth between the server and the switch and balance the traffic on multiple NICs, and redundancy between multiple NICs. When one of the NICS breaks down, other NICs divide the traffic on the NIC equally, without affecting data forwarding between the server and the switch. Note: If the switch is configured as a trunk, you must configure the trunk for the server segment to use BR-telnet @ YJY_SX_1600 # show trunkConfigured trunks: Trunk ID: 897Hw Trunk ID: 6Ports_Configured: 4 Primary Port Monitored: jointlyPorts 15/1 15/2 15/3 Port Names none Port_Status enable Monitor off Rx Mirr Port N/A Tx Mirr Port N /a n/A Monitor Dir N/A Trunk ID: 901Hw Trunk ID: 11Ports_Configured: 4 Primary Port Monitored: jointlyPorts 15/5 15/6 15/7 Port Names none Port_Status enable Monitor off Rx Mirr Port N/A Tx Mirr Port N /a n/A Monitor Dir N/A view the above red note port status is enable this group of trunk including 15/5 15/6 15/7 15/8 these four ports in this group of trunk has taken effect on www.2cto.com in modprobe. in the conf file, the miimon parameter is used to monitor the physical connection of the NIC. We recommend that you set it to at least 100mod. The e parameter is used to set binding mode 0 Server Load balancer (round robin Policy) 1 active/backup mode. Only one network adapter is used at a time. 2 Load Balancing (xor algorithm) 3 broadcast mode 4 802.3ad mode, lagp protocol, doubled bandwidth. Mode cannot be written incorrectly