SlideShare a Scribd company logo
1 of 3
Download to read offline
Express-Guide
                                  ~to~
                 Load Balancing the Network Traffic


                    Ethernet
                    Bonding
                    Using Multiple NICs on Linux
                                           by, ABK ~ http://www.twitter.com/aBionic

                             ::Task Detail::

 Load Balancing the Network Traffic on Multiple Ethernet cards attached on a
  Linux Box.



                             ::Background::

 Linux allows binding multiple NICs into single NIC using special in-built
  kernel module 'bonding'.
 The behavior of bonded interfaces depend upon 'modes', providing either
  hot-standby or load-balancing services. Additionally, link integrity
  monitoring can be performed.
 Settings for 'modes' are:
  mode=0 (balance-rr)
  : Round-Robin Policy {load balancing and fault-tolerance}
  mode=1 (active-backup)
  : Fault-tolerance, one active at a time
  mode=2 (balance-XOR)
  : Same slave for same Target {load balancing & fault-tolerance}
  mode=3 (broadcast)
  : Fault Tolerance
  mode=4 (802.3ad)
  : IEEE 802.3ad, Dynamic Link Aggregation
  mode=5 (balance-tlb)
  : Load balancing outgoing traffic
  mode=6 (balance-alb)
  : Load Balancing In/Out traffic
  Settings for 'miimon' will be in milliseconds monitoring the traffic.
::Execution Method::

Here, a new Bonded NIC is been configured in Linux-Kernel-based Machines (as it
is a Linux Kernel Module) representing the both physical NICs in machine.

