Linux 下 lacp bond 模式的疑问

2017-04-24 08:08:39 +08:00
 shom
Transmit Hash Policy 无论是 layer2 layer2+3 layer3+4 流量只走端口 1 ,如果有另一台设备连接才会走端口 2
我想问一下是哪里配置错了吗?

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

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2+3 (2)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable
System priority: 65535
System MAC address: 1c:98:ec:0e:11:08
Active Aggregator Info:
Aggregator ID: 1
Number of ports: 2
Actor Key: 9
Partner Key: 77
Partner Mac Address: 80:c1:6e:d0:b4:f0

Slave Interface: eno1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 1c:98:ec:0e:11:08
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
system priority: 65535
system mac address: 1c:98:ec:0e:11:08
port key: 9
port priority: 255
port number: 1
port state: 63
details partner lacp pdu:
system priority: 46320
system mac address: 80:c1:6e:d0:b4:f0
oper key: 77
port priority: 0
port number: 1
port state: 61

Slave Interface: eno2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 1c:98:ec:0e:11:09
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
system priority: 65535
system mac address: 1c:98:ec:0e:11:08
port key: 9
port priority: 255
port number: 2
port state: 63
details partner lacp pdu:
system priority: 46320
system mac address: 80:c1:6e:d0:b4:f0
oper key: 77
port priority: 0
port number: 2
port state: 61
5664 次点击
所在节点    Linux
3 条回复
ceyes
2017-04-24 10:26:00 +08:00
是怎么“确认”流量只走端口 1 的呢?
记得一个 TCP stream 是不会被分发到多个 NIC 上的,始终走同一个 NIC (我认为不然的话开销太大,得不偿失)。
你试试多个 TCP stream ,多个不同的目标地址。

Ref:
- https://serverfault.com/questions/569721/can-bonding-2-interfaces-double-the-speed
- https://serverfault.com/questions/569060/link-aggregation-lacp-802-3ad-max-throughput/569125#569125
shom
2017-04-24 12:24:24 +08:00
@ceyes HP 的交换机 web 界面可以看每个端口的流量,用 iperf 测试的;同样的物理连接 Linux 下配置 mode=0(balance-rr)是可以正常负载均衡的
shom
2017-04-24 12:40:15 +08:00
@ceyes 看来是我对 LACP 的理解有点问题(捂脸中)

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

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

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

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

© 2021 V2EX