码迷,mamicode.com
首页 > 其他好文 > 详细

team

时间:2017-05-24 10:15:01      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:team

  #####team######
1.
team也是链路聚合的一种方式。最多支持8块网卡
Team 接口:
Team 和 bond0 功能类似
Team 不需要手动加载相应内核模块
Team 有更强的拓展性
– 支持 8 快网卡
支持模式:
broadcast     广播容错
roundrobin    轮询
activebackup   主备
loadbalance  负载均衡
2.
配置

 nmcli connection add con-name team0ifname team0 type team config‘{"runner":{"name":"activebackup"}}‘ ip4172.25.254.144/24
 ####添加team 运行模式为主备
nmcli connection add con-name eth0 ifname eth0 type team-slave masterteam0  ####给team添加网卡eth0
nmcli connection add con-name eth1 ifname eth1 type team-slave masterteam0   ###给team添加网卡eth1
3
测试

watch -n 1 teamdctl team0 stat  ###监视team0的运行状态
ifconfig eth0 down  ####控制eth0挂掉
ifconfig eth0 up     ####控制eth0恢复
ifconfig eth1 down   ####控制eth1挂掉
ifconfig eth1 up      ####控制eth1恢复

做之前必须要有两块及以上网卡。重置虚拟机.用命令nm-connection-editor删除eth0原有IP。
第一个界面
1 ifconfig   ####查看网络
2 nmcli connection add con-name team0 ifname team0 type team config‘{"runner":{"name":"activebackup"}}‘ ip4172.25.254.144/24
 ####添加team 运行模式为主备

技术分享

3 nmcli connection add con-name eth0 ifname eth0 type team-slave masterteam0  ####给team添加网卡eth0

技术分享

4 nmcli connection add con-name eth1 ifname eth1 type team-slave masterteam0   ###给team添加网卡eth1

技术分享

5  ifconfig

技术分享

6  watch -n 1 teamdctl team0 stat

技术分享

第二个界面
ping 172.25.254.44

技术分享

第三个界面
ifconfig eth0 down  ####控制eth0挂掉
ifconfig eth0 up     ####控制eth0恢复
ifconfig eth1 down   ####控制eth1挂掉
ifconfig eth1 up      ####控制eth1恢复
ifconfig eth0 down  ####控制eth0挂掉
ifconfig eth1 down   ####控制eth1挂掉
eth0 挂掉 eth1运行;eth0恢复,eth1运行;eth1挂掉,才会换eth0运行
两张都挂掉,ping不通
技术分享

######删除team0######
   13 nmcli connection delete team0
   14 nmcli connection delete eth0
   15 nmcli connection delete eth1
   16 nmcli connection show


team

标签:team

原文地址:http://12778805.blog.51cto.com/12768805/1928791

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!