CentOS 6 7 双网卡绑定 Bonding 使用 mode 6 带宽无法叠加的问题

2018-03-01 15:55:43 +08:00
 alams
有两台服务器在同一个千兆交换机上,一台 CentOS6,一台 CentOS7,每台服务器都接着两根网线。

我想将两根网线绑定在一起做成能够互通 2000M 的速度。能够在传输文件的时候达到 200M 的速度。

在配置完成后在测试的过程中,使用 scp 和 iperf 都只能达到 1000M 的速度。

****************************************

[root@root ~]# iperf -c 192.168.200.254
------------------------------------------------------------
Client connecting to 192.168.200.254, TCP port 5001
TCP window size: 22.5 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.200.253 port 11080 connected with 192.168.200.254 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1.09 GBytes 940 Mbits/sec


[root@root ~]# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.200.254 port 5001 connected with 192.168.200.253 port 11079
[ 4] 0.0-10.0 sec 1.09 GBytes 939 Mbits/sec


****************************************

CentOS 7

Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: eno1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eno1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 08:94:ef:43:e2:78
Slave queue ID: 0

Slave Interface: eno2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 08:94:ef:43:e2:79
Slave queue ID: 0


CentOS 6

Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 6c:ae:8b:3a:ce:ba
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 6c:ae:8b:3a:ce:bb
Slave queue ID: 0
4700 次点击
所在节点    Linux
5 条回复
asilin
2018-03-01 16:17:11 +08:00
恩,那是因为你没有弄明白 bonding 的用途:只叠加机器的出口带宽(1000M -> 2000M);

你拿两个 bonding 机器之间相互测试带宽,瓶颈都在于每一个机器的入口带宽(1000M),所以不论怎么测,都是 1000M ;

建议看下 kernel 文档中关于 bonding 的部分。
alams
2018-03-01 16:32:01 +08:00
@asilin 我试过用两台服务器往配置了 bonding 的机器发送数据,每台机器的带宽都能达到 1000M。这样表示入口带宽能够达到 2000M,这样相当于是有两个链接。

请问有其他方法可以达到我上面的那种要求在同一个请求里出口和入口的带宽都叠加到 2000M 吗。
br00k
2018-03-01 16:41:01 +08:00
交换机支持链路聚合吗?
alams
2018-03-01 16:43:59 +08:00
@br00k 支持的,试过在 mode 0 的模式下做链路聚合,但也是只能跑 1000M 的速度。 在使用 mode 6 模式的时候就会出现网络异常,同交换机内无法 Ping 通。
gh007
2018-03-02 12:25:42 +08:00

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/433931

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX