summaryrefslogtreecommitdiffstats
path: root/bonding.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bonding.sh')
-rwxr-xr-xbonding.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/bonding.sh b/bonding.sh
new file mode 100755
index 0000000..cf2f152
--- /dev/null
+++ b/bonding.sh
@@ -0,0 +1,27 @@
+#! /bin/bash
+
+. ip/functions.sh
+
+
+# Modes for balancing input traffic.
+# balance-alb: Does not require switch configuration, but not supported by libvma
+# 802.3ad: Requires switch configuration, but supported by libvma
+
+
+modprobe bonding
+ip link delete bond0
+ip link add bond0 type bond
+ip link set bond0 type bond miimon 100 mode balance-alb
+#ip link set bond0 type bond miimon 100 mode 802.3ad
+
+ip addr flush enp5s0d1
+ip link set enp5s0d1 down
+ip link set enp5s0d1 master bond0
+ip addr flush enp10s0d1
+ip link set enp10s0d1 down
+ip link set enp10s0d1 master bond0
+
+ip link set bond0 up
+ipset bond0 192.168.2.86
+ip link set enp5s0d1 up
+ip link set enp10s0d1 up