Linux multi-port binding with Huawei 5700 Eth-trunk technology to improve network performance

Source: Internet
Author: User

In the actual environment, the server through the network port binding technology, can easily realize the network port redundancy, load balancing, so as to achieve high availability, and can improve network performance, greatly improve network I/O.

In general, Linux's multi-port bindings use the "bonding" module in the kernel, which is already included in each Linux version kernel that is currently released.

Here's a demonstration of the binding process. Bind the test server's Eth2,eth3 two NIC to a logical interface.

First step : Create the configuration file of the logical interface BOND0;

# Vim Ifcfg-bond0

Device=bond0

Bootproto=none

Onboot=yes

ipaddr=192.168.5.49

netmask=255.255.255.0

dns2=202.96.128.86

gateway=192.168.5.1

dns1=202.96.134.133

The second step: Configure the Member interface;

To add a configuration to member ports:

Master=bond0

Slave=yes

The third step : Modify the modprobe related configuration file;

# echo "Alias bond0 bonding" >>/etc/modprobe.d/bonding.conf

# echo "Options bonding miimon=100 mode=1" >>/etc/modprobe.d/bonding.conf

Fourth Step : Load the Bonding module (if you restart the system, you do not need to manually load)

# modprobe Bonding

# Lsmod | grep bonding (Verify loading results)

Bonding 128245 0

Check the status of Bond's NIC after restarting the network service:

# cat/proc/net/bonding/bond0

Ethernet Channel Bonding driver:v3.6.0 (September 26, 2009)

Bonding mode:fault-tolerance (Active-backup)

Primary Slave:none

Currently Active Slave:eth2

MII Status:up

MII Polling Interval (ms): 100

Up Delay (ms): 0

Down Delay (ms): 0

Slave Interface:eth2

MII Status:up

speed:1000 Mbps

Duplex:full

Link Failure count:0

Permanent HW Addr:e8:bd:d1:04:e0:12

Slave Queue id:0

Slave Interface:eth3

MII Status:up

speed:1000 Mbps

Duplex:full

Link Failure count:0

Permanent HW addr:e8:bd:d1:04:e0:13

Slave Queue id:0

You can see an important message above.

    1. Mode, this is the mode=*** we configured, which we configured is 1.
    2. You can see that the current active network port is eth2

After doing the above operation, the binding is basically complete.

Typically, we work with the link aggregation capabilities of the switches to improve overall network performance. Here, we are using Huawei's 5700 switch, which enables the Eth-trunk feature and is configured in LACP mode.

The switch is configured as follows:

Interface Eth-trunk5

Description test-db-bond-169

Port Link-type Access

Port default VLAN 5

Mode LACP

Load-balance Src-ip

LACP preempt Enable

Max Active-linknumber 3

Note: Configure the switch to use Yes, the bound mode needs to be set to 4 (802.3AD)

Linux multi-port binding with Huawei 5700 Eth-trunk technology to improve network performance

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.