Linux dual NIC Bindings

Source: Internet
Author: User
Tags get ip

Purpose: Two network card traffic load balanced, redundant

DELL R720:4 block NIC (requires switch support), divided into management network and business Network

System: CentOS6.5


    1. Bind the Nic em1 and em2 , the virtual NIC name is BOND1(Management Network)

# CAT/ETC/SYSCONFIG/NETWORK-SCRIPTS/IFCFG-EM1DEVICE=EM1//NIC device name hwaddr=c8:1f:66:e5:33:67//network card MAC address Onboot=yes// With the network boot Bootproto=none//Get IP master=bond1//Bind the virtual NIC name Slave=yes//role is from
# cat/etc/sysconfig/network-scripts/ifcfg-em2device=em2hwaddr=c8:1f:66:e5:33:68onboot=yesbootproto=nonemaster= Bond1slave=yes
# cat IFCFG-BOND1DEVICE=BOND1//virtual network card name Onboot=yes//How to start with network Bootproto=none//Get IP ipaddr=192.168.1.224//IP address net mask=255.255.255.0//Subnet mask gateway=192.168.1.1//Gateway

# grep bond/etc/modprobe.d/dist.conf//Configure binding model, this two lines add to config file last alias bond1 bonding options Bond1 miimon=100 mode=0/System every 100MS Check mode specify load pattern
# grep Bond/etc/rc.localifenslave bond1 em1 em2//Bind the virtual NIC and two physical network cards when the system starts

Restart the machine (you can try another way, load the module or restart the service)


# CAT/PROC/NET/BONDING/BOND1//Detection status Ethernetchannel bonding driver:v3.6.0 (September) Bondingmode:load Balanc  ING (round-robin) miistatus:upmiipolling Interval (ms): 100Up Delay (ms): 0DownDelay (ms): 0 Slaveinterface:em1miistatus: upspeed:1000 mbpsduplex:fulllinkfailure count:0permanenthw addr:c8:1f:66:e5:33:67slavequeue id:0 Slave interface:em2                   MII Status:downSpeed:UnknownDuplex:UnknownLink Failure count:0permanent HW addr:c8:1f:66:e5:33:68slave queue id:0 The physical NIC is disconnected because no cable is plugged in



2. Similarly, the NIC em3 and em4 are bound, the virtual network card name is bond2(Business Network)

# Cat Ifcfg-em3device=em3hwaddr=c8:1f:66:e5:33:69onboot=yesbootproto=nonemaster=bond2slave=yes
# Cat Ifcfg-em4device=em4hwaddr=c8:1f:66:e5:33:6aonboot=yesbootproto=nonemaster=bond2slave=yes
# Cat Ifcfg-bond2device=bond2onboot=yesbootproto=noneipaddr=10.88.253.224netmask=255.255.255.128gateway= 10.88.253.129
# grep Bond/etc/modprobe.d/dist.confalias bond2 bonding options Bond2 miimon=100 mode=0
# grep bond/etc/rc.localifenslave bond1 em3 em4


# Cat/proc/net/bonding/bond2ethernetchannel Bonding driver:v3.6.0 (September) bondingmode:load balancing (Roun D-robin) miistatus:upmiipolling Interval (ms): 100Up Delay (ms): 0DownDelay (ms): 0 SlaveInterface:em3MIIStatus:upSpeed: Mbpsduplex:fulllinkfailure count:0permanenthw addr:c8:1f:66:e5:33:69slavequeue id:0 Slave interface:em4mii Statu s:upspeed:1000 mbpsduplex:fulllink Failure count:0permanent HW addr:c8:1f:66:e5:33:6aslave queue id:0



This article is from the "Esoul" blog, make sure to keep this source http://esoul.blog.51cto.com/7825461/1748627

Linux dual NIC Bindings

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.