linux----team bond

Team和Bond 0功能类似

Team不需要手动加载相应内核模块

          有更强的拓展性,支持八块网卡。

1,添加team0:nmcli connection add con-name team0 ifname team0 type team config 

  '{"runner":{“name”:"activebackup"}}=' ip4 172.25.254.120/24

2.监控: watch -n 1 teamdctl  team0 stat

3.添加eth1:nmcli connection add con-name eth1 ifname eth1 type team-slave master team0


此时监控可看,可以ping 通

4.添加eth0:nmcli connection add con-name eth0 ifname eth0 type team-slave master team0


5.查看设备

6.挂掉eth0:ifconfig eth0 down


 依旧可以ping通,但是监控中可以看出eth1 运行,
7,启动eth0: ifconfig eth0 up

8.删除设备  nmcli connection delet bond0/eth0/eth1

9.查看设备 nmcli connection show

二。以文件的方式配置

1,编写文件 vim /etc/sysconfig/network-scripts/ifcfg-team0

DEVICE=team0 设备名
TEAM_CONFIG=“{\"runner\":{\"name\":\"activebackup\"}}”配置
DEVICETYPE=Team 类型
BOOTPROTO=none
IPADDR0=172.25.254.120
PREFIX0=24
NAME=team0
ONBOOT=yes


2.编写eth0 vim  /etc/sysconfig/network-scripts/ifcfg-eth0


BOOTPROTO=none
DEVICE=eth0
ONBOOT=yes
TEAM_MASKTER=team0
TYPE=TeamPort

 


4,编写eth1 vim  /etc/sysconfig/network-scripts/ifcfg-eth1


BOOTPROTO=none
DEVICE=eth1
ONBOOT=yes
TEAM_MASKTER=team0
TYPE=TeamPort


5,重启网络: systemctl restart network


6,监控:watch -n 1  teamdctl team0 stat

猜你喜欢

转载自blog.csdn.net/xys2333/article/details/84330981