作用:链路聚合可以提供冗余性以及带宽吞吐量
1 cd /etc/sysconfig/network-scripts/
在这个目录下 vim ifcfg-team0,来创建聚合口,写入以下内容
DEVICE=team0
NAME=team0 DEVICETYPE=team
TEAM_CONFIG='{"runner":{"name":"activebackup"}}'
ONBOOT=yes
BOOTPROTO=none
IPADDR0=172.25.0.20
PREFIX0=24
2创建聚合口关联口
vim ifcfg-team0-eno1,写入
DEVICE=eno1
NAME=team0-eno1
DEVICETYPE=TeamPort
TEAM_MASTER=team0
ONBOOT=yes
vim ifcfg-team0-eno2,写入
DEVICE=eno2
NAME=team0-eno2
DEVICETYPE=TeamPort
TEAM_MASTER=team0
ONBOOT=yes
3重新启动网络
systemctl restart network (redhat7)
service network restart(redhat7前版本)
然后 ip addr show team0 看稀奇team0配置情况
4最后命令
teamctl team0 state 显示如下:
setup: runner: activebackup
ports:
eno1
link watches:
link summary: up instance[link_watch_0]:
name: ethtool link:up
eno2
link watches:
link summary: up instance[link_watch_0]:
name: ethtool link:up
runner:
active port: eno1