Solved

Linux Networking : What is of bond interface & when it will be useful

Posted on 2016-08-08
18
79 Views
Last Modified: 2016-08-24
Linux Networking : What is of bond interface & how it will be useful ?

Thanks for in advance ...
0
Comment
Question by:mac_g
  • 7
  • 7
  • 2
  • +1
18 Comments
 
LVL 5

Assisted Solution

by:Manuel Flores
Manuel Flores earned 150 total points
ID: 41748321
Basically is to join or team several interfaces to act as one.

This is done to provide redundancy, in case that one interface or the attached network fails, the server can communicate using other teamed NIC's.

It is used too to expand the bandwidth , that is, more data transfer capacity because each NIC aggregates it's capacity to the team.

Here you can find more information;
https://wiki.centos.org/TipsAndTricks/BondingInterfaces

..MFlores..
0
 

Author Comment

by:mac_g
ID: 41748370
Thanks for ur reply  ...

Am DBA, we got the new server in our dept.
when I see.. I can see whole list of interfaces .. no sure why there are so many.. I am confused ..

please explain

==
 ifcfg-bond0
 ifcfg-bond
 ifcfg-bond:
 ifcfg-bond2
 ifcfg-bond3
 ifcfg-bond4
 ifcfg-eth286_2.4
 ifcfg-eth646_.4
 ifcfg-ib0
 ifcfg-ib0.8004
 
 ifcfg-ib
 ifcfg-ib.8004

ifcfg-lo
===
0
 
LVL 76

Expert Comment

by:arnold
ID: 41749738
look at ifconfig -a
this will dispaly the active ones.
lspci to see your hardware
do you have FC HBA, 10G Network HBAs?
the bond interfaces might represent different IPs on different segments.

Manuel, addressed the utility of the bond interface.
from device failure handling, to expanding the available bandwidth/load balancing traffic.....
0
 
LVL 5

Expert Comment

by:Manuel Flores
ID: 41751996
If you need further help, please let us know.  ..MFlores..
0
 
LVL 39

Expert Comment

by:noci
ID: 41764944
@mac_g, the list you show is  the list of config files which may or may not be active.
VLANs seem to be involved as well so please provide the output of the following commands:

ifconfig -a
-- This should produce the current active config

