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

我有2个Linux机箱运行centos 6.5每个与2接口绑定在一起,链接到Cisco 2960-S交换机与lacpconfiguration的端口。

交换机上的configuration

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 ! 

并在这两个Linux端我已经加载内核绑定模块的configuration

 alias bond0 bonding options bond0 miimon=100 mode=4 lacp_rate=1 

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

configuration有问题吗? 速度不应该翻倍到2Gb / s?

LACP将不会为单个stream/线程跨多个接口分割数据包。 例如,单个TCPstream将总是在相同的NIC上发送/接收数据包。

请参阅以下文章以供参考:

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

希望这可以帮助。

链路聚合的工作方式是使用散列algorithm来决定哪些数据包应该出去哪个端口。

从同一个源MAC地址到同一个目的MAC地址的报文总是从同一个端口出去。

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

这就是为什么当从一台服务器传输文件到另一台服务器时,你只能获得1千兆比特/秒。

如果操作系统和交换机都支持第3层,则可以通过使用多个IP地址来获得更高的速度。 然而,由于哈希algorithm的工作原理,两种stream最终会走出相同的链路的可能性为50/50。

我对networking绑定的理解是,在一个连接中不能超过成员接口的链路速度。 build立后,连接将粘贴到债券中的一个接口。

但是,连接现在在两个接口之间分开。 如果你有两个连接从服务器A运行到服务器B,那么只要有带宽,连接不应该开始彼此缩小,因为它们将跨越不同的接口。 您使用多个连接的总带宽应该是2Gb / s,但每个连接将被限制为最大1Gb / s。

它也值得考虑Linux使用的散列algorithm。 一些版本的债券驱动程序使用非常简单的散列algorithm,例如,linux 3.6.5上的l2 hash只是源MAC和目的MAC最后一个字节的异或,导致在很多情况下stream量不平衡。 将哈希algorithm改为l2 + l3会有很大的帮助。