配置链路聚合,热备份

配置链路聚合,热备份

链路聚合的优势,备份网卡设备
team,聚合链接(也称链路聚合)
由多块网卡(team-slave)一起组件而成的虚拟网卡,即"组队"
作用:热备份(activebackup)链接冗余.
[[email protected] ~]# nmcli connection add type team con-name team0 ifname team0 autoconnect yes config “{“runner”: {“name”: “activebackup”}}”
Connection ‘team0’ (c692a0ba-c20a-43c6-bad5-e48734945b85) successfully added.
配置链路聚合,热备份
高亮字段可进行man帮助获取
man teamd.conf
在末行模式进行搜索
/example
配置链路聚合,热备份
也可以直接手写配置文件
[[email protected] ~]# vim /etc/sysconfig/network-scripts/ifcfg-team0
2.添加成员
[[email protected] ~]# nmcli connection add type team-slave con-name team0-1 ifname eth1 autoconnect yes master team0
Connection ‘team0-1’ (37fa749f-c992-4ec3-9101-e45b4a3245e5) successfully added.
[[email protected] ~]# nmcli connection add type team-slave con-name team0-2 ifname eth2 autoconnect yes master team0
Connection ‘team0-2’ (a1cd3ee9-6296-4b63-ae5a-4809ae304f3d) successfully added.
配置链路聚合,热备份
3.配置ip地址
[[email protected] ~]# nmcli connection modify team0 ipv4.method manual ipv4.addresses ‘192.168.2.1/24’ connection.autoconnect yes
4.启动网卡
[[email protected] ~]# nmcli connection up team0
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/13)
[[email protected] ~]# nmcli connection up team0-1
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/16)
[[email protected] ~]# nmcli connection up team0-2
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/17)
[[email protected] ~]# teamdctl team0 state #专门查看team0信息的命令
[[email protected] ~]# nmcli connection delete team0 #如果**失败,删除所有配置重新再来
[[email protected] ~]# nmcli connection delete team0-1
[[email protected] ~]# nmcli connection delete team0-2