It can provide with load-balancing and failure-recovery.
{it's RHEL/Fedora/CentOS sepcific, use them according to your distro}

   Creating new software-level Bonding NIC acting as a master
    ◦ Create a new file '/etc/sysconfig/network-scripts/ifcfg-bond0' if want to
       name it bond0 with content below; the IP configuration changes as per
       your network
       ▪ for static IP settings
          • #####start of ifcfg-bond0 content####
             DEVICE=bond0
             IPADDR=192.168.1.3
             NETWORK=192.168.1.1
             NETMASK=255.255.255.0
             USERCTL=no
             BOOTPROTO=static
             ONBOOT=yes
             BONDING_OPTS="mode=balance-tlb miimon=100"
             ####stop of ifcfg-bond0 content########
       ▪ for dynamic IP settings
          • #####start of ifcfg-bond0 content#######
             DEVICE=bond0
             USERCTL=no
             BOOTPROTO=dhcp
             ONBOOT=yes
             BONDING_OPTS="mode=balance-tlb miimon=100"
             ######stop of ifcfg-bond0 content######
       ▪ here, the line with 'BONDING_OPTS' specifies it to be bonded

   Modify the existing NIC configuration's as below
    ◦ say for eth0 settings '/etc/sysconfig/network-scripts/ifcfg-eth0',
    ◦ similar for other NICs configuration files
      ▪ #####start of ifcfg-eth0 content#########
          DEVICE=eth0
          USERCTL=no
          BOOTPROTO=none
          ONBOOT=yes
          MASTER=bond0
          SLAVE=yes
          #######stop of ifcfg-eth0 content#####
 Loading bond driver/module
    ◦ open '/etc/modprobe.conf' in any editor and add following 2 lines to it
       ▪ #####below 2 lines#####
          alias bond0 bonding
          options bond0 mode=balance-alb miimon=100

   Loading all changes made
    ◦ at shell
       #modprobe bonding
       #service network restart
       #less /proc/net/bonding/bond0



                         ::Tools/Technology Used::

Bonding Module of Linux Kernel:
http://www.kernel.org/doc/Documentation/networking/bonding.txt



                                 ::Inference::

   This is a nice built-in facility provided in Linux to be used.
   Generic Mode for input/output traffic load balancing 'balance-alb'.



                         ::Troubleshooting/Updates::
   Problem: initial setting gave error 'dev_set_max_address of dev eth0
    failed'
    Solution:
    ALB mode implemented requires a suitable HWAddress to be specified;
    there were already present HWADDRESS entries in all configuration files.
    Just for a trial removing those lines worked.

More Related Content

What's hot

MC-LAG Configuration with BGP-base VPLS
MC-LAG Configuration with BGP-base VPLSMC-LAG Configuration with BGP-base VPLS
MC-LAG Configuration with BGP-base VPLSJohnson Liu
 
Packet Tracer: WAN, point to point links.
Packet Tracer: WAN, point to point links.Packet Tracer: WAN, point to point links.
Packet Tracer: WAN, point to point links.Rafat Khandaker
 
Bonding Interface in MikroTik
Bonding Interface in MikroTikBonding Interface in MikroTik
Bonding Interface in MikroTikKHNOG
 
HUAWEI Switch HOW-TO - Configuring link aggregation in static LACP mode
HUAWEI Switch HOW-TO - Configuring link aggregation in static LACP modeHUAWEI Switch HOW-TO - Configuring link aggregation in static LACP mode
HUAWEI Switch HOW-TO - Configuring link aggregation in static LACP modeIPMAX s.r.l.
 
Multihomed Linux router
Multihomed Linux routerMultihomed Linux router
Multihomed Linux routerMarian Marinov
 
Layer 2 & layer 3 switching
Layer 2 & layer 3 switchingLayer 2 & layer 3 switching
Layer 2 & layer 3 switchingMuhd Mu'izuddin
 
Huawei ARG3 Router How To - Troubleshooting OSPF: Router ID Confusion
Huawei ARG3 Router How To - Troubleshooting OSPF: Router ID ConfusionHuawei ARG3 Router How To - Troubleshooting OSPF: Router ID Confusion
Huawei ARG3 Router How To - Troubleshooting OSPF: Router ID ConfusionIPMAX s.r.l.
 
Ucs security part2
Ucs security part2Ucs security part2
Ucs security part2Krunal Shah
 
Huawei ARG3 Router How To - Troubleshooting OSPF: Netmask mismatch
Huawei ARG3 Router How To - Troubleshooting OSPF: Netmask mismatchHuawei ARG3 Router How To - Troubleshooting OSPF: Netmask mismatch
Huawei ARG3 Router How To - Troubleshooting OSPF: Netmask mismatchIPMAX s.r.l.
 
How to install and configure Postfix Mail Server in Redhat (RHEL) / CentOS Linux
How to install and configure Postfix Mail Server in Redhat (RHEL) / CentOS LinuxHow to install and configure Postfix Mail Server in Redhat (RHEL) / CentOS Linux
How to install and configure Postfix Mail Server in Redhat (RHEL) / CentOS Linuxonlinerana
 
VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話upaa
 
第15讲 Stp
第15讲 Stp第15讲 Stp
第15讲 StpF.l. Yu
 
Ifupdown2: Network Interface Manager
Ifupdown2: Network Interface ManagerIfupdown2: Network Interface Manager
Ifupdown2: Network Interface ManagerCumulus Networks
 

What's hot (20)

MC-LAG Configuration with BGP-base VPLS
MC-LAG Configuration with BGP-base VPLSMC-LAG Configuration with BGP-base VPLS
MC-LAG Configuration with BGP-base VPLS
 
Packet Tracer: WAN, point to point links.
Packet Tracer: WAN, point to point links.Packet Tracer: WAN, point to point links.
Packet Tracer: WAN, point to point links.
 
Bonding Interface in MikroTik
Bonding Interface in MikroTikBonding Interface in MikroTik
Bonding Interface in MikroTik
 
HUAWEI Switch HOW-TO - Configuring link aggregation in static LACP mode
HUAWEI Switch HOW-TO - Configuring link aggregation in static LACP modeHUAWEI Switch HOW-TO - Configuring link aggregation in static LACP mode
HUAWEI Switch HOW-TO - Configuring link aggregation in static LACP mode
 
Multihomed Linux router
Multihomed Linux routerMultihomed Linux router
Multihomed Linux router
 
Class 7
Class 7Class 7
Class 7
 
Layer 2 & layer 3 switching
Layer 2 & layer 3 switchingLayer 2 & layer 3 switching
Layer 2 & layer 3 switching
 
Layer 2 switching
Layer 2 switchingLayer 2 switching
Layer 2 switching
 
Huawei ARG3 Router How To - Troubleshooting OSPF: Router ID Confusion
Huawei ARG3 Router How To - Troubleshooting OSPF: Router ID ConfusionHuawei ARG3 Router How To - Troubleshooting OSPF: Router ID Confusion
Huawei ARG3 Router How To - Troubleshooting OSPF: Router ID Confusion
 
Chapter13ccna
Chapter13ccnaChapter13ccna
Chapter13ccna
 
Ucs security part2
Ucs security part2Ucs security part2
Ucs security part2
 
Huawei ARG3 Router How To - Troubleshooting OSPF: Netmask mismatch
Huawei ARG3 Router How To - Troubleshooting OSPF: Netmask mismatchHuawei ARG3 Router How To - Troubleshooting OSPF: Netmask mismatch
Huawei ARG3 Router How To - Troubleshooting OSPF: Netmask mismatch
 
Chapter6ccna
Chapter6ccnaChapter6ccna
Chapter6ccna
 
How to install and configure Postfix Mail Server in Redhat (RHEL) / CentOS Linux
How to install and configure Postfix Mail Server in Redhat (RHEL) / CentOS LinuxHow to install and configure Postfix Mail Server in Redhat (RHEL) / CentOS Linux
How to install and configure Postfix Mail Server in Redhat (RHEL) / CentOS Linux
 
VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話VyOS Users Meeting #2, VyOSのVXLANの話
VyOS Users Meeting #2, VyOSのVXLANの話
 
第15讲 Stp
第15讲 Stp第15讲 Stp
第15讲 Stp
 
Chapter4ccna
Chapter4ccnaChapter4ccna
Chapter4ccna
 
CCNA 1 Chapter 6 v5.0 2014
CCNA 1 Chapter 6 v5.0 2014CCNA 1 Chapter 6 v5.0 2014
CCNA 1 Chapter 6 v5.0 2014
 
Layer 2 switching loop
Layer 2 switching loopLayer 2 switching loop
Layer 2 switching loop
 
Ifupdown2: Network Interface Manager
Ifupdown2: Network Interface ManagerIfupdown2: Network Interface Manager
Ifupdown2: Network Interface Manager
 

Similar to Ethernet Bonding for Multiple NICs on Linux ~ A techXpress Guide

Linux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guideLinux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guidejasembo
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation ToolsEdwin Beekman
 
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/StableSR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stablejuet-y
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversBrent Salisbury
 
Sharing-Knowledge-OAM-3G-Ericsson .ppt
Sharing-Knowledge-OAM-3G-Ericsson   .pptSharing-Knowledge-OAM-3G-Ericsson   .ppt
Sharing-Knowledge-OAM-3G-Ericsson .pptwafawafa52
 
Docker SDN (software-defined-networking) JUG
Docker SDN (software-defined-networking) JUGDocker SDN (software-defined-networking) JUG
Docker SDN (software-defined-networking) JUGPiotr Kieszczyński
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_trainingvideos
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksLaurent Bernaille
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchTe-Yen Liu
 
(2) documents e books_cisco_networking_books_training_materials_cnap_-_ont_v5...
(2) documents e books_cisco_networking_books_training_materials_cnap_-_ont_v5...(2) documents e books_cisco_networking_books_training_materials_cnap_-_ont_v5...
(2) documents e books_cisco_networking_books_training_materials_cnap_-_ont_v5...Lary Onyeka
 
Openstack installation using rdo multi node
Openstack installation using rdo multi nodeOpenstack installation using rdo multi node
Openstack installation using rdo multi nodeNarasimha sreeram
 
82599 sriov vm configuration notes
82599 sriov vm configuration notes82599 sriov vm configuration notes
82599 sriov vm configuration notesRyan Aydelott
 
SDNDS.TW Mininet
SDNDS.TW MininetSDNDS.TW Mininet
SDNDS.TW MininetNCTU
 
Summative Assessment – InternetworkingPractical Assessment Se.docx
Summative Assessment – InternetworkingPractical Assessment Se.docxSummative Assessment – InternetworkingPractical Assessment Se.docx
Summative Assessment – InternetworkingPractical Assessment Se.docxmattinsonjanel
 
Developing MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack RoutersDeveloping MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack RoutersOnur Alanbel
 
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidth
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidthAn Express Guide ~ "dummynet" for tweaking network latencies & bandwidth
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidthAbhishek Kumar
 

Similar to Ethernet Bonding for Multiple NICs on Linux ~ A techXpress Guide (20)

Zxdsl 9210 guide
Zxdsl 9210 guideZxdsl 9210 guide
Zxdsl 9210 guide
 
Linux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guideLinux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guide
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation Tools
 
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/StableSR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan Drivers
 
Sharing-Knowledge-OAM-3G-Ericsson .ppt
Sharing-Knowledge-OAM-3G-Ericsson   .pptSharing-Knowledge-OAM-3G-Ericsson   .ppt
Sharing-Knowledge-OAM-3G-Ericsson .ppt
 
Docker SDN (software-defined-networking) JUG
Docker SDN (software-defined-networking) JUGDocker SDN (software-defined-networking) JUG
Docker SDN (software-defined-networking) JUG
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay Networks
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitch
 
(2) documents e books_cisco_networking_books_training_materials_cnap_-_ont_v5...
(2) documents e books_cisco_networking_books_training_materials_cnap_-_ont_v5...(2) documents e books_cisco_networking_books_training_materials_cnap_-_ont_v5...
(2) documents e books_cisco_networking_books_training_materials_cnap_-_ont_v5...
 
Openstack installation using rdo multi node
Openstack installation using rdo multi nodeOpenstack installation using rdo multi node
Openstack installation using rdo multi node
 
kubernetes practice
kubernetes practicekubernetes practice
kubernetes practice
 
ENSA_Module_10.pptx
ENSA_Module_10.pptxENSA_Module_10.pptx
ENSA_Module_10.pptx
 
82599 sriov vm configuration notes
82599 sriov vm configuration notes82599 sriov vm configuration notes
82599 sriov vm configuration notes
 
SDNDS.TW Mininet
SDNDS.TW MininetSDNDS.TW Mininet
SDNDS.TW Mininet
 
Useful Linux commands
Useful Linux commandsUseful Linux commands
Useful Linux commands
 
Summative Assessment – InternetworkingPractical Assessment Se.docx
Summative Assessment – InternetworkingPractical Assessment Se.docxSummative Assessment – InternetworkingPractical Assessment Se.docx
Summative Assessment – InternetworkingPractical Assessment Se.docx
 
Developing MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack RoutersDeveloping MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack Routers
 
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidth
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidthAn Express Guide ~ "dummynet" for tweaking network latencies & bandwidth
An Express Guide ~ "dummynet" for tweaking network latencies & bandwidth
 

More from Abhishek Kumar

Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)Abhishek Kumar
 
Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Abhishek Kumar
 
