Configure the dual-Nic bond in Centos6.4

Source: Internet
Author: User
1. the environment describes the virtual machine created in esxi5.5, the system is Centos6.4, the original only one network card, the name is ifcfg-eth0. To achieve network redundancy, log on to VMwarevSphereClient and add a network adapter named ifcfg-eth1 to the virtual machine. 2. dual Nic binding steps: 1. environment description

 

The virtual machine created in esxi5.5, the system is Centos6.4, originally only one Nic, named ifcfg-eth0. To achieve network redundancy, login to VMware vSphere Client to the virtual machine added a Nic, Nic name ifcfg-eth1.

 

2. dual Nic binding steps:

 

  • 2.1 modify the/etc/sysconfig/network-scripts/ifcfg-eth0 configuration document, the modified content is as follows:

DEVICE = eth0

HWADDR = 78: 2B: CB: 30: 66: 29 # Nic MAC address, which can be removed

TYPE = Ethernet # Remove

ONBOOT = yes # enable the device automatically when the system starts

SLAVE = yes

MASTER = bond0

BOOTPROTO = none # No protocol is used at startup

  • 2.2 modify the/etc/sysconfig/network-scripts/ifcfg-eth1 configuration document, the modified content is as follows:

DEVICE = eth2

HWADDR = 78: 2B: CB: 30: 66: 2B # Nic MAC address, which can be removed

TYPE = Ethernet # TYPE, which can be removed

ONBOOT = yes # enable the device automatically when the system starts

SLAVE = yes

MASTER = bond0

BOOTPROTO = none # No protocol is used at startup

  • 2.3 Create a configuration document/etc/sysconfig/network-scripts/ifcfg-bond0 bound to the NIC, the content is as follows:

 

DEVICE = bond0

TYPE = Ethernet

ONBOOT = yes

BONDING_OPTS = "miimon = 100 mode = 0"

# Mode = 0 indicates the "round-robin" policy, indicating the server load balancer mode. both NICs work.

# Mode = 1 indicates the "active-backup" policy, indicating the redundancy mode. only one network adapter is working. if a problem occurs, the other network adapter is enabled.

# You can also add the following two lines at the end of the/etc/modprobe. d/dist. conf file

# Alias bond0 bonding

# Options bond0 miimon = 100 mode = 1

BOOTPROTO = static

IPADDR = 10.240.210.233

NETMASK = 255.255.255.0

DNS1 = 8.8.8.8

  • 2.4 The modification is/etc/rc. local, which is responsible for binding the virtual network card and two physical network cards at system startup.

Ifenslave bond0 eth2 eth3

 

3. restart the NIC to make the operation take effect.

 

Service network restart

 

4. test results

 

When any network adapter is disabled, normal communication on the server is not affected.

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.