-
Notifications
You must be signed in to change notification settings - Fork 1
BondedInterfaces
The 1.0a6 release of KarmaLB introduces support for ethernet bonded interfaces providing high availabilty and / or throughput.
This requires manual configuration from the command line as the root
user.
These instructions assume eth0
is the network interface KLB was installed with and we are creating an active-backup bond of eth0
/eth1
.
- edit the file
/etc/modules-load.d/karmalb.conf
uncommenting thebonding
line to load the kernel module
# Karma Load Balancer modules
# Add any kernel modules required by your installation here
#
# ip_conntrack is required for keeping track of client requests
ip_conntrack
#
# uncomment to enable bonding
bonding
- reload the kernel modules
systemctl restart systemd-modules-load.service
- you can test it's been loaded correctly if the
bonding_masters
file has been created
ls /sys/class/net/bonding_masters
/sys/class/net/bonding_masters
- add the bonding configuration in
/etc/network/interfaces
. Ensure you don't alter the#zenmodified
line or the loopback interface definitions.
#zenmodified
auto lo
iface lo inet loopback
#
# bonding configuation - ensure interfaces are set to manual
# as Karma Load Balancer will manage the IP addressing.
auto bond0
iface bond0 inet manual
bond-mode active-backup
bond-slaves eth0 eth1
bond-primary eth0
bond-miimon 100
- use the
replace-nic.sh
utility script to restart networking and update KLBs network configuration
cd /opt/klb/app/zbin
./replace-nic.sh eth1 bond0
- test the bonding is configured correctly
cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: eth0 (primary_reselect always)
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: xx:xx:xx:xx:xx:xx
Slave queue ID: 0
Slave Interface: eth1
MII Status: down
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: xx:xx:xx:xx:xx:xx
Slave queue ID: 0
- always do a test reboot to ensure the system config files are configured correctly
shutdown -r now
- make a backup of KLB through the GUI.
If your bonding configuration doesn't need to use eth0
, skip step 5 and after the reboot configure the bond using the web GUI itself.
Other bonded configurations such as 802.3ad/LACP are also easily configured. I can add example configurations as requested, but any Debian/Ubuntu document should contain enough information to customise the interfaces
file appropriately.
KLB 1.0a6 adds the following files to backups /etc/network/interfaces
/etc/modprobe.d/karmalb.conf
/etc/modules-load.d/karmalb.conf
however restoring backups on dissimilar configurations (i.e. a bonded config on a non-bonded system) has not been tested (and unlikely to work).