打赏

Centos 网卡链路聚合

双网卡聚合

有两块网卡,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
posted @ 2021-07-25 11:17  苍山落暮  阅读(511)  评论(0编辑  收藏  举报