VLAN on D-Link DAP-1325

I am running a D-Link DAP-1325 as dumb AP and am now experimenting and learning about VLANs.
I am attempting to extend the VLANs from my main router to the D-Link with bridging, so far without success.
It looks like the D-Link supports VLANs but only with DSA, which I do not fully understand yet.

Am I expecting too much from this limited hardware, or should the above be possible?

It should be possible.

What are the VLAN IDs that you are tying to add to the 1325?

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network

Thanks, just knowing that it should be possible helps. At least I am only fighting my own limited understanding and not the impossible. :slight_smile:

On the main router I have:
VLAN ID 1 as LAN
VLAN ID 2 as WAN
VLAN ID 3 as Guest
VLAN ID 4 as IoT
This is configured on the switch in Luci, i.e. using swconfig

I want to get 1 & 3 on the AP.
So far I have only tried to get VLAN 1 (LAN) extended to the AP, but all my attempts so far have resulted in loosing access to the AP. :frowning:

I will post the configs later today.
Do you need it for both the router and AP or only the AP?

both would be best -- this way we can verify that the router is configured properly, too.

1 Like

My Physical setup:
Router LAN port 1 cabled directly to Dumb-AP (AP only has one port)
Router LAN port 2 cabled directly to PC1
Wifi disabled on Router for now to ensure that PC2 is connected via Wifi to Dumb-AP

Router:

root@router:/etc/config# ubus call system board
{
        "kernel": "5.15.150",
        "hostname": "router",
        "system": "Qualcomm Atheros QCA956X ver 1 rev 0",
        "model": "TP-Link Archer A7 v5",
        "board_name": "tplink,archer-a7-v5",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.3",
                "revision": "r23809-234f1a2efa",
                "target": "ath79/generic",
                "description": "OpenWrt 23.05.3 r23809-234f1a2efa"
        }
}

*network:*
config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd8d:4f98:989a::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.1'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'eth0.2'
        option macaddr '5c:a6:e6:b8:7d:85'

config interface 'wan'
        option device 'eth0.2'
        option proto 'dhcp'
        option hostname '*'

config interface 'wan6'
        option device 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0t 2 3 4 5'
        option vid '1'
        option description 'LAN'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0t 1'
        option vid '2'
        option description 'WAN'

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '3'
        option ports '0t 2t 3t 4t 5t'
        option description 'Guest'

config switch_vlan
        option device 'switch0'
        option vlan '4'
        option ports '0t 2t 3t 4t 5t'
        option vid '4'
        option description 'IoT'

config device
        option type 'bridge'
        option name 'br-Guest'
        list ports 'eth0.3'
        option mtu '1500'
        option macaddr '5C:A6:E6:B8:7D:84'

config device
        option type 'bridge'
        option name 'br-IoT'
        list ports 'eth0.4'
        option mtu '1500'
        option macaddr '5C:A6:E6:B8:7D:84'

config interface 'Guest'
        option proto 'static'
        option device 'br-Guest'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'

config interface 'IoT'
        option proto 'static'
        option device 'br-IoT'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'

Dumb AP:
Note this is without any VLAN config on the AP.
I am using the Web GUI (Luci) and when my incorrect network / VLAN config is applied, PC1 looses connection with the dumb AP. Thus my changes have all been reverted, without being able to see what my Luci settings look like in the network config.

root@dumb-ap:/etc/config# ubus call system board
{
        "kernel": "5.10.176",
        "hostname": "dumb-ap",
        "system": "MediaTek MT7628AN ver:1 eco:2",
        "model": "D-Link DAP-1325 A1",
        "board_name": "dlink,dap-1325-a1",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "22.03.5",
                "revision": "r20134-5f15225c1e",
                "target": "ramips/mt76x8",
                "description": "OpenWrt 22.03.5 r20134-5f15225c1e"
        }
}

*network*:
config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd56:9895:fba3::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'dhcp'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '0'

Screen shots of what I tried in Luci for the dumb AP:

I left the switch default:

Any assistance will be appreciated. :slight_smile:

Before we do anything on the AP, let's update it to 23.05.3 -- the latest version.

https://firmware-selector.openwrt.org/?version=23.05.3&target=ramips%2Fmt76x8&id=dlink_dap-1325-a1

When you do the upgrade, allow the device to reset to defaults by unchecking the "keep settings" box.

When the upgrade is complete, post the latest network config file (default, or very nearly so -- feel fee to change the LAN IP/proto as you have done).

Now, that is embarrassing... :flushed:
Somehow I must have clicked on the wrong file! My brain does tend to swap numbers around...
Time to clear out the older OpenWRT versions from the D-link folder on my PC!

Updated.

Network:

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

config globals 'globals'
        option ula_prefix 'fd90:ca58:913f::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'dhcp'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '0'

router has DHCP server on LAN with static lease (192.168.1.100) for dumb-ap
also
router has DHCP server on Guest with static lease (192.168.2.100) for dumb-ap-guest

Ok... so it looks like we have VLAN 1 untagged and then VLANs 3 and 4 tagged.

Given that your AP shows a switch, but doesn't show any ports, I'm not 100% certain how this is going to work out, but we'll try a few things. Let's start with adding just one VLAN. The other one can be added after we know what works.

Let's try adding VLAN 3 onto the base eth0 for the guest network, and an unmanaged network interface like this:

config device
        option name 'br-guest'
        option type 'bridge'
        list ports 'eth0.3'

config interface 'guest'
        option device 'br-guest'
        option proto 'none'

With this, you can create a guest SSID on the AP and link it against the guest network. Give that a shot and let me know what happens.

Yes, the presence of a switch with "unknown topology" was what prompted my initial question asking if it is possible to do.

I was hitting my head trying to configure VLAN ID 1 (LAN) on the AP as first step.(because there were no VLANs configured). But of course since I have VLAN 1 untagged, it is not strictly required. :woozy_face:

I had to change the proto for the guest interface to DHCP after adding the guest wifi, but other than that, your suggested config worked 100% as intended!
Thank you very much! :+1: :smiley:

I do not need VLAN 4 IoT on the dumb AP. IoT devices should all be within range of the main router (it will just be copy & paste if I do need it in future).

I have a better understanding now, but don't think I would have managed to get it up and running only using Luci. With limited understanding of the DSA syntax I could not do it directly in the config files either. Will do some more reading.

Glad this is working now!

This is actually not DSA at all. It is either swconfig or just standard dotted notation against a base device. (effectively not a switch and just an individually routed port since there is just one port).

1 Like

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