SO Setup - First attempt at bonding

This commit is contained in:
Mike Reeves
2018-09-14 15:25:50 -04:00
parent 93d85d6ef8
commit 07f2fed5c0

View File

@@ -148,13 +148,24 @@ create_bond() {
# Do something different based on the OS # Do something different based on the OS
if [ $OS == 'centos' ]; then if [ $OS == 'centos' ]; then
alias bond0 bonding modprobe --first-time bonding
mode=0 touch /etc/sysconfig/network-scripts/ifcfg-bond0
# Create Bond files for the selected monitor interface - TODO echo "DEVICE=bond0" >> /etc/sysconfig/network-scripts/ifcfg-bond0
for BNIC in ${BNICS[@]}; do echo "NAME=bond0" >> /etc/sysconfig/network-scripts/ifcfg-bond0
echo "blah" echo "Type=Bond" >> /etc/sysconfig/network-scripts/ifcfg-bond0
done echo "BONDING_MASTER=yes" >> /etc/sysconfig/network-scripts/ifcfg-bond0
echo "BOOTPROTO=none" >> /etc/sysconfig/network-scripts/ifcfg-bond0
echo "BONDING_OPTS=\"mode=0\"" >> /etc/sysconfig/network-scripts/ifcfg-bond0
# Create Bond configs for the selected monitor interface
for BNIC in ${BNICS[@]}; do
sed -i 's/ONBOOT=\"no\"/ONBOOT=\"yes\"/g' /etc/sysconfig/network-scripts/ifcfg-$BNIC
echo "MASTER=bond0" >> /etc/sysconfig/network-scripts/ifcfg-$BNIC
echo "SLAVE=yes" >> /etc/sysconfig/network-scripts/ifcfg-$BNIC
done
nmcli con reload
systemctl restart networking
else else
# Need to add 17.04 support still # Need to add 17.04 support still