Linux Dual NIC Bindings

Source: Internet
Author: User

Linux dual NIC bindings Linux dual NIC Bindings
Common modes for dual NIC bindings:
Mode1:active-backup mode, which is the main standby mode.
Mode0:round-broin mode, load Balancing mode (requires switch configuration aggregation port Cisco called Port Channel)
Steps:
1. Create the BOND0 boot profile:
2: Edit NIC configuration file Ifcfg-eth0,ifcfg-eth1
2.1: Configure NIC One
2.2: Configure NIC Two
3: Create and configure the modprobe.conf file
4: Set Boot boot
5: View and test
5.1: View bond0 information (/PROC/NET/BONDING/BONG0 will show which network card is responsible for the task)
5.2: Test the common mode of dual NIC binding: Mode1:active-backup mode, which is the main standby mode.

Implementation method:
1. Edit Create ifcfg-bond0 nic file
2. Modify Ifcfg-eth0 ifcffg-eth1
3. Create and edit/etc/modprobe.conf
4. Write/etc/rc.d/rc.local
5. Testing

Mode0:round-broin mode, load Balancing mode (requires switch configuration aggregation port Cisco called Port Channel)

Implementation method:
With master and Standby mode, only need to modify mode=1 to mode =0

Step: 1. Create a BOND0 boot profile:

cd/etc/sysconfig/network-scripts/
VI ifcfg-bond0

    1. Device=bond0
    2. Onboot=yes
    3. Bootproto=static
    4. ipaddr=192.168.2.66
    5. netmask=255.255.255.0
    6. #GEATWAY =192.168.2.1
    7. #DNS1 =192.168.2.1
    8. Userctl=no
2: Edit NIC profile ifcfg-eth0,ifcfg-eth12.1: Configure NIC One

VI Ifcfg-eth0

    1. Device=eth0
    2. Userctl=no
    3. Onboot=yes
    4. Master=bond0
    5. Slave=yes
    6. Bootproto=none
2.2: Configure NIC Two

VI ifcfg-eth1

    1. Device=eth1
    2. Userctl=no
    3. Onboot=yes
    4. Master=bond0
    5. Slave=yes
    6. Bootproto=none

Note: The two lines of master=bond0 and Slave=yes are primarily used for system service network Restart after they are automatically enabled

3: Create and configure the modprobe.conf file

Vi/etc/modprobe.conf

    1. Alias Bond0 Bonding
    2. Options Bond0 miimon=100 mode=1

Note:

<1>:millmon represents the link monitoring time interval, the unit is ms,millmon=100 for each 100ms monitoring link connection status, if one does not pass, it will be transferred to another. This value is suggested to be 100, and setting to another value can cause instability

<2>:mode indicates the operation of the two net cards, and 0 means that the load blance,1 represents the hot spare.

4: Set Boot boot
    1. echo "Ifenslave bond0 eth0 eth1" >>/etc/rc.d/rc.local xxxxxxxxxx

After the configuration is complete, restart the network service or restart the server, as follows

    1. Service network restart or # init 6
5: View and Test 5.1: View bond0 information (/PROC/NET/BONDING/BONG0 will show which network card is responsible for the task)
    1. Cat/proc/net/bonding/bond0
5.2: Test

Always ping this IP, and then Plug and unplug the server's two network cable to see if the packet can be lost.

Original: http://www.centoscn.cn/2232.html

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.