summaryrefslogtreecommitdiffstats
path: root/bonding.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-08-14 21:46:00 +0200
committerSuren A. Chilingaryan <csa@suren.me>2018-08-14 21:46:00 +0200
commit4c5aa0e4c6ca4d537aa66b2c07eeee1c360a906d (patch)
tree55582b12657e5546e85ed9fcb2e3f05944e037a4 /bonding.sh
parentcf72481e866a12fc7138fdc1cf0836426c514498 (diff)
downloadmlx-4c5aa0e4c6ca4d537aa66b2c07eeee1c360a906d.tar.gz
mlx-4c5aa0e4c6ca4d537aa66b2c07eeee1c360a906d.tar.bz2
mlx-4c5aa0e4c6ca4d537aa66b2c07eeee1c360a906d.tar.xz
mlx-4c5aa0e4c6ca4d537aa66b2c07eeee1c360a906d.zip
Fix reloading, add bonding sample
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