xml-motor ~ What,Why,How
xml-motor ~ What,Why,Howxml-motor ~ What,Why,How
xml-motor ~ What,Why,HowAbhishek Kumar
 
Syslog Centralization Logging with Windows ~ A techXpress Guide
Syslog Centralization Logging with Windows ~ A techXpress GuideSyslog Centralization Logging with Windows ~ A techXpress Guide
Syslog Centralization Logging with Windows ~ A techXpress GuideAbhishek Kumar
 
Squid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress GuideSquid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress GuideAbhishek Kumar
 
Solaris Zones (native & lxbranded) ~ A techXpress Guide
Solaris Zones (native & lxbranded) ~ A techXpress GuideSolaris Zones (native & lxbranded) ~ A techXpress Guide
Solaris Zones (native & lxbranded) ~ A techXpress GuideAbhishek Kumar
 
An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring Abhishek Kumar
 
An Express Guide ~ Cacti for IT Infrastructure Monitoring & Graphing
An Express Guide ~ Cacti for IT Infrastructure Monitoring & GraphingAn Express Guide ~ Cacti for IT Infrastructure Monitoring & Graphing
An Express Guide ~ Cacti for IT Infrastructure Monitoring & GraphingAbhishek Kumar
 
An Express Guide ~ SNMP for Secure Rremote Resource Monitoring
An Express Guide ~ SNMP for Secure Rremote Resource MonitoringAn Express Guide ~ SNMP for Secure Rremote Resource Monitoring
An Express Guide ~ SNMP for Secure Rremote Resource MonitoringAbhishek Kumar
 
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'Abhishek Kumar
 
