|Home||Switchboard||Unix Administration||Red Hat||TCP/IP Networks||Neoliberalism||Toxic Managers|
May the source be with you, but remember the KISS principle ;-)
Skepticism and critical thinking is not panacea, but can help to understand the world better
|News||Trunking / Bonding Multiple Network Interfaces||Recommended Links||Bonding Ethernet Interfaces in RHEL 7||Bonding Ethernet Interfaces in RHEL 6||Bonding Multiple Network Interfaces in SLES|
|Internet Layer of TCP/IP Protocol||IEEE 802.3ad Dynamic link aggregation|
|Linux ifconfig||ethtool||Linux route command||Tips||Admin Horror Stories||Humor||Etc|
The Linux bonding driver provides a method for aggregating multiple network interface controllers (NICs) into a single logical bonded interface of two or more so-called (NIC) slaves. RHEL has the Linux bonding driver integrated as a loadable kernel module and the ifenslave (if = [network] interface) user-level control program pre-installed. Donald Becker programmed the original Linux bonding driver. It came into use with the Beowulf cluster patches for the Linux kernel 2.0.
Link aggregation offers an inexpensive way to set up a high-speed backbone network that transfers much more data than any single port or device can deliver. Link aggregation also allows the network's backbone speed to grow incrementally as demand on the network increases, without having to replace everything and deploy new hardware.
Linux implements Ethernet bonding (trunking) at a higher level then Microsoft Windows, and can hence deal with NICs from different manufacturers or drivers, as long as the NIC is supported by the kernel.
With the modes balance-rr, balance-xor, broadcast and 802.3ad, all physical ports in the link aggregation group must reside on the same logical switch, which, in most common scenarios, will leave a single point of failure when the physical switch to which all links are connected goes offline. The modes active-backup, balance-tlb, and balance-alb can also be set up with two or more switches. But after failover (like all other modes), in some cases, active sessions may fail (due to ARP problems) and have to be restarted.
On Ethernet interfaces level bonding requires assistance from both the Ethernet switch and the host computer's operating system, which must "stripe" the delivery of frames across the network interfaces in the same manner as I/O is striped across disks in a RAID 0 array. For this reason, bonding sometimes is called Redundant Array of Inexpensive Nodes (RAIN) or to "redundant array of independent network interfaces".
There are two types on bonding:
There are 6 bonding modes
- mode=0 (balance-rr) Round-robin policy: It the default mode. It transmits packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.
- mode=1 (active-backup) Active-backup policy: In this mode, only one slave in the bond is active. The other one will become active, only when the active slave fails. The bond’s MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance.
- mode=2 (balance-xor) XOR policy: Transmit based on [(source MAC address XOR’d with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.
- mode=3 (broadcast) Broadcast policy: Transmits everything on all slave interfaces. This mode provides only fault tolerance.
- mode=4 (802.3ad) IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification. Requires configuration of the switch port and a network switch that is 802.3ad compliant.
- mode=5 (balance-tlb) Adaptive transmit load balancing: Channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.
- mode=6 (balance-alb) Adaptive load balancing: It includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic and does not require any special switch support. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the slaves in the bond such that different peers use different hardware addresses for the server.
Note: you can always append extra configuration in case of a rollback.
In one bonding mode does not work you can try another. This is kind of simplistic troubleshooting but it often works.The following table describes the required configuration that you must apply to the upstream switch depending on the bonding mode (7.6. Overview of Bonding Modes and the Required Settings on the Switch Red Hat Enterprise Linux 7 ):
Table 7.1. Switch Configuration Settings Depending on the Bonding Modes
Bonding Mode Configuration on the Switch
Requires static Etherchannel enabled (not LACP-negotiated)
Requires autonomous ports
Requires static Etherchannel enabled (not LACP-negotiated)
Requires static Etherchannel enabled (not LACP-negotiated)
Requires LACP-negotiated Etherchannel enabled
Requires autonomous ports
Requires autonomous ports
Most commonly bonding is needed only on one end (on the server). This most typical case is when four 10Gbit interfaces are bonded to create a single 40Gbit interface using special cable and 40 Gbit port on the switch.
For a bonding interface to be valid, the kernel module must be loaded. In RHEL 7, the bonding module is not loaded by default. You need to load the module by issuing the following command as root:modprobe --first-time bonding
This activation will not persist across system restarts. See the How do I load kernel modules during boot time in RHEL 7 or 8- - Red Hat Customer Portal for an explanation of persistent module loading. See also man-page modules-load.d(5) [centos ]
Example: /etc/modules-load.d/bonding.conf example:# Load bonding.ko at boot bonding
To display information about the module, issue the following command:modinfo bonding
RHEL 7 can be configured like RHEL6 by checking in appropriate module (called bonding) is loaded, then directly editing
interface file and reloading the netwrok via systemdcrl after that. To create a channel bonding interface, create a file in the
<N> with the number for the interface,
0. The contents of the file can be identical to whatever type of interface is getting bonded, such as
an Ethernet interface. The only difference is that the
bond<N> , replacing
<N> with the number for the interface.
The following is a sample channel bonding configuration file,
ifcfg-bond0 (example from
Setting up channel bonding on RHEL 7):
Figure 4. Example: RHEL 7--Configuration file of a bonding master
DEVICE=bond0 TYPE=Bond NAME=bond0 BONDING_MASTER=yes IPADDR=192.0.2.0 PREFIX=24 DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=no UUID=7099226a-66ac-42a3-a41f-da8284e34838 ONBOOT=yes BOOTPROTO=none BONDING_OPTS="mode-4"
After the channel bonding interface is created, the network interfaces to be bound together must be configured by adding the
SLAVE=directives to their configuration files. The configuration files for each of the channel-bonded interfaces can be nearly identical.
Step1. Log on to server and run the ip a command to check the available interfaces.
Step2. Load the bonding driver called “bonding” in the kernel with the modprobe command if it is not already loaded, and verify with the modinfo command:modprobel bonding modinfo bonding lsmod | grep bonding
Step3. Generate UUIDs for interfaces using the uuidgen command.uuidgen bond0
Step4. Use the vi editor to create a file called ifcfg-bond0 in the /etc/sysconfig/network-scripts directory for bond0 with the following settings. Use the interface type bond. This virtual device will serve as the bonding maste.
Step5. Use the vi editor to modify each of interfaces you bond together (for example ifcfg-eth1 and ifcfg-eth2) in the /etc/sysconfig/network-scripts directory. Set the MASTER directive to bond0. Add SLAVE=yes directive to both eth2 and eth3.
For example, if two Ethernet interfaces are being channel bonded, both
eth1may look like the following example:SLAVE=yes DEVICE=enccw0 TYPE=Ethernet NAME=eth1 UUID=4a8e29c7-fb39-457b-8edd-46cbc6ed49f9 MACADDR=02:00:00:D3:FE:A0 ONBOOT=yes MASTER=bond0
Step6. Deactivate and reactivate bond0 with the ifdown and ifup commands. You can also use systemctl restart networkifdown bond0; ifup bond0
Step7. Check the status of bond0 and the slaves with the ip command. It should also show the assigned IP.ip addr cat /proc/net/bonding/bond0
Step8. Restart the system to ensure the configuration survives system reboots:
Red hat documentation cover this at 7.2. Configure Bonding Using the Text User Interface, nmtui Red Hat Enterprise Linux 7 - Red Hat Customer Portal
You can also look at rewrite at How to Setup and Configure Network Bonding or Teaming in RHEL-CentOS 7 - Part 11
You can do it directly as described in Network Bonding Using the NetworkManager Command Line Tool, nmcli Red Hat Enterprise Linux 7 - Red Hat Customer Portal
Red Hat Customer Portal Labs provides a Network Bonding Helper for automatically generating a network bond, based on your environment and deployment goals. (See "Red Hat Network Bonding Helper" [https://access.redhat.com/labs/networkbondinghelper/]). This is a web application that helps generate configuration files with the setup information given by user.Note: Be sure to review the configuration files before applying to the system.
In my previous article I wrote about configuring configuring network interface bonding under Debian Wheezy. Here, I'll briefly outline the steps required to get the same configuration running under recent RHEL-flavoured distributions – namely CentOS 6.4 in my case.
I will be bonding
eth1into a bond named
bond0. Ensure that you're connected to your host via a console. I'll be using active-backup (i.e. failover) bonding, but there are other options available – see the Debian article for links to reference material for those.
First, create the
Due to the fact that /etc/modprobe.conf has been deprecated in RHEL 6, the process of bonding network interfaces has changed a bit.
Now instead of defining your bond in your /etc/modprobe.conf, you define it in /etc/modprobe.d/bonding.conf. No changes in syntax.
alias bond0 bonding
Then in your ifconfig-bond0 file, you define your bonding mode. Note the quotes, and the fact that I explicitly typed out the bonding mode
Bonding Ethernet Interfaces in Linux
This short HOWTO will tell you how to 'bond' two (or more) physical ethernet interfaces together to look and act as a single interface under Linux.
It was originally written for Mandrakelinux users but it has also been tested on recent versions of Mandriva Linux.
HOWTOThis example assumes you have two interfaces and want to use them in a 'fail-over' setup, where if one cable dies, the kernel will automatically switch to using the other cable.. This setup is quite common on server hardware.
In /etc/modules.conf on a 2.4.x kernel, or in /etc/modprobe.conf on a 2.6.x kernel, you should have something similar to the following:
alias eth0 e1000 # Intel GigE (pci) port 1 alias eth1 e1000 # Intel GigE (pci) port 2 alias bond0 bonding # Kernel nic bonding driver alias bond1 bonding # Another bonded interface options bond0 max_bonds=2 miimon=100 mode=1 # 100ms fail-over timer. Mode 1 = Active/Backup options bond1 miimon=100 mode=1 # Same for bond1
You need the following files in /etc/sysconfig/network-scripts/ :
ifcfg-bond0 ifcfg-eth0 ifcfg-eth1
ifcfg-eth0 and ifcfg-eth1 should look similar to the following:
DEVICE=eth0 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none MII_NOT_SUPPORTED=yes
The DEVICE= section should reflect the interface the file relates to (ifcfg-eth1 should have DEVICE=eth1). The MASTER= section should indicate the bonded interface to be used. Assign both e1000 devices to bond0.
The bond0 file contains the actual IP address information:
DEVICE=bond0 IPADDR=192.168.1.1 NETMASK=255.255.255.0 ONBOOT=yes BOOTPROTO=none USERCTL=no MII_NOT_SUPPORTED=yes
Simply restarting the network service 'service network restart' should present you with a new 'bond0' interface. This is the interface you should see traffic going in and out of if youwere to tcpdump the interface.
You will also notice (using /sbin/ifconfig) that all of the ethX interfaces are also up, and also have IP addresses.
bond0 Link encap:Ethernet HWaddr 00:04:23:61:06:30 inet addr:192.168.1.1 Bcast:22.214.171.124 Mask:255.255.255.224 inet6 addr: fe80::204:23ff:fe61:630/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:240339580 errors:0 dropped:0 overruns:0 frame:0 TX packets:264367658 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3328878476 (3174.6 Mb) TX bytes:2497930422 (2382.2 Mb) eth0 Link encap:Ethernet HWaddr 00:04:23:61:06:30 inet6 addr: fe80::204:23ff:fe61:630/64 Scope:Link UP BROADCAST RUNNING NOARP SLAVE MULTICAST MTU:1500 Metric:1 RX packets:43224057 errors:0 dropped:0 overruns:0 frame:0 TX packets:50149177 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:965949319 (921.2 Mb) TX bytes:3242163496 (3091.9 Mb) Base address:0xdcc0 Memory:fcfa0000-fcfc0000 eth1 Link encap:Ethernet HWaddr 00:04:23:61:06:30 inet6 addr: fe80::204:23ff:fe61:630/64 Scope:Link UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:197115526 errors:0 dropped:0 overruns:0 frame:0 TX packets:214218484 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2362929367 (2253.4 Mb) TX bytes:3550735168 (3386.2 Mb) Base address:0xdc80 Memory:fcf80000-fcfa0000
In this example, we are using the fail-over mode. The eth device without NOARP is the current active SLAVE. You may notice that both ethX interfaces have high traffic counters. This is because the system has been up for around 200 days and at some point the interfaces swapped status.
For further reading, you should also read /usr/src/linux/Documentation/networking/bonding.txt which also gives the different bonding modes you can use. Some of these (like Etherchannel trunking) need compatible switches.
Sep 4, 2011
Debian / Ubuntu Linux: Configure Network Bonding [ Teaming / Aggregating NIC ]
by NIX Craft on · 19 comments· LAST UPDATED September 6, 2011
in Debian Linux
NIC teaming is nothing but combining or aggregating multiple network connections in parallel. This is done to increase throughput, and to provide redundancy in case one of the links fails or Ethernet card fails. The Linux kernel comes with the bounding driver for aggregating multiple network interfaces into a single logical interface called bond0. In this tutorial, I will explain how to setup bonding under Debian Linux server to aggregate multiple Ethernet devices into a single link, to get higher data rates and link failover.
The instructions were tested using the following setup:
◾2 x PCI-e Gig NIC with jumbo frames.
◾RAID 6 w/ 5 enterprise grade 15k SAS hard disks.
◾Debian Linux 6.0.2 amd64
Please note that the following instructions should also work on Ubuntu Linux server.
April 3, 2006
Finally, today I had implemented NIC bounding (bind both NIC so that it works as a single device). Bonding is nothing but Linux kernel feature that allows to aggregate multiple like interfaces (such as eth0, eth1) into a single virtual link such as bond0. The idea is pretty simple get higher data rates and as well as link failover. The following instructions were tested on:
- RHEL v4 / 5 / 6 amd64
- CentOS v5 / 6 amd64
- Fedora Linux 13 amd64 and up.
- 2 x PCI-e Gigabit Ethernet NICs with Jumbo Frames (MTU 9000)
- Hardware RAID-10 w/ SAS 15k enterprise grade hard disks.
- Gigabit switch with Jumbo Frame
Google matched content
Configure NIC bonding in CentOS 7 - RHEL 7 - Grepitout
Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers : Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism : The Iron Law of Oligarchy : Libertarian Philosophy
War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Somerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Bernard Shaw : Mark Twain Quotes
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds : Larry Wall : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOS : Programming Languages History : PL/1 : Simula 67 : C : History of GCC development : Scripting Languages : Perl history : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history
The Peter Principle : Parkinson Law : 1984 : The Mythical Man-Month : How to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor
The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D
Copyright © 1996-2020 by Softpanorama Society. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...
|You can use PayPal to to buy a cup of coffee for authors of this site|
Last modified: December, 14, 2020