FreeBSD 10-stable (r274577) LACP / IEEE 802.3ad with TP-Link TL-SG2008 - not working
David P. Discher
dpd at dpdtech.com
Thu Dec 18 01:09:32 UTC 2014
On Dec 15, 2014, at 11:33 AM, Alan Somers <asomers at freebsd.org> wrote:
> On Sun, Dec 14, 2014 at 6:23 PM, David P. Discher <dpd at dpdtech.com> wrote:
>>
>> So, I think I’ve identified the issue. In sys/net/ieee8023ad_lacp.c, lacp_pdu_input() has a sanity check :
>>
>> if (m->m_pkthdr.len != sizeof(*du)) {
>> goto bad;
>> }
>>
>> I added some debugging information in if_lagg, and ran with it. The lacpdu packet that being sent by the TP-Link switch is 4 bytes longer than the FreeBSD "struct lacpdu du”.
>>
>> em1: lacp_pdu_input-sizeof(du) bad m_pkthdr.len=128 sizeof(du)=124
>>
>> My packet captures shows the packet size differing as well.
>>
>> I’m still poking around. I’ve been trying to look for the official LACPDU binary/wire format … if someone can point me to the reference for that, that would be helpful (at least my own understanding).
>
> Try here:
> http://standards.ieee.org/findstds/standard/802.1AX-2008.html
>
Thanks - I hadn’t seen the “free” version from IEEE, and may looking into that later. However, I think my time with messing around with this switch and lagg is just about over.
I did get FreeBSD to work with LACP in this Switch. I hacked in the 4 extra bytes in struct lacpdu in src/sys/net/ieee8023ad_lacp.h
Index: ieee8023ad_lacp.h
===================================================================
--- ieee8023ad_lacp.h (revision 275779)
+++ ieee8023ad_lacp.h (working copy)
@@ -151,6 +151,7 @@
struct lacp_collectorinfo ldu_collector;
struct tlvhdr ldu_tlv_term;
uint8_t ldu_resv[50];
+ uint8_t tplink[4];
} __packed;
/*
This work great and without any issue. All the defaults with 10-stable (r275778) and recent version of -head with this one line made it work. Of course, this will likely break FreeBSD with all other switches LACP.
However, what I have also discovered this this switch is unlike FreeBSD which lagghash includes L4, the switch only seems to hash over SRC+DST IP or SRC+DST MAC. Which makes it pretty much just sends all the traffic down one link from the switch. So for my particular use case with a small set of hosts, this switch is not useful for me.
I would not recommend the TP-Link TL-SG2008 8-Port Gigabit Smart Switch for use with FreeBSD … or for any use with LACP that is expecting increased throughput for a small set of hosts.
-
David P. Discher
http://davidpdischer.com/
AIM: DavidDPD | Y!M: daviddpdz
More information about the freebsd-net
mailing list