Problems with RHEL Nic binding

Source: Internet
Author: User
Problems with RHEL Nic binding nic binding technology helps to ensure high availability and provide other advantages to improve network performance. in this article, the dual Nic binding implementation in Linux is to use two NICs to virtualize one Nic, this aggregated device looks like a separate Ethernet interface device ,... capital
Problems with RHEL Nic binding nic binding technology helps to ensure high availability and provide other advantages to improve network performance. in this article, the dual Nic binding implementation in Linux is to use two NICs to virtualize one Nic, this aggregated device seems to be a separate Ethernet interface device. Generally speaking, two NICs have the same IP address and the parallel links are aggregated into a logical link, in this way, even if one of the physical NICs fails, the connection will not be interrupted. This document uses Redhat Linux Enterprise 5.6 as an example. the differences between Redhat Linux Enterprise 6.0 configurations are described in this document. The Linux Nic binding configuration is very simple and the main steps are as follows: www.2cto.com 1. modify/etc/modprobe. conf file to enable the system to load the bonding module at startup, define the alias, and add the following content: [root @ server171 ~] # Vim/etc/modprobe. conf alias bond0 bonding note: in rhel6, no/etc/modprobe. conf file, add this parameter to/etc/modprobe. d/dist. conf. 2. create a Nic configuration file. the name of the logical Nic obtained by binding is bondx, where x can be 0, 1, 2 ,..., For the first group of bindings, the logical Nic name is bond0 and the corresponding configuration file is/etc/sysconfig/network-scripts/ifcfg-bond0 [root @ 365 linux ~] # Cd/etc/sysconfig/network-scripts/[root @ 365 linux network-scripts] # cp ifcfg-eth0 ifcfg-bond0 [root @ 365 linux network-scripts] # vim ifcfg-bond0DEVICE = bond0 // device name BOOTPROTO = static // obtain the IP address through static, you can also obtain IPADDR = 192.168.4.171 // static IPNETMASK = 255.255.255.255.128 // subnet mask GATEWAY = 192.168.4.130 // gateway onboot = yes // boot device BONDING_OPTS = "mode = 1 miimon = 50 through dhcp "After the Eni is bound, only IP addresses can be configured on the logical Nic. do not configure IP address information for the physical Nic to be bound. Miimon is used for link monitoring. For example: miimon = 100, the system monitors the link connection status every MS. If one line fails, it is transferred to another line. The value of mode indicates the working mode, commonly used are 0, 1. • Mode = 0 indicates that load balancing (round-robin) is a load balancing method, and both NICs work. • Mode = 1 indicates that fault-tolerance (active-backup) provides redundancy, working in the active/standby mode. that is to say, by default, only one network card works and the other is used for backup. Note: bonding can only provide link monitoring, that is, whether the link from the host to the switch is connected. If the external link of the switch is down and the switch is not faulty, bonding considers that the link is correct and continues to be used. 3. configure the physical ifcfg-eth0 and ifcfg-eth1 [root @ server171 network-scripts] # vim ifcfg-eth0DEVICE = eth0HWADDR = 00: 16: 76: 3F: 9B: 8 CMASTER = bond0SLAVE = yesONBOOT = yes [root @ server171 network-scripts] # vim ifcfg-eth1DEVICE = eth1 www.2cto.com HWADDR = 00: 0A: EB: 30: 62: 09 MASTER = bond0SLAVE = yesONBOOT = yes Note: (1) when multiple NICs are set in the system, it is recommended that the MAC address of the NIC correspond to the HWADDR in the ethX file, otherwise, the eth number of the network card may change after the system restarts. if multiple groups of network cards are bound to the production system, this is very dangerous. (2) in rhel6, do not include the "" sign in the NIC configuration file parameter value; otherwise, the configuration file does not take effect and the NetManager service needs to be disabled. 3. after the configuration is complete, restart the network or restart the computer. use ifconfig to view the Nic information. a Nic named bond0 is displayed. [Root @ server171 ~] # Hyperlink Link encap: Ethernet HWaddr 00: 16: 76: 3F: 9B: 8 Cinet addr: 192.168.4.171 Bcast: 192.168.4.255 Mask: 255.255.255.128UP broadcast running master multicast mtu: 1500 Metric: 1RX packets: 53 errors: 0 dropped: 0 overruns: 0 frame: 0TX packets: 53 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 0RX bytes: 7373 (7.2 KiB) TX bytes: 7133 (6.9 KiB) eth0 Link encap: Ethernet HWaddr 00: 16: 76: 3F: 9 B: 8CUP BROADCAST RUNNING SLAVE MULTICAST MTU: 1500 Metric: 1RX packets: 60 errors: 0 dropped: 0 overruns: 0 frame: 0TX packets: 61 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 1000RX bytes: 7835 (7.6 KiB) TX bytes: 8429 (8.2 KiB) Interrupt: 67 Base address: 0x2000 eth1 Link encap: ethernet HWaddr 00: 16: 76: 3F: 9B: 8CUP broadcast running slave multicast mtu: 1500 Metric: 1RX packets: 0 errors: 0 drop Ped: 0 overruns: 0 frame: 0TX packets: 0 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 1000RX bytes: 0 (0.0 B) TX bytes: 0 (0.0 B) Interrupt: 67 Base address: 0x2080 [root @ server171 ~] # Cat/proc/net/bonding/bond0Ethernet Channel Bonding Driver: v3.4.0-1 (October 7, 2008) Bonding Mode: fault-tolerance (active-backup) Primary Slave: nonecursponly Active Slave: eth1MII Status: up www.2cto.com MII Polling Interval (MS): 50Up Delay (MS): 0 Down Delay (MS): 0 Slave Interface: eth0MII Status: upSpeed: 10 MbpsDuplex: half Link Failure Count: 0 Permanent HW addr: 00: 16: 76: 3f: 9b: 8c Slave I Nterface: eth1MII Status: upSpeed: 100 MbpsDuplex: full Link FailureCount: 0 Permanent HW addr: 00: 0a: eb: 30: 62: 09 supplement: you can use iptraf or iftop to monitor network card traffic. Author: ywjcool
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.