Linux dual NIC bindings and unbind dual NIC methods __linux

Source: Internet
Author: User

centos6.x Configure NIC Bindings


(mainly understand three kinds of modes: mode=0,1,6.)

Stop NetworkManager first.
Service NetworkManager Stop
Chkconfig NetworkManager off//power-on self-boot shutdown


In the/etc/sysconfig/network-scripts/directory to establish ifcfg-bond0 files, the contents of the document are as follows:
Device=bond0
Userctl=no
Bootproto=none
Onboot=yes
ipaddr=192.168.100.17//IP you have set
netmask=255.255.255.0
gateway=192.168.100.1
Type=unknown//or Ethernet (if NetworkManager is not closed, use UnKnown)
bonding_opts= "miimon=80 mode=0"//This step can also be filled in below/etc/modprobe.d/bonidng.conf


Binding mode is 0, which is the Rond-robin mode.
Then modify the Ifcfg-eth0 file separately, as follows:
Device= "Eth0"
onboot= "Yes"
Bootproto=none
Master=bond0
Slave=yes
Userctl=no
In the Ifcfg-eth1 file modified as follows:
Device= "Eth1"
onboot= "Yes"
Bootproto=none
Master=bond0
Slave=yes
Userctl=no

In the/etc/modprobe.d/directory to establish bonding.conf files, the contents of the document are as follows:
Alias Bond0 Bonding

---If the previous bond0 configuration is not filled bonding_opts, here is another line: Options bond0 miimon=100 mode=0


Perform modprobe bonding

Then restart the Network Service network restart

-------If using remote connection, please use: modprobe bonding&&service Network restart
Then you can use IFCONFIG-A to see the bundled BOND0 network card, BOND0 and Eth0,eth1 MAC address are the same.
You can cat/proc/net/bonding/bond0 this command to see the bindings

NIC Binding lifted:

Delete ifcfg-bond0, and delete/etc/modprobe.d/bonding.conf

Modify the appearance of Ifcfg-eth0 and ifcfg-eth0 before binding

Rmmod bonding (Very important)

Service Network restart



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.