添加一个网卡,确定网卡模式相同
创建出一个bond网卡
nmcli connection add type bond con-name bond0 ifname bond0 bond.options "mode=balance-rr"
向bond0设备添加从属网卡
#添加第一块网卡enp0s3,具体名字以自己网卡名字为准
nmcli connection add type ethernet slave-type bond con-name bond0-port1 ifname enp0s3 master bond0
#添加第二块网卡enp0s8,具体名字以自己网卡名字为准
nmcli connection add type ethernet slave-type bond con-name bond0-port2 ifname enp0s8 master bond0
配置bond0设备的网络信息
#配置IP地址和子网掩码
nmcli connection modify bond0 ipv4.addresses 192.168.10.10/24
#配置网关
nmcli connection modify bond0 ipv4.gateway 192.168.10.1
#配置DNS
nmcli connection modify bond0 ipv4.dns 192.168.10.1
#配置搜索域
nmcli connection modify bond0 ipv4.dns-search linuxprobe.com
#手动配置
nmcli connection modify bond0 ipv4.method manual
开始启动,顺便查看参数
#启动bond0
nmcli connection up bond0
#查看参数
nmcli device status