0

I have a 2530 Aruba Switch with 4 ports as LACP trunk connected to QNAP with 4 NICs configured as a 802.3ad dynamic trunk When 2 clients try to write or copy a file to the QNAP each one gets 100 MB/s speed so the aggregation is working and i can see in QNAP resource monitor that two NICs are utilized. But when both clients try to copy from the QNAP, then only one NIC is used and both clients are copying data at 50 MB/s.

Is there anything that could cause such behavior? copying to QNAP is fast and using aggregation but copying from QNAP is not?

Update 1: - Incoming Traffic to QNAP is distributed across more than one NIC (LACP Works) - Outgoing Traffic to QNAP only uses one NIC at all times (LACP not working)

Update 2: cat /proc/net/bonding/bond0

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: slow
Min links: 0
Aggregator selection policy (ad_select): stable

Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 3
Permanent HW addr: 24:5e:be:27:e1:2b
Slave queue ID: 0
Aggregator ID: 4
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 1
Partner Churned Count: 1

Slave Interface: eth3
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 3
Permanent HW addr: 24:5e:be:27:e1:2c
Slave queue ID: 0
Aggregator ID: 4
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 1
mohamed nasr
  • 25
  • 1
  • 6

1 Answers1

0

Link aggregation with LACP always tries to 'pin' each connection to a single NIC to avoid packet reordering. The NIC is selected by hashing the packet's MAC and/or IP addresses (sometimes also TCP/UDP ports). This is always done on the 'sending' side – by the Aruba switch when storing files; by QNAP when retrieving files.

The port selection is deterministic – it doesn't care about current load/usage; the same packet header always selects the same port, and it can happen that packets for both clients get the same hash.

(In particular, when all clients are behind a router, the destination MAC address will be the same and will always hash to the same port.) Make sure the "hash policy" is set to "Layer 2+3 (MAC+IP)" as in documentation:

Screenshot of QNAP configuration screen showing list of Ethernet interfaces

Screenshot of QNAP configuration screen showing 802.3ad hash policies

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
  • I'm using Layer 2+3 (MAC+IP) and in case of incoming traffic the qnap distributes the traffic on more than one NIC but in outgoing traffic the QNAP only uses one NIC even if I change the IP or the VLAN – mohamed nasr Aug 25 '19 at 14:26
  • In case of incoming traffic, the qnap has no say about where it receives the traffic -- it's distributed by the switch. (What hash policy is the switch using?) For outgoing traffic, are you changing the clients' IP addresses? Can you SSH into the server and check in `cat /proc/net/bonding/bond0` whether it's actually using the correct hash policy? – u1686_grawity Aug 25 '19 at 14:31
  • I updated the question for
    cat /proc/net/bonding/bond0 
    text and image
    – mohamed nasr Aug 25 '19 at 14:42