Help with VLAN's

Can anybody give me a hand on an VLAN error?
I have 2 routers (primary and secondary) connected by one cable. They both are configured with 2 ssid's: "main and guest" and each ssid has its own VLAN ID.
On secondary I associeted main SSID to VLAN 101 and guest SSID to VLAN 107, both tagged (i don't know why but main ssid associated to VLAN 1 didn't work and traffic on the main router were logged with VLAN neither tagged nor untaged - but for now, that's not the issue).
On both routers, started to log these VLAN errors:
Sat Dec 12 10:37:05 2020 daemon.err hostapd: nl80211: NL80211_ATTR_STA_VLAN (addr="MAC-ADDRESS" ifname=wlan1 vlan_id=0) failed: -2 (No such file or directory)

I don't know why these VLAN id's=0 started to happen. Can anyboty please point me to a direction?
Thanks!

I would need to see your network and wireless config.

It seems like you did the new VLAN assignment to WiFi...but need to see if you enumerate a VLAN on the second device.

  • Also, are both devices are OpenWrt?
  • If so provide the main device's network config as well

sorry... forgot to inform that... both are OpeWRT.
I suppose I should explain that in fact I have 3 SSID's: main, iot and guest. On previous post I tried to make it simple... my main SSID is ˜duartes˜/˜duartes5G" and they are associated to "lan" interface.
The secondary SSID is ˜duartes_iot˜ and are associated to "iot" interface.
The other SSID is guest and its configured only on primary device.
On they primary router, my goal was to receive VLAN tagged packets from the secondary. As the secondary has only "lan"and "iot" interfaces, it should tag vlan id = 1 for "lan" and 107 for "iot". That didn't work but was ok after I associated vlan id = 101.

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

config globals 'globals'
        option ula_prefix 'fd44:5d12:f456::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option delegate '0'
        option igmp_snooping '1'
        list dns '1.1.1.1'
        list dns '8.8.8.8'
        list dns '8.8.4.4'
        option ifname 'eth0.1 eth0.101'

config device 'lan_eth0_1_dev'
        option name 'eth0.1'
        option macaddr '50:64:2b:35:20:e1'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'pppoe'
        option password 'cliente'
        option username 'cliente@cliente'
        option delegate '0'
        option ipv6 '0'
        option type 'bridge'
        option igmp_snooping '1'

config interface 'wan6'
        option ifname 'eth0.2'
        option delegate '0'
        option proto 'none'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option ports '6t 2 1'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option vid '2'
        option ports '6t 4'

config route
        option target '192.168.66.0'
        option gateway '192.168.1.66'
        option netmask '255.255.255.0'
        option interface 'lan'

config interface 'guest'
        option proto 'static'
        option ipaddr '192.168.30.1'
        option netmask '255.255.255.0'

config interface 'iot'
        option proto 'static'
        option ipaddr '192.168.9.1'
        option netmask '255.255.255.0'
        option type 'bridge'
        option ifname 'eth0.107'
        list dns '1.1.1.1'
        list dns '8.8.8.8'
        list dns '8.8.4.4'

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '107'
        option ports '6t 3t'

config interface 'modem'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.50.1'
        option ifname 'br-wan'

config switch_vlan
        option device 'switch0'
        option vlan '4'
        option vid '101'
        option ports '6t 3t'

config route
        option gateway '192.168.1.66'
        option netmask '255.0.0.0'
        option interface 'lan'
        option target '10.0.0.0'

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
        option legacy_rates '0'
        option htmode 'HT20'
        option channel '9'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option encryption 'psk2'
        option key 'xxxxxx'
        option ssid 'duartes'
        option macfilter 'deny'
        option network 'lan'
        option ft_over_ds '1'
        option mobility_domain '4f58'
        option ft_psk_generate_local '1'
        option ieee80211r '1'

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11a'
        option path 'pci0000:00/0000:00:01.0/0000:02:00.0'
        option legacy_rates '0'
        option htmode 'VHT80'
        option channel '36'

config wifi-iface 'default_radio1'
        option mode 'ap'
        option encryption 'psk2'
        option device 'radio0'
        option key 'xxxx'
        option ssid 'duartes_guest'
        option network 'guest'
config wifi-iface 'default_radio2'
        option device 'radio0'
        option mode 'ap'
        option encryption 'psk2'
        option key 'xxxxx'
        option network 'iot'
        option wmm '0'
        option hidden '1'
        option skip_inactivity_poll '1'
        option disassoc_low_ack '0'
        option dtim_period '3'
        option ssid 'duartes_iot'

config wifi-iface 'wifinet3'
        option ssid 'duartes5G'
        option encryption 'psk2'
        option device 'radio1'
        option mode 'ap'
        option key 'xxxxx'
        option disassoc_low_ack '0'
        option network 'lan'
        option dtim_period '3'
        option ft_over_ds '1'
        option ft_psk_generate_local '1'
        option mobility_domain '4f58'
        option ieee80211r '1'

secondary:

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

config globals 'globals'
        option ula_prefix 'fdb8:ba25:fec8::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.2'
        list dns '192.168.1.1'
        option gateway '192.168.1.1'
        option ifname 'eth0.101'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config device 'wan_eth0_2_dev'
        option name 'eth0.2'
        option macaddr '28:d1:27:d2:6f:ad'

config interface 'wan6'
        option ifname '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 vid '1'
        option ports '2 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option vid '2'
        option ports '4 6t'

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '107'
        option ports '3t 6t'

config interface 'iot'
        option proto 'static'
        option ifname 'eth0.107'
        option type 'bridge'
        option netmask '255.255.255.0'
        option ipaddr '192.169.9.2'

config switch_vlan
        option device 'switch0'
        option vlan '4'
        option vid '101'
        option ports '3t 6t'

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:01.0/0000:02:00.0'
        option htmode 'HT20'
        option channel '9'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
        option htmode 'VHT80'

config wifi-iface 'wifinet2'
        option ssid 'duartes'
        option encryption 'psk2'
        option device 'radio0'
        option ieee80211r '1'
        option ft_over_ds '1'
        option key 'xxxxxx'
        option network 'lan'
        option mode 'ap'
        option ft_psk_generate_local '1'
        option mobility_domain '4f58'

config wifi-iface 'wifinet3'
        option device 'radio0'
        option mode 'ap'
        option encryption 'psk2'
        option key 'xxxx'
        option network 'iot'
        option wmm '0'
        option hidden '1'
        option skip_inactivity_poll '1'
        option disassoc_low_ack '0'
        option dtim_period '3'
        option ssid 'duartes_iot'

config wifi-iface 'wifinet4'
        option encryption 'psk2'
        option device 'radio1'
        option ieee80211r '1'
        option ft_over_ds '1'
        option key 'xxxxx'
        option network 'lan'
        option mode 'ap'
        option ft_psk_generate_local '1'
        option mobility_domain '4f58'
        option ssid 'duartes5G'