Sunday, February 15, 2015

Linux Ethernet Bonding Driver, on Slackware P1

I've been wanting to utilize the Linux Ethernet Bonding Driver in my lab since I got my hands on a few managed switches that would support trunking. However, although I've bonded fiberchannel HBA network interfaces for our clients servers when I was a Linux Admin (all of the systems in the Phoenix AZ co-location were internetworked using 8g Fiberchannel interfaces. (Storage array's utilized 16G FC, as well as the core infrastructure switches which the clients environments were hosted on.)

However, this was mostly on RHEL 6 systems, some SLES, one (or two Ubuntu servers), and Oracle Enterprise Linux--Oracle's RHEL clone which now goes by Oracle Linux (probably to avoid confusion).

I have to say the majority of the systems I managed w/ RHEL, w/ Oracle Linux coming second. Most of the Oracle Linux systems were actually full blown virtualization servers, utilizing Oracle's proprietary virtualization platform--Oracle VM Server. (Unlike the opensource VirtualBox, VM Server is Oracle's customized version of Xen. In fact all of the Oracle Linux systems were running VM Server to host the clients systems.

Anyways, enough reminiscing. That didn't really help in my current endeavor. Although RHEL has functionality in the /etc/sysconfig/network file to recognize and initiate bonded interfaces, Slackware is not quite there.

In fact according to my findings, there is no built in functionality at all in the network init script--/etc/rc.d/rc.inet1.

So, taking a look at /etc/rc.d/rc.inet1, we can figure out what is going on when the network is initialized. Basically, the author created a few main functions: read network config file (rc.inet1.conf), create logs in system logfile (/var/log/messages), determine interface list (while loop w/ incremental array variable to differentiate between eth0 or eth1), loopback functions (initialize loopback interface), interface functions (the real enchilada of the script--br_open, br_close, if_up, and if_down), gateway function (route command initializes gateway defined in rc.inet1.conf), and finally the main function (case statement which defines the network scripts subcommands: start, restart, up, down, etc...

So, we have to look into the interface functions, specifically if_up. We really don't have to look at the whole thing line by line, simply skimming it will reveal that there is no functionality inherent in this script to initialize a bonded interface as is done in RHEL.

If Slackware is going to really be considered a Server OS, we need to modify this as soon as possible. I've hacked up my own work around, but am not confident in modifying the rc.inet1 network script enough that it will be fullproof (error free, or prone to wacky behavior). I'm willing to try (believe me I've started), but I feel this issue needs to be evaluated by Slackware team (Pat, Rob, Eric, Sudayo, I hope someones reading this.) This could easily be solved by adding function specifically for initializing a bonded interface in the interface functions, and even more important, that rc.inet1.conf can recognize a bonded interface and pass those variables to the main enchilada (rc.inet1).

I've been tried adding my own functions, but I keep overlooking some important steps.. mainly, how to differentiate between whether the script defines a bridge interface (must be created first), or a bonded interface, or if it wishes to bridge a set of bonded interfaces, or if there are no bridges and only bonds are used, to initialize those first while ensuring the slave interfaces are left disabled.

I've considered looking at redhats network init script for ideas, but as I've confessed, I am not confident any modifications I create would work properly.

I really hope the Slackware team considers this suggestion, and realize that it would benefit a large target audience--servers specifically--and aid in Slackware's adoption as a server OS. Especially w/ the RHEL crowd.


To be continued...

No comments:

Post a Comment