配置高级连接(链路聚合)

链路聚合简介:

链路聚合是将两个或更多数据信道结合成一个单个的信道,该信道以一个单个的更高带宽的逻辑链路出现。链路聚合一般用来连接一个或多个带宽需求大的设备,例如连接骨干网络的服务器或服务器群。

下面演示虚拟网卡的步骤以及为其网卡添加设备成员,创建迷你版的集群虚拟化网卡。

1、虚拟网卡

[root@localhost ~]# nmcli connection add type team autoconnect yes con-name team0 ifname team0 config '{"runner": {"name": "activebackup"}}'
连接“team0”(af23d653-3072-48ac-b55d-ad53484fa1e4) 已成功添加。
#nmcli connection 连接网络
#add type team 添加类型为team类型的设备
#autoconnect yes 开机启动
#con-name team0 配置文件名为team0
#ifname team0 网卡显示名字为team0
#config '{"runner": {"name": "activebackup"}}'  team0网卡内部成员工作模式

2、为team0添加成员

[root@localhost ~]# nmcli connection add type team-slave con-name team0-1 ifname eth1 master team0
连接“team0-1”(a8f8637b-1e4f-4e9b-a130-b81eca87670b) 已成功添加。
#nmcli connection add type team-slave 添加类型为team-slave的设备
#con-name team0-1 配置文件名为team0-1
#ifname 网卡名为eth1
#master team0 主设备为team1

3、配置team0的IP地址

[root@localhost ~]# nmcli connection modify team0 ipv4.method manual ipv4.addresses '172.25.0.6/24' connection.autoconnect yes
#跟配置ipv4的方法一样

4、激活虚拟网卡以及其成员

[root@localhost ~]# nmcli connection up team0   #激活team0网卡
成功激活(主服务器等待从服务器)连接(D-Bus 激活路径:/org/freedesktop/NetworkManager/ActiveConnection/9)
[root@localhost ~]# nmcli connection up team0-1 #激活team0-1网卡

5、查看虚拟网卡的信息

[root@localhost ~]# teamdctl team0 state
#查看team0信息 

6、删除虚拟网卡

[root@localhost ~]# nmcli connection delete team0
#删除team0这张网卡

猜你喜欢

转载自blog.csdn.net/vincen123/article/details/81749289