cat /proc/net/bonding/*
-- This should produce info on bonding used.

cat /proc/net/vlan/config
-- This should produce the VLAN configuration
0
 

Author Comment

by:mac_g
ID: 41765060
@noci, for your info .. please refer below

---------
bonding: bond1: Adding slave eth1286_2.41.
bonding: bond1: Warning: enslaved VLAN challenged slave eth1286_2.41. Adding VLANs will be blocked as long as eth1286_2.41 is part of bond bond1
[mlx4_vnic] eth1286_2.41 is opened
bonding: bond1: enslaving eth1286_2.41 as a backup interface with an up link.
bonding: bond1: Adding slave eth646_1.41.
bonding: bond1: Warning: enslaved VLAN challenged slave eth646_1.41. Adding VLANs will be blocked as long as eth646_1.41 is part of bond bond1
[mlx4_vnic] eth646_1.41 is opened
bonding: bond1: enslaving eth646_1.41 as a backup interface with an up link.
bonding: bond1: link status definitely up for interface eth1286_2.41, 10000 Mbps full duplex.
bonding: bond1: making interface eth1286_2.41 the new active one.
bonding: bond1: link status definitely up for interface eth646_1.41, 10000 Mbps full duplex.
[root@RUHMPV-ADF01 ~]# dmesg | grep ib
Calibrating delay loop (skipped), value calculated using timer frequency.. 5786.21 BogoMIPS (lpj=2893108)
vgaarb: bridge control possible 0000:00:02.0
libata version 3.00 loaded.
Refined TSC clocksource calibration: 2893.029 MHz.
mlx4_ib: Mellanox ConnectX InfiniBand driver v1.0-ofed1.5.5 (April 4, 2008)
mlx4_core 0000:00:04.0: mlx4_ib: multi-function enabled
mlx4_core 0000:00:04.0: mlx4_ib: using node_guid:0x0021280001fc66e6
mlx4_core 0000:00:04.0: mlx4_ib: operating in qp1 tunnel mode
bonding: bond2: Adding slave ib0.
bonding: bond2: Warning: enslaved VLAN challenged slave ib0. Adding VLANs will be blocked as long as ib0 is part of bond bond2
bonding: bond2: enslaving ib0 as a backup interface with a down link.
ib0: enabling connected mode will cause multicast packet drops
ib0: mtu > 2044 will cause multicast packet drops.
ib0: mtu > 2044 will cause multicast packet drops.
bonding: bond4: Adding slave ib0.8004.
bonding: bond4: Warning: enslaved VLAN challenged slave ib0.8004. Adding VLANs will be blocked as long as ib0.8004 is part of bond bond4
bonding: bond4: enslaving ib0.8004 as a backup interface with a down link.
ib0.8004: enabling connected mode will cause multicast packet drops
ib0.8004: mtu > 2044 will cause multicast packet drops.
ib0.8004: mtu > 2044 will cause multicast packet drops.
bonding: bond3: Adding slave ib0.8006.
bonding: bond3: Warning: enslaved VLAN challenged slave ib0.8006. Adding VLANs will be blocked as long as ib0.8006 is part of bond bond3
bonding: bond3: enslaving ib0.8006 as a backup interface wi
0
 
LVL 76

Expert Comment

by:arnold
ID: 41765291
you keep providing the information you included in your original question. These are log events, please provide the information asked if you would like assistance, answers and resolution of your issue.
0
 
LVL 39

Expert Comment

by:noci
ID: 41765307
The output of the next 3 commands wil be more informative than what has been provided until now:
(though they might invoke requests for more information)

ifconfig -a
cat /proc/net/bonding/*
cat /proc/net/vlan/config

And yes you may obfusciate addresses be make it consistent....
Next addresses need no obfusciation they are private.:
192.168.... , 172.16-31..., 10....   and used in multiple organisations throughout the world in duplicates.

if you change the prefix to xxx.yyy.zzz for all addresses then it will produce a meaningfull listing for f.e.  
a host that has aan address ending .1  ( 1.1.1.1 will change tp xxx.yyy.zzz.1)  that is, until duplicates appear.  (1.1.2.1 should be changed to xxx.yyy.aaa.1 to show this).
0
 

Author Comment

by:mac_g
ID: 41765485
@noci
all the output is attached for your reference. please refer it
1.txt
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 39

Expert Comment

by:noci
ID: 41765561
Right....

Bond0-Bond4 are useful all configured as Active-Backup (meaning only one is active and if the link fails it will switch over the the other link).

bond5 upto bond10 are unused. (not usefull)

Bond0 is based on infiniband adapter0/channel 8008 (ib0.8008) and inifband adapter1/channel 8008 (ib1.8008)    (hardly used)

Bond1 = ethernet adapters with eth1286_2.41 as active.  The 41 might be vlan41 but that is unclear as vlan info in not included in the 1.txt,   (10 Gbps adapters)

bond2 = ib0 & ib1 base adapters (channel 0)     (light use)

Bond3 = ib0.8006 & ib1.8006  (most used)

bond4 = ib0.8004 & ib1.8004 (light use)

In All bonds the first adapter is leading by default, where the other is backup (ie. only one active).
If it fails for 5 seconds it will switch over the the backup link. the link state is checked 4 times per second.

You may get better performance by switching a few of the infiniband bonds so ib1 is active all but the .8006 channel one.
0
 
LVL 39

Expert Comment

by:noci
ID: 41765581
To actualy answer your question: if in a bonded set of interfaces one fails it will be replaced by the surviving ones. (active-backup).
You will need more than just bonded interfaces here, you also need double switches so if one switch fails  (its link will fail) then other switch can take it's place. So the system can still communicate.

Bond may also be configured in other styles active/active: both interfaces are used and adds to the capacity of the total bandwidth. Failure means loosing part of the bandwidth.
A bond may contain more than 2 interfaces btw.

With Active/Active there are more options on how to select which packet leaves over with interface.
For that please check this page for current available modes: http://www.cloudibee.com/network-bonding-modes/
0
 

Author Comment

by:mac_g
ID: 41766506
@noci

1) why some interfaces are configured with IP, some without IP ?

2) Can we put the interface name as we like ?   Or the naming should be based on its use ?
0
 
LVL 39

Expert Comment

by:noci
ID: 41766661
1) why has IF no IP:
Slaves have no IP, they are bound (enslaved) to the bond interface.
bond5..bond10... are unused, no slaves, no config. and can be deleted.

2) Interface naming as you wish
Yes and no....
Bond interface naming is free... but scripting might expect a name like bondX.
Ethernet Interfaces can be renamed, but systemd uses that to create this type of names
Vlan selection is reflected in the interface name. (.xx)

IMHO it is unwise to arbitrarily rename if names. OTOH is can be done, but be aware it might cause issues down the line with scripting for interface management.  (Ethernet interfaces are expected to start with eth...
0
 

Author Comment

by:mac_g
ID: 41766667
@noci,

Thanks so much for the patience.
I am getting more clarity with your answers.


1> when one needs to configure Masters interface & Slave interface ?  
2> Can you give a simple example for such requirements to understand better ?
0
 
LVL 39

Expert Comment

by:noci
ID: 41766757
1) A bond by definition consists of one Master interface (usually bondX X=0,1,2...)
and the slave interfaces that are glued together. ("Physical" interfaces).

The Physical interfaces do the heavylifting of the transportation of packets. The Bond interface is used to manage those interfaces and dispatch packets according to the "Mode" of operation. (See previous provided link).

2) Bonds are mostly used for redundancy so there are no Single points of Failure (SPOF's) w.r.t. network access. It is about High Availability environments resillience against failures.
It involves more than just bonds, it also requires multiple powersupplies, multiple switches, multiple routers, multiple SAN's (with mirrored storage) possibly at separated locations (with 10, 20.. 500Km distance between sites, with 500Km distance one typicaly goes for Disaster Tollerance [ think earth quake, flooding, Hurricanes ] ).
0
 

Author Comment

by:mac_g
ID: 41766790
Thanks for your reply.

I have attached one image where our server env is going to be built on this architecture.
In such case, for the servers from image : ERPDB1 & ERPDB2,

1) what would be best practice to configure the interface, for each server(master & slave)

The above 2-servers connected to 1) Public NW  && 2) connected privately to have communication between them.

Can you please advice
EE-01.png
0
 
LVL 39

Accepted Solution

by:
noci earned 350 total points
ID: 41766884
In such an environment Bonding is not really needed.... There are a lot of SPOFs anyway, effectively only the cabling infrastructure is doubled.
De private NW & Public NW need to be 2 switches EACH. before it makes sense
Also The SAN is a SPOF. and would need doubling to eliminate it as a SPOF. Which also means you will need switches for that network part. (AFAIK Infiniband already should have switches).

Besides that you will need to get you software to make use of this all.
The communication between the system may be required to NOT be a bond.

You need to draw a picture with ALL elements detailed and with failure modes of each element to be able to reduces SPOF's until you reach a design where the remaining resks are known and acceptable.
0
 

Author Comment

by:mac_g
ID: 41768502
thanks @noic ...
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now