DLink DAP-2610: Can't get VLANs running

Hi,
I recently got serval D-Link DAP-2610. I tried serval ways to get VLANs running but it does not work.
My configuration:

uname -a ; cat /etc/openwrt_version
Linux OpenWrt 5.4.48 #0 SMP Wed Jul 1 20:19:50 2020 armv7l GNU/Linux
r13674-cbb66f9edb

Network config:


config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'

config interface 'lan'
        option type 'bridge'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option proto 'dhcp'
        option delegate '0'
        option ipv6 'off'
        option ifname 'eth0'

config device 'lan_eth0_dev'
        option name 'eth0'
        option macaddr 'ec:ad:e0:79:a8:70'

config interface 'vlan3'
        option proto 'dhcp'
        option type 'bridge'
        option ifname 'eth0.3'

This will be normally the right way to create a VLAN tag for VLAN 3 on eth0.
If do a tcpdump with a filter for tagged frames on eth0 I get:

tcpdump -nn -e vlan -i eth0
13:39:06.623654 ec:ad:e0:79:a8:70 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 346: vlan 3, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from ec:ad:e0:79:a8:70, length 300

So I see the tagged frame from the dhcp request on eth0 but I can't see any tagged frames outside the AP.
Also I do not see any tagged frames from outside on the AP's tcpdump.

The original dlink firmware supports 8021.q vlans.
Any idea?

I have exactly the same problem and see the same behavior on an Aruba AP-303 (similar platform). Seems like VLAN support is currently broken on snapshot releases. Not sure, but I believe this thread is somewhat related.

Your configuration looks fine and would work well on a device running OpenWrt 19.07.

Does anyone know if this in a known bug?

I can check a snapshot image against vlans with my raspberry when I'm back from work.
I checked the sources from the D-Link original firmware and many vlan related things are precompiled (without source).
Also, the D-Link DAP-2600 uses the ess_edma driver - May be the problems are related to this driver?

1 Like

Good point, I've just installed the latest snapshot release on a Raspberry Pi 2 and Software VLANs work as expected here. So this is not a general problem with current snapshot releases.

Ok, so it's device / driver related, I think. In fact, with tcpdump I receive never any tagged frames on eth0 so this seems to be blocked by the chipset I think.

Finally ... I got it working:
At the chipset descriptions I read about an integrated 5port switch. So I checked witch swconfig:

swconfig list
Found: switch0 - 90000.mdio

swconfig dev switch0 show
(tons of stuff)

At this internal switch, Port 0 and port 5 is active. If I want to add VLAN 3 tagged,
I had to do:

swconfig dev switch0 vlan 3 set ports '0t 5t'

At this point, I can add the vlan as usual in luci networking, adding a bridge for vlan 3 witch interface eth0.3:

network.vlan3=interface
network.vlan3.proto='dhcp'
network.vlan3.type='bridge'
network.vlan3.ifname='eth0.3'

So the only thing what prevented the kernel from getting tagged frames is the integrated switch...

:smiley:

2 Likes

That is interesting, my device does not have an integrated switch and

swconfig list

does not return anything on my device. But I found an interesting commit in master a few minutes ago:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=9da2b567605b0964d921b9ca4f0c9886db4f636d

I will recompile my build and test it, sounds like this could fix my problem.

Summary

Software VLANs are working now on my device with current snapshot builds! :tada:

But unfortunately there seems to be another weird bug. When the software VLAN interface (e.g. eth0.10 is bridged to a wifi interface, then the wifi clients can connect and obtain a DHCP lease, but no other traffic passes through the interface - not even IPv6 auto configuration). I will need to debug this a little more.

Edit: It's completely broken, when you set eth0.10 to a static IP, then no traffic passes through eth0 or eth0.10 anymore. Only DHCP is working initially.

Just for notice:
Since this commit I don't have to do any swconfig, vlans are working out of the box like I have expected before I opened this thread.

Update (many decades later :smiley:):
There were some more changes later, so finally you need swconfig to run VLANs on DAP-2610.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.