为什么绑定不能提高网速?

use*_*739 7 network-bonding 13.10

我的/etc/network/interfaces其中一台服务器(比如 server1)中有以下内容。在另一台服务器上(比如 server2)。内容/etc/network/interfaces类似。除了mac地址相应更改,ip地址更改为192.168.2.2。两台服务器上都安装了 Ubuntu 13.10。

但是当我iperf -s在server1上使用并iperf -c 192.168.2.1测试速度时。我只能获得大约 10Gbps 的速度(单个 NIC 的速度)。我的交换机配置为第 2 层交换机。有人知道如何通过绑定使速度达到20Gbps吗?谢谢。

auto em1
iface em1 inet manual
hwaddress ether c8:1f:66:e2:90:43
bond-master bond0

auto em2
iface em2 inet manual
hwaddress ether c8:1f:66:e2:90:45  
bond-master bond0

auto bond0
iface bond0 inet static
address 192.168.2.1
netmask 255.255.255.0
network 192.168.2.0
bond-mode 4
bond-miimon 100
bond-lacp-rate 1
bond-slaves em1 em2
Run Code Online (Sandbox Code Playgroud)

的输出iperf如下。

server2:~$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.2.2 port 5001 connected with 192.168.2.1 port 34014
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  11.0 GBytes  9.41 Gbits/sec

server1:~$ iperf -c 192.168.2.2
------------------------------------------------------------
Client connecting to 192.168.2.2, TCP port 5001
TCP window size: 22.9 KByte (default)
------------------------------------------------------------
[  4] local 192.168.2.1 port 34014 connected with 192.168.2.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  11.0 GBytes  9.41 Gbits/sec
Run Code Online (Sandbox Code Playgroud)

我还尝试将模式更改为balance-albbalance-rr。但它们也不会导致性能的提高。有人知道调试问题吗?谢谢。

auto bond0
iface bond0 inet static
address 192.168.2.1
netmask 255.255.255.0
network 192.168.2.0
#bond-mode balance-rr
bond-mode balance-alb
bond-miimon 100
bond-slaves em1 em2
Run Code Online (Sandbox Code Playgroud)

小智 4

要通过 LACP 绑定(模式 4)达到约 20Gbps 的传输带宽,需要将服务器连接到多个客户端,一个客户端的最大传输速度限于单个通道的速度(在该模式下,每个客户端的最大传输速度为 10Gbps)上述情况)。LACP“不增加单个会话的带宽”;LACP“仅在进行多个同时对话时才实现高利用率”,如大师演示中的幻灯片 7 所示: http://www.ieee802.org/3/hssg/public/apr07/frazier_01_0407.pdf和这里同样的问题: https: //serverfault.com/questions/569060/link-aggregation-lacp-802-3ad-max-throughput/569125#569125


nux*_*nux 0

ifenslave 用于将从属网络接口附加到绑定设备或将其分离。

要安装它:

对于 Ubuntu 12.04 及更早版本

sudo apt-get install ifenslave
Run Code Online (Sandbox Code Playgroud)

配置它:

此链接将对您有所帮助:链接

您应该注意到,某些绑定模式需要特殊的交换机支持。