Display existing connections:

# nmcli c s

Delete existing connections automatically created by NetworkManager:

# nmcli con del "Wired connection 1"
# nmcli con del "Wired connection 2"
# nmcli con del eth0
# nmcli con del eth1


BONDING

Create the bonding connection (here, mode 1 is active-backup):

# nmcli con add type bond ifname bond0 con-name bond0 mode 1
or
# nmcli con add type bond ifname bond0 con-name bond0 mode active-backup

Create the 2 slave connections, based on the interface name:

# nmcli con add type bond-slave ifname eth0 con-name eth0 master bond0
# nmcli con add type bond-slave ifname eth1 con-name eth1 master bond0

Configure bond0 connection:

# nmcli con mod bond0 ipv4.addresses "192.168.2.10/24 192.168.2.1" \
			ipv4.dns 192.168.2.200 ipv4.method manual \
			connection.autoconnect yes
# nmcli con up bond0

When bond0 is started, both slave interfaces are started too.


TEAMING

Create the teaming connection:

# nmcli con add type team ifname team0 con-name team0 config '{"runner": {"name": "activebackup"}}'

Create the slave connections:

# nmcli con add type team-slave ifname eth0 con-name eth0 master team0
# nmcli con add type team-slave ifname eth1 con-name eth1 master team0

Edit team0 connection:

# nmcli con mod team0 ipv4.addresses "192.168.2.20/24 192.168.2.1" ipv4.dns 192.168.2.200 ipv4.method manual connection.autoconnect yes
# nmcli con up eth0
# nmcli con up eth1
# nmcli con up team0

Before starting team0, make sure to start the slave interfaces.