Centos 6.5 64-bit dual-NIC binding

Source: Internet
Author: User

1. Environmental description
My VMware Workstation 10 installs CentOS 6.5 64-bit plus dual-port Intel Gigabit NICs, and sees Eth2 and eth3 two net cards via the Ifconfig-a|grep ETH command.


2. Double NIC binding step:

2.1 Modify the/etc/sysconfig/network-scripts/ifcfg-eth2 configuration document with the following modified content:
Device=eth2
Onboot=yes #系统启动时自动启用该设备
Bootproto=none #启动时不使用任何协议

Master=bond0

Slave=yes

2.2 Modify the/etc/sysconfig/network-scripts/ifcfg-eth3 configuration document with the following modified content:
Device=eth3
Onboot=yes #系统启动时自动启用该设备
Bootproto=none #启动时不使用任何协议

Master=bond0

Slave=yes

2.3 Create a binding network port configuration document/ETC/SYSCONFIG/NETWORK-SCRIPTS/IFCFG-BOND0, which reads as follows:
Device=bond0 #虚拟网卡名称
Bootproto=static
ipaddr=192.168.88.11 #IP地址
netmask=255.255.255.0 #子网掩码
gateway=192.168.88.1 #网关
boradcast=192.168.88.255 #广播地址

dns1=8.8.8.8

dns2=222.88.88.88
Onboot=yes
Type=ethernet

2.4 Modify/etc/modprobe.d/dist.conf, configure the binding model, and finally add the following to the configuration file:
Alias Bond0 Bonding
Options Bond0 miimon=100 mode=0
#选项 Millmon is the specified interval for how long the link is monitored, in Ms.
#选项 mode is the operating mode of the binding port, there are 0-7 total 7 modes, commonly used in 0 and 1 mode, mode=0 means "round-robin" strategy, two cards work simultaneously in load balancing state. The mode=1 represents the "active-backup" policy, and the backup status of the two cards is one with one standby.

2.5 modifies the/etc/rc.local, which is responsible for binding the virtual network card and two physical network card when the system starts up, adding the following content:
Ifenslave bond0 eth2 Eth3

3. Restart the network card to make the operation effective

Service Network restart

Note: The NetworkManager service is turned off and set to on without booting to prevent interference-related actions

Service NetworkManager Stop

Chkconfig NetworkManager off

4. Test results

After any piece of network card is Ifdown, it does not affect the normal communication of the server

Centos 6.5 64-bit dual-NIC binding

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.