XSS Defeating Concept - Part 2
XSS Defeating Concept - Part 2XSS Defeating Concept - Part 2
XSS Defeating Concept - Part 2Abhishek Kumar
 
XSS Defeating Trick ~=ABK=~ WhitePaper
XSS Defeating Trick ~=ABK=~ WhitePaperXSS Defeating Trick ~=ABK=~ WhitePaper
XSS Defeating Trick ~=ABK=~ WhitePaperAbhishek Kumar
 
FreeSWITCH on RedHat, Fedora, CentOS
FreeSWITCH on RedHat, Fedora, CentOSFreeSWITCH on RedHat, Fedora, CentOS
FreeSWITCH on RedHat, Fedora, CentOSAbhishek Kumar
 

More from Abhishek Kumar (16)

Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)
 
Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)
 
DevOps?!@
DevOps?!@DevOps?!@
DevOps?!@
 
xml-motor ~ What,Why,How
xml-motor ~ What,Why,Howxml-motor ~ What,Why,How
xml-motor ~ What,Why,How
 
XML-Motor
XML-MotorXML-Motor
XML-Motor
 
DevOps with Sec-ops
DevOps with Sec-opsDevOps with Sec-ops
DevOps with Sec-ops
 
Syslog Centralization Logging with Windows ~ A techXpress Guide
Syslog Centralization Logging with Windows ~ A techXpress GuideSyslog Centralization Logging with Windows ~ A techXpress Guide
Syslog Centralization Logging with Windows ~ A techXpress Guide
 
