什么是网卡聚合
思想:将eth0与eth1链路聚合
网卡的链路聚合一般常用的有"bond"和"team"两种模式,"bond"模式最多可以添加两块网卡,"team"模式最多可以添加八块网卡.
bond聚合
Red Hat Enterprise Linux 允许管理员使用 bonding 内核模块和称为通道绑定接口的特殊网络接口将多个网络接口绑定到一个通道
根据选择的绑定模式 , 通道绑定使两个或更多个网络接口作为一个网络接口 , 从而增加带宽和 / 提供冗余性
利用 nmcli 命令管理 bond
(1)配置server主机为双网卡主机并删除所有在用的网卡接口
(2)添加bond聚合的接口
nmcli connection add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.254.114/24
添加两块网卡
nmcli connection add con-name eth0 ifname eth0 type bond-slave master bond0
nmcli connection add con-name eth1 ifname eth1 type bond-slave master bond0
nmcli connection show看聚和网卡是否添加成功
采用聚合方式当网卡坏了客户不会有任何感觉
team聚合
(1)删除之前的bond聚合
(2)nmcli connection add con-name team0 type team ifname team0 config '{"runner":{"name":"activebackup"}}' ip4 172.25.254.114/24
添加聚合网卡
nmcli connection add con-name eth0 ifname eth0 type team-slave master team0
nmcli connection add con-name eth1 ifname eth1 type team-slave master team0