Linux bond network configuration

Source: Internet
Author: User

Linux bond network configuration when the linux system has multiple independent NICs, and want to make full use of these NICs, at the same time provide a unified network address, so as to increase the network throughput, at the same time, it also improves network availability. bond is needed to help us solve this problem. In linux, bond feels like bound and bind. Literally, it can be seen that bond is used to aggregate multiple things and combine them into a uniform one. The configuration of bond is very simple, but the configuration is not good, it is easy to cause serious network problems. The bonding function comes with the Linux kernel. Therefore, you do not need to install it. You only need to load the bonding module into the kernel. Follow these steps to configure the bond NIC. The configuration requirement is that there are two NICs eth0 and etho1, and they are joined together to generate a new bond0. 1. Configure the ifcfg-bond0 to generate a file ifcfg-bond0 under the/etc/sysconfig/network-scripts directory, the configuration is as follows: bond code DEVICE = "bond0" USERCTL = no ONBOOT = "yes" BOOTPROTO = none NETWORK = 192.168.198.0 NETMASK = 255.255.255.0 GATEWAY = 192.168.198.254 IPADDR = 192.168.198.44 mask = "miimon = 100 mode = 6 primary = eth0 "the last line of BONDING_OPTS is the option of the bonding function, these optional parameters can be configured in this step or in step 3. For more information about the parameters, see document 2. 2. Configure the ifcfg-eth0 and ifcfg-eth1 to modify the ifcfg-eth0 and ifcfg-eth1 files under the directory, configure as follows: ifcfg-eth0: conf code DEVICE = "eth0" USERCTL = no ONBOOT = "yes" MASTER = bond0 SLAVE = yes BOOTPROTO = none ifcfg-eth1: conf code DEVICE = "eth1" USERCTL = no ONBOOT = "yes" MASTER = bond0 SLAVE = yes bootproto = none 3. Start the bonding service in/etc/modprobe. d/create a NEW bonding under the directory. conf file, configured as follows: Shell code alias bond0 bonding this file can be configured with multiple lines of bonding, you can also configure some optional parameters, the configuration of optional parameters is as follows: options bond0 mode = ba Lance-alb miimon = 100 and then load the bond module to the Linux kernel. Run the following command: Shell code modprobe bonding service network restart. After the network service is restarted successfully, the bond configuration takes effect, port bond0 has been configured. You can view the status information of port bond0 in cat/proc/net/bonding/bond0. If you configure bond1 on another machine, the configuration steps are the same. When the restart of the service network restart fails, you must first check whether the configuration is correct. If yes, you must first disable the NetworkManager service before restarting the network, that is, run the/etc/init. d/NetworkManager stop command.

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.