RedHat 6.1 Nic binding

Source: Internet
Author: User


RedHat 6.1 Nic binding 1. disable the NetworlManger service. Otherwise, the service NetworlManger stopchkconfig NetworlMangeroff www.2cto.com will conflict with the bond Nic. modify/etc/sysconfig/network-scripts/ifcfg-bond0 configuration file DEVICE = bond0 BOOTPROTO = noneIPADDR = 192.168.1.11NETMASK = 255.255.25.0 ONBOOT = yes USERCTL = noBONDING_OPTS = "mode = 1 miimon = 50 "// set the running mode of the NIC, you can also set 3 in the configuration file. modify/etc/sysconfig/network-scripts/ifcfg-eth0 configuration file DEVICE = eth0 BOOTPROTO = noneONBOOT = yes MASTER = bond0 // point the NIC to bond0SLAVE = yes // enable the dual Nic USERCTL = no www.2cto.com 4. modify/etc/sysconfig/network-scripts/ifcfg-eth1 configuration file DEVICE = eth1 BOOTPROTO = noneONBOOT = yes MASTER = bond0 // point the NIC to bond0SLAVE = yes // enable dual Nic USERCTL = no 5. modify the kernel file/etc/modprobe. d/dist. in the conf file, add alias bond0 bondingoptions bond0 mode = 1 miimon = 50 // if it is set above, do not set 6.5: Modify/etc/rc. local, add the following content: ifenslave bond0 eth0 eth1 // This can also be set, it will take effect after restart, this is also added in RHEL6 7. system The system must be restarted to take effect. At this time, only the bond0 Nic has an ip address, and the eth0 and eth1 NICs should have no ip address. You can check the running status of the NIC at www.2cto.com, run cat/proc/net/boning/bond0 to check that the NIC has taken effect. (1) edit the virtual network interface configuration file (bond0 ), and specify the NIC Restart I/etc/sysconfig/network-scripts/ifcfg-bond0DEVICE = bond0ONBOOT = yesBOOTPROTO = staticIPADDR = 192.168.0.254BROADCAST = broadcast = 255.255.255.0NETWORK = 192.168.0.0GATEWAY = 192.168.0.1USERCTL = noTYPE = Ethernet note: do not specify the MAC address vi/etc/sysconfig/network-scripts/ifcfg-eth0 www.2cto.com DEVICE = eth0BOOTPROTO = noneONBOOT = yesUSERCTL = noMASTER = bond0 ------ add SLAVE = yes ------ add note: do not specify Set the MAC address and keep the rest unchanged. comment out the ip address and mask, gateway vi/etc/sysconfig/network-scripts/ifcfg-eth1DEVICE = eth1BOOTPROTO = noneONBOOT = yesUSERCTL = noMASTER = bond0 ------ add SLAVE = yes ------ add www.2cto.com Note: do not specify the MAC address, leave the rest unchanged. comment out the ip address, mask, and gateway. modify/etc/modprobe. conf: Add the following content to the configuration binding model: alias bond0 bondingoptions bond0 millmon = 100 mode = 0. local is modified. Note: {usually in/etc/rc. add the following content to local: ifenslave bond0 eth0 eth1, which is responsible for binding the virtual network card and the two physical network cards when the system starts. This step is not required for the method} Description: miimon = 100miimon indicates how long it takes to check the network. The unit is 100 in ms (ms) and 100 in ms, that is, 0.1 seconds means that if one of the network connections is disconnected, there will be seven types of automatic backup mode in 0.1 seconds (0 ~ 6) mode = 0: Load Balancing mode, with automatic backup, but "Switch" is required for support and setting. Mode = 1: automatic backup mode. If one line is disconnected, other lines are automatically backed up. Mode = 6: Load Balancing mode, automatic backup, no need to Switch support and settings. It should be noted that if you want to achieve load balancing with mode 0, it is not enough to set options bond0 miimon = 100 mode = 0 here, the vswitch connected to the NIC must have special configurations (these two ports should be aggregated), because the bonding Nic uses the same MAC address. analyze the principle of www.2cto.com (bond runs under mode 0): the IP addresses of the NICS bound to bond under mode 0 are changed to the same mac address, if these NICs are connected to the same vswitch, there are multiple ports corresponding to the mac address in the arp table of the vswitch, which port should the switch forward packets sent to this mac address? Under normal circumstances, the mac address is globally unique. A single mac address corresponds to multiple ports, which may confuse the switch. Therefore, if the bond under mode0 is connected to the vswitch, the ports of the vswitch should adopt the aggregation mode (cisco is called ethernetchannel and foundry is called portgroup), because after the vswitch is aggregated, several ports under aggregation are also bundled into a mac address. our solution is to connect two NICs to different vswitches. In mode6 mode, no vswitch is required because the two bonding NICs use different MAC addresses. PS: Add RHEL4 (centos4) and the following versions of options to/etc/modprobe. conf;

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.