必须存在两张真实网卡
systemctl status NetworkaManager ##bond服务
nmcli connection show
nmcli connection delete "system eth0"
nmcli connection show
watch cat /proc/net/bonding/bond0 做测试
nmcli connection add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.254.129/24
nmcli connection add con-name eth0 ifconame eth0 type bond-slave master bond0
nmcli connection add con-name eth1 ifname eth0 type bond-slave master bond0
ifconfig eth0 down
ifconfig eth0 up
ifconfig eth1 down
ifconfig eth1up
删除
nmcli connection delete bond0/eht0/eth1
nmcli connection add con-name team0 ifname team0 type team config '{"runner":{"name":"activebackup"}}' ip4 172.25.254.129/24
nmcli connection add con-name eth0 ifname eth0 type team-slave master team0
nmcli connection add con-mame eth1 ifname eth1 type team-slave master team0
查看teamdctl team0 stat(分别关闭eth0和eth1查看效果)
删除nmcli connection delete team0/eth0/eth1
桥接
编辑vim ifcfg-name
BOOTPROTO=none
DEVICE=enp0s25
ONBOOT=yes
BRIDGE=br0
新建文件
vim ifcfg-br0
DEVICE=br0
BOOTPROTO=none
TYPE=Bridge
IPADDR=172.25.254.29
PREFIX=24
ONBOOT=yes
2.brctl addbr br0
ifconfig br0 172.25.254.129/24
brctl addif br0 eth0
brctl show
ping 172.25.254.29
删除
brctl delif br0 eth0
ifconfig br0 down
brctl delbr br0