我们在 UBUNTU 20.04 NIC 绑定 LACP 802.3ad 时遇到了问题。两个 100G NIC 端口通过 netplan 绑定,设置是 - MTU 9216、哈希策略 2+3、LACP 快速,并且从 100G 交换机配置相同。
我们使用了iperf
多达 24 个多处理器线程,但nload
测试显示只有一个 NIC 接口已饱和,即 92Gbps,并且从未超过该值。请分享您的想法。(附上一些屏幕截图)
Ethernet Channel Bonding Driver: v5.15.0-91-generic
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
Peer Notification Delay (ms): 0
802.3ad info
LACP active: on
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable
Slave Interface: ens1f1np1
MII Status: up
Speed: 100000 Mbps
Duplex: full
Link Failure Count: 4
Permanent HW addr: 04:3f:72:c3:cb:81
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
Slave Interface: ens1f0np0
MII Status: up
Speed: 100000 Mbps
Duplex: full
Link Failure Count: 2
Permanent HW addr: 04:3f:72:c3:cb:80
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0'''
netplan:
'''network:
ethernets:
ens2f0np0:
mtu: 9216
dhcp4: true
dhcp6: false
ens1f0np0:
dhcp4: false
dhcp6: false
mtu: 9216
ens1f1np1:
mtu: 9216
dhcp4: false
dhcp6: false
bonds:
bond2:
mtu: 9216
parameters:
mode: 802.3ad
transmit-hash-policy: layer2+3
lacp-rate: fast
mii-monitor-interval: 100
答案1
回答我的问题,请在交换机绑定接口和服务器绑定接口之间添加相同的哈希算法。例如,如果交换机配置为 3+4 传输哈希策略,则在服务器操作系统中保持相同。
设置哈希策略的命令:
echo layer3+4 > /sys/class/net/bond3/bonding/xmit_hash_policy
谢谢,Aagi