2*NIC Active-Backup Mode Bonding
nmcli
Network Manager Command-Line-Interface
$ nmcli --help
---
Usage: nmcli [OPTIONS] OBJECT { COMMAND | help }
OPTIONS
-t[erse] terse output
-p[retty] pretty output
-m[ode] tabular|multiline output mode
-c[olors] auto|yes|no whether to use colors in output
-f[ields] <field1,field2,...>|all|common specify fields to output
-g[et-values] <field1,field2,...>|all|common shortcut for -m tabular -t -f
-e[scape] yes|no escape columns separators in values
-a[sk] ask for missing parameters
-s[how-secrets] allow displaying passwords
-w[ait] <seconds> set timeout waiting for finishing operations
-v[ersion] show program version
-h[elp] print this help
OBJECT
g[eneral] NetworkManager's general status and operations
n[etworking] overall networking control
r[adio] NetworkManager radio switches
c[onnection] NetworkManager's connections
d[evice] devices managed by NetworkManager
a[gent] NetworkManager secret agent or polkit agent
m[onitor] monitor NetworkManager changes
---
2*NIC Active-Backup Mode Bonding
$ nmcli d
---
DEVICE TYPE STATE CONNECTION
ens33 ethernet connected ens33
ens34 ethernet disconnected --
ens35 ethernet disconnected --
lo loopback unmanaged --
---
$ nmcli connection modify ens34 connection.autoconnect no
$ nmcli connection modify ens35 connection.autoconnect no
$ nmcli connection add type bond con-name bond0 ifname bond0 mode active-backup
---
Connection 'bond0' (7bfe221e-646e-420f-8fff-0a0d86d90d3c) successfully added.
---
$ nmcli d
---
DEVICE TYPE STATE CONNECTION
ens33 ethernet connected ens33
bond0 bond connecting (getting IP configuration) bond0
ens34 ethernet disconnected --
ens35 ethernet disconnected --
lo loopback unmanaged --
---
$ nmcli connection add type bond-slave ifname ens34 master bond0
---
Connection 'bond-slave-ens34' (a574ae0e-91cc-4251-ae08-e4a280407869) successfully added.
---
$ nmcli connection add type bond-slave ifname ens35 master bond0
---
Connection 'bond-slave-ens35' (9285c100-e32f-46db-9571-b9f5d2f37b4b) successfully added.
---
$ nmcli connection modify bond0 ipv4.method manual connection.autoconnect yes ipv4.address 10.10.10.40/24 ipv4.gateway 10.10.10.2 ipv4.dns 10.10.10.2
$ nmcli connection modify bond0 +bond.options primary=ens34 +bond.options miimon=100 +bond.options updelay=0 +bond.options downdelay=0
$ nmcli d
---
DEVICE TYPE STATE CONNECTION
bond0 bond connected bond0
ens33 ethernet connected ens33
ens34 ethernet connected bond-slave-ens34
ens35 ethernet connected bond-slave-ens35
lo loopback unmanaged --
---
$ systemctl restart network