Linux Dual NIC Bindings

Source: Internet
Author: User

First, we need to open the kernel to bonding support.
Set the kernel "Make Menuconfig/xconfig/config" and select "Bonding driver Support" in the "Network Device" section, it is recommended to set the driver as a module, This will enable passing parameters to the driver and setting up multiple bonding devices.
Build and install the new kernel and module.
Settings for Bonding
We need to add two lines to the/etc/modules.conf so that we can automatically load the bonding driver when the bond setting is set up and the system starts
Alias Bond0 Bonding
Options Bond0 miimon=100 mode=1
When Mode=1 is the primary standby mode, mode=0 is the load balancing mode.
Also, in the/etc/sysconfig/network-scripts directory, create a file named Ifcfg-bond0.
Device=bond0
ipaddr=192.168.1.1
netmask=255.255.255.0
network=192.168.1.0
broadcast=192.168.1.255
Onboot=yes
Bootproto=none
Userctl=no
In the script for all network adapters in bond, there is a definition of SLAVE and MASTER. For example, if you want eth0 and eth1 to be members of BOND0, their corresponding configuration files (Ifcfg-eth0 and ifcfg-eth1) will be changed in the following context:
Device=eth0
Userctl=no
Onboot=yes
Master=bond0
Slave=yes
Bootproto=none
In the script file ifcfg-eth1, replace the eth0 with eth1, and also add the IP address information as needed. If you need to set up an additional bonding device (for example, BOND1), change the master=bond0 to Bond1 so that the network adapter becomes a secondary device of BOND1.
Make Bond effective
Restart the network subsystem with the command "/etc/rc.d/init.d/network restart", or you can restart the system for BOND0 to take effect.
In this way, Bond's setup is basically over, if you want to know more detailed information, you can refer to "/usr/src/linux-2.4/documentation/networking/bonding.txt"

Linux Dual 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.