您的位置:首页 > 博客中心 > 互联网 >

Centos 网卡链路聚合

时间:2022-05-11 13:04

双网卡聚合

有两块网卡,eth1,eth2,将eth1和eth2进行链路聚合。为什么要进行链路聚合,比如下图,有四台电脑连接一个交换机,交换机的出口带宽为1000Mbps,那么如果四台电脑的带宽同时过来就是4000Mbps,那么瓶颈就在这个交换机了,这里解决方案有两种一种是使用万兆网口,另外一种就是使用链路聚合。
技术图片
解决方案一:使用万兆网卡
技术图片

解决方案二:使用链路聚合
技术图片

技术图片

具体操作如下:

# 添加聚合网卡
nmcli connection add type team con-name team0 ifname team0 config ‘{"runner":{"name":"activebackup"}}‘

# 添加第一块网卡
nmcli connection add type team-slave con-name team-p1 ifname eth1 master team0

# 添加第二块网卡
nmcli connection add type team-slave con-name team-p2 ifname eth2 master team0

# 修改连接的IP
nmcli connection modify team0 ipv4.addresses 192.168.0.11/24

# 启动网卡
nmcli connection up team0

# 查看网卡状态
teamctl team0 state

本类排行

今日推荐

热门手游