RHCE-链路聚合/网卡绑定

mode 1 和mode4

active-SB和802ad

在server上将eth1 和eth2绑定到一起

1 将两块物理网卡 虚拟出一块网卡

nmcli connection add con-name bond0 ifname bond0(这个不存在) type bond mode active-backup miimon 100(100毫秒监测一次) 添加一个类型为bond 的虚拟网卡bond0, 配置文件bond0,模式是A-SB模式,每100ms 监控主备情况

nmcli connection add con-name bond0-port1 ifname eth1 type bond-slave master bond0

nmcli connection add con-name bond0-port2 ifname eth2 type bond-slave master bond0

给虚拟网络网卡添加网络配置

nmcli connection modify bond0 ipv4.addresses 172.25.0.100/24 ipv4.method manual

nmcli connection up bond0

 

查看绑定情况

cat /proc/net/bonding/bond0

 

ip link set eth2 down 

 

type team  RHEL7新加入的绑定模式:

RHCE-链路聚合/网卡绑定_第1张图片

'{"runner":{"name":"activebackup"}}'-----------  注意写法方式

 

nmcli  con add type team con-name team0 ifname team0 config '{"runner":{"name":"activebackup"}}' ip4 192.168.0.101/24

nmcli  con add type team con-name team0 ifname team0 config '{"runner":{"name":"activebackup"}}' ip4 192.168.0.102/24

 

nmcli connection add con-name team0-port1 ifname eth1 type team-slave master team0

nmcli connection add con-name team0-port2 ifname eth2 type team-slave master team0

nmcli connection modify team0 ipv4.addresses      192.168.0.101/24  ipv4.method manual

nmcli connection modify team0 ipv4.addresses      192.168.0.102/24  ipv4.method manual

 

nmcli connection up team0

teamdctl team0 state

你可能感兴趣的:(RHEL7,linux)