Settings for Linux under bonding

Source: Internet
Author: User

Settings for Linux under bonding

Bonding Introduction

The Linux bonding driver provides a bundle of multiple network interface devices into a single network interface setting for Network Load Balancing and network redundancy.

1. Network Load Balancing

For bonding Network Load Balancing is we commonly used in the file server, such as the three network card, as a piece to use, to solve an IP address, traffic is too large, the server network pressure is too large problem. For file servers, such as NFS or samba file servers, none of the administrators can address the network load by making many IP addresses for the intranet's file servers. If in the intranet, the file server for management and application convenience, mostly with the same IP address. For a hundred m local network, the network pressure is great, especially for Samaba and NFS servers, in cases where the file server is used by multiple users at the same time. In order to solve the same IP address, break the limit of traffic, after all, network cable and network card to the data throughput is limited. The best way to achieve Network Load Balancing in the case of limited resources is to bonding

2. Network redundancy

For the server, network equipment Stability is also more important, especially the network card. In a production-type system, the reliability of the NIC is even more important. In a production-type system, most of the redundancy of the hardware equipment provides the reliability and security of the server, such as power supply. The bonding also provides redundant support for network cards. To bind multiple network cards to an IP address, when a network card has physical damage, another network card automatically enabled, and provide the normal service, namely: By default, only one network card work, other network cards do backup


Instance


#  The first step #  check whether the kernel has supported the bonding#  display as follows, the default kernel is installed after the bonding module has been supported [[email protected] ~]#  modprobe -l bond* kernel/drivers/net/bonding/bonding.ko[[email protected] ~]#  modinfo bonding    filename:       /lib/modules/ 2.6.32-573.el6.x86_64/kernel/drivers/net/bonding/bonding.koauthor:          Thomas Davis, [email protected] and many othersdescription:     Ethernet Channel Bonding Driver, v3.7.1version:         3.7.1license:        GPLalias:           rtnl-link-bondsrcversion:      4e0ae4bd567d42dfb061c63depends:        vermagic:        2.6.32-573.el6.x86_64 smp mod_unload modversions parm:            max_bonds:Max number of bonded devices  (int) parm:            tx_queues:max number of transmit queues   (DEFAULT = 16)   (int) ......#  Check that there are no load-balanced execution files (load Balancing tool, bonding) under Linux, execute the following command [email  protected] ~]# which ifenslave/sbin/ifenslave[[email protected] ~]# #   Second Step #  create bonding drive Device profile [[email protected] ~]# cd /etc/sysconfig/network-scripts/ [[email protected] network-scripts]# cp ifcfg-eth0 ifcfg-bond0[[email protected]  network-scripts]# vi ifcfg-bond0  Modify the following device=bond0type=ethernetonboot=yesuserctl=no             #表明该设备只能由root用戶來控制BOOTPROTO =staticipaddr= 192.168.41.129netmask=255.255.255.0broadcast=192.168.41.255gateway=192.168.41.2network=192.168.41.0#  modifying the NIC eth0 eth1  profile [[Email  protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 modified as follows: DEVICE=eth0ONBOOT= yesbootproto=nonemaster=bond0slave=yesuserctl=no[[email protected] ~]# cd /etc/sysconfig/ Network-scripts/[[email protected] network-scripts]# cp ifcfg-eth0 ifcfg-eth1[[email  protected] network-scripts]# vi ifcfg-eth1  change device=eth0  to Device=eth1 to #  Step three #  Edit the/etc/modprobe.d/bonding.conf file [[email protected] network-scripts]# vi /etc/ modprobe.d/bonding.conf    is added as follows: alias bond0 bondingoptions bond0 miimon=80  mode=0#  Join/etc/rc.d/rc.local  Startup Item [[email protected] network-scripts]# echo  "Ifenslave bond0 eth0 eth1"  >> /etc/rc.d/rc.local [[email protected]  network-scripts]# #  finally restart the network card will be able to 


This article is from the "adhere to the Heart" blog, please be sure to keep this source http://lbmain.blog.51cto.com/6531182/1955138

Settings for Linux under bonding

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.