summaryrefslogtreecommitdiffstats
path: root/bonding.sh
blob: cf2f1525706859ce4e7a9be388a64940e6115d82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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