我在我的一个服务器(称为server1)的
但是当我在server1上使用
我还尝试将模式更改为
/etc/network/interfaces
文件中有以下内容。在另一台服务器(称为server2)上,/etc/network/interfaces
的内容是相似的,只是MAC地址相应地更改了,并且IP地址更改为192.168.2.2。这两台服务器都安装了Ubuntu 13.10。但是当我在server1上使用
iperf -s
命令,并使用iperf -c 192.168.2.1
测试速度时,我只能获得大约10Gbps的速度(单个网卡的速度)。我的交换机配置为二层交换机。有人知道如何通过绑定来实现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
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
我还尝试将模式更改为
balance-alb
和balance-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