Squid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress GuideSquid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
Squid for Load-Balancing & Cache-Proxy ~ A techXpress Guide
 
Solaris Zones (native & lxbranded) ~ A techXpress Guide
Solaris Zones (native & lxbranded) ~ A techXpress GuideSolaris Zones (native & lxbranded) ~ A techXpress Guide
Solaris Zones (native & lxbranded) ~ A techXpress Guide
 
An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring
 
An Express Guide ~ Cacti for IT Infrastructure Monitoring & Graphing
An Express Guide ~ Cacti for IT Infrastructure Monitoring & GraphingAn Express Guide ~ Cacti for IT Infrastructure Monitoring & Graphing
An Express Guide ~ Cacti for IT Infrastructure Monitoring & Graphing
 
An Express Guide ~ SNMP for Secure Rremote Resource Monitoring
An Express Guide ~ SNMP for Secure Rremote Resource MonitoringAn Express Guide ~ SNMP for Secure Rremote Resource Monitoring
An Express Guide ~ SNMP for Secure Rremote Resource Monitoring
 
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'
Presentation on "XSS Defeating Concept in (secure)SiteHoster" : 'nullcon-2011'
 
XSS Defeating Concept - Part 2
XSS Defeating Concept - Part 2XSS Defeating Concept - Part 2
XSS Defeating Concept - Part 2
 
XSS Defeating Trick ~=ABK=~ WhitePaper
XSS Defeating Trick ~=ABK=~ WhitePaperXSS Defeating Trick ~=ABK=~ WhitePaper
XSS Defeating Trick ~=ABK=~ WhitePaper
 
FreeSWITCH on RedHat, Fedora, CentOS
FreeSWITCH on RedHat, Fedora, CentOSFreeSWITCH on RedHat, Fedora, CentOS
FreeSWITCH on RedHat, Fedora, CentOS
 

Ethernet Bonding for Multiple NICs on Linux ~ A techXpress Guide

  • 1. Express-Guide ~to~ Load Balancing the Network Traffic Ethernet Bonding Using Multiple NICs on Linux by, ABK ~ http://www.twitter.com/aBionic ::Task Detail::  Load Balancing the Network Traffic on Multiple Ethernet cards attached on a Linux Box. ::Background::  Linux allows binding multiple NICs into single NIC using special in-built kernel module 'bonding'.  The behavior of bonded interfaces depend upon 'modes', providing either hot-standby or load-balancing services. Additionally, link integrity monitoring can be performed.  Settings for 'modes' are: mode=0 (balance-rr) : Round-Robin Policy {load balancing and fault-tolerance} mode=1 (active-backup) : Fault-tolerance, one active at a time mode=2 (balance-XOR) : Same slave for same Target {load balancing & fault-tolerance} mode=3 (broadcast) : Fault Tolerance mode=4 (802.3ad) : IEEE 802.3ad, Dynamic Link Aggregation mode=5 (balance-tlb) : Load balancing outgoing traffic mode=6 (balance-alb) : Load Balancing In/Out traffic Settings for 'miimon' will be in milliseconds monitoring the traffic.
  • 2. ::Execution Method:: Here, a new Bonded NIC is been configured in Linux-Kernel-based Machines (as it is a Linux Kernel Module) representing the both physical NICs in machine. It can provide with load-balancing and failure-recovery. {it's RHEL/Fedora/CentOS sepcific, use them according to your distro}  Creating new software-level Bonding NIC acting as a master ◦ Create a new file '/etc/sysconfig/network-scripts/ifcfg-bond0' if want to name it bond0 with content below; the IP configuration changes as per your network ▪ for static IP settings • #####start of ifcfg-bond0 content#### DEVICE=bond0 IPADDR=192.168.1.3 NETWORK=192.168.1.1 NETMASK=255.255.255.0 USERCTL=no BOOTPROTO=static ONBOOT=yes BONDING_OPTS="mode=balance-tlb miimon=100" ####stop of ifcfg-bond0 content######## ▪ for dynamic IP settings • #####start of ifcfg-bond0 content####### DEVICE=bond0 USERCTL=no BOOTPROTO=dhcp ONBOOT=yes BONDING_OPTS="mode=balance-tlb miimon=100" ######stop of ifcfg-bond0 content###### ▪ here, the line with 'BONDING_OPTS' specifies it to be bonded  Modify the existing NIC configuration's as below ◦ say for eth0 settings '/etc/sysconfig/network-scripts/ifcfg-eth0', ◦ similar for other NICs configuration files ▪ #####start of ifcfg-eth0 content######### DEVICE=eth0 USERCTL=no BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes #######stop of ifcfg-eth0 content#####
  • 3.  Loading bond driver/module ◦ open '/etc/modprobe.conf' in any editor and add following 2 lines to it ▪ #####below 2 lines##### alias bond0 bonding options bond0 mode=balance-alb miimon=100  Loading all changes made ◦ at shell #modprobe bonding #service network restart #less /proc/net/bonding/bond0 ::Tools/Technology Used:: Bonding Module of Linux Kernel: http://www.kernel.org/doc/Documentation/networking/bonding.txt ::Inference::  This is a nice built-in facility provided in Linux to be used.  Generic Mode for input/output traffic load balancing 'balance-alb'. ::Troubleshooting/Updates::  Problem: initial setting gave error 'dev_set_max_address of dev eth0 failed' Solution: ALB mode implemented requires a suitable HWAddress to be specified; there were already present HWADDRESS entries in all configuration files. Just for a trial removing those lines worked.