绑定2个接口可以使速度加倍吗?

Amm*_*kis 7 bonding lacp etherchannel

我有 2 个运行 centos 6.5 的 linux 机器,每个机器有 2 个绑定在一起的接口,连接到带有 lacp 配置端口的 Cisco 2960-S 交换机。

交换机上的配置

port-channel load-balance src-dst-mac
!
interface Port-channel1
 switchport access vlan 100
 switchport mode access
!
interface Port-channel2
 switchport access vlan 100
 switchport mode access
!
interface FastEthernet0
 no ip address
!
interface GigabitEthernet0/1
 switchport access vlan 100
 switchport mode access
 speed 1000
 duplex full
 spanning-tree portfast
 channel-protocol lacp
 channel-group 1 mode active
!
interface GigabitEthernet0/2
 switchport access vlan 100
 switchport mode access
 speed 1000
 duplex full
 spanning-tree portfast
 channel-protocol lacp
 channel-group 1 mode active
!
interface GigabitEthernet0/3
 switchport access vlan 100
 switchport mode access
 speed 1000
 duplex full
 spanning-tree portfast
 channel-protocol lacp
 channel-group 2 mode active
!
interface GigabitEthernet0/4
 switchport access vlan 100
 switchport mode access
 speed 1000
 duplex full
 spanning-tree portfast
 channel-protocol lacp
 channel-group 2 mode active
!
Run Code Online (Sandbox Code Playgroud)

并且在 linux 双方我已经加载了内核绑定模块的配置

alias bond0 bonding
options bond0 miimon=100 mode=4 lacp_rate=1
Run Code Online (Sandbox Code Playgroud)

现在的问题是,我将许多文件从一台服务器传输到另一台服务器,监控流量图显示速度不超过绑定接口的 1Gb/s 速度bond0

配置有问题吗?速度不应该加倍到 2Gb/s 吗?

Mik*_*lor 11

LACP 不会为单个流/线程跨多个接口拆分数据包。例如,单个 TCP 流将始终在同一个 NIC 上发送/接收数据包。

请参阅以下帖子以供参考:

链路聚合 (LACP/802.3ad) 最大吞吐量

希望这可以帮助。


All*_*ude 6

Link Aggregation 的工作方式是使用散列算法来决定哪些数据包应该从哪个端口出去。

从相同的源 MAC 地址到相同的目标 MAC 地址的数据包将始终从相同的端口出去。

一些链路聚合实现支持使用第 3 层(IP 地址)甚至第 4 层(TCP/UDP 端口号)作为散列的一部分,但这并不常见。

这就是为什么在将文件从一台服务器传输到另一台服务器时只能获得 1 gbit/sec 的原因。

如果操作系统和交换机都支持第 3 层,则可以通过使用多个 IP 地址来获得更高的速度。然而,由于散列算法的工作方式,两个流最终有 50/50 的机会从同一链接出去。