linux下网卡的链路聚合-使我们的系统有条不紊的为客户服务

1.什么是网卡聚合?

ip<----->网卡,怎样保证ip与网卡的一一对应关系永远是好的?

对于客户来说,只需要知道ip通不通,如果网卡坏了,即使ip地址是好的,网也不通
对于运维人员来说,需要保证网卡时刻正常工作
但是一块网卡有可能会坏掉,因此将多个网卡捆绑在一起,一个坏了让另外一个工作
网卡的链路聚合就是将多块网卡连接起来,当一块网卡损坏,网络依旧可以正常运行
可以有效的防止因为网卡损坏带来的损失,同时也可以提高网络访问速度
企业监控,事实检测硬件好不好?坏的继续修,利用好的代替
两个设备同时坏的情况比较少,除非人为
思想:将eth0与eth1链路聚合
网卡的链路聚合一般常用的有"bond""team"两种模式,"bond"模式最多可以添加两块网卡,"team"模式最多可以添加八块网卡

2.实验环境:

(1)打开desktop
(2)配置两块网卡
在这里插入图片描述
在这里插入图片描述

3.bond聚合(bond网络)

Red Hat Enterprise Linux 允许管理员使用 bonding 内核模块和称为通道绑定接口的特殊网络接口将多个网络接口绑定到一个通道
根据选择的绑定模式 , 通道绑定使两个或更多个网络接口作为一个网络接口 , 从而增加带宽和 / 提供冗余性
利用 nmcli 命令管理 bond
步骤一:添加bond聚合的接口

nmcli connection add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.254.100/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看聚和网卡是否添加成功

在这里插入图片描述
步骤三:监控网卡的工作状态

watch -n 1 cat /proc/net/bonding/bond0 

在这里插入图片描述
步骤四:看看bond网络下主被聚合的效果
bond删除

nmcli connection delete bond0
nmcli connection delete eth0
nmcli connection delete eth1

在这里插入图片描述

4.team聚合

添加team聚合接口
监控watch -n 1 teamdctl team0 stat
添加聚合网卡
看team聚合下主备聚合的效果
在这里插入图片描述
在这里插入图片描述

发布了67 篇原创文章 · 获赞 0 · 访问量 519

猜你喜欢

转载自blog.csdn.net/qq_42024433/article/details/103287060