nmcli connection add con-name bond0 type bond ifname bond0 mode 802.3ad
nmcli connection modify bond0 ipv4.addresses 192.168.1.20/24 ipv4.gateway 192.168.1.1 ipv4.method manual connection.autoconnect yes
添加SLAVE接口到bond0
(这里em1和em2是网卡名称)
nmcli connection add type bond-slave ifname em1 master bond0
nmcli connection add type bond-slave ifname em2 master bond0
开启BOND0设备:
nmcli connection up bond0
查看bond是否已经生效
nmcli connection show
cat /proc/net/bonding/bond0