#!/bin/bash

SLAVE1="enp0s9"
SLAVE2="enp0s10"

# п.2
lsmod | grep bonding || modprobe bonding

# п.3
nmcli con add type bond ifname bond007 con-name bond007 \
    bond.options "mode=balance-rr,miimon=100" \
    ipv4.method auto

nmcli con add type ethernet ifname "$SLAVE1" master bond007 con-name bond007-slave1
nmcli con add type ethernet ifname "$SLAVE2" master bond007 con-name bond007-slave2

# п.4
nmcli con up bond007
nmcli con up bond007-slave1
nmcli con up bond007-slave2

ip addr show bond007
ip -brief link show

# п.5
cat /proc/net/bonding/bond007

# п.6
cat /proc/net/dev
