Software VLAN tagging and Native VLAN issues

So I have a few devices now that im trying to do software VLAN tagging, all openWRT devices but I am finding in many cases, the software tagging does not like the other switches trunks.

On my Cisco switch, a no switchport trunk native solved the issue, however now I am experiencing the same issue on a Ubuquiti EdgeSwtich.

The software VLANs will just not talk to the trunk port at all.

Any ideas?

Thanks

I have used various managed switches and there shouldn't be any issues. Some devices don't like mixing untagged and tagged networks on a trunk -- in those cases, all tagged should be fine (although the spec does allow the mix of an untagged network + tagged network(s)).

Your downstream switch configuration must match the router in terms of the 802.1q tagging.

What device and OpenWrt version are you using? Let's see your network configuration.

Please 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 for the reply. See below.

System

Hostname OpenWrt
Model TP-Link TL-WPA8631P v3
Architecture MediaTek MT7621 ver:1 eco:3
Target Platform ramips/mt7621
Firmware Version OpenWrt 22.03.0-rc6 r19590-042d558536 / LuCI openwrt-22.03 branch git-22.204.42822-9a18337
Kernel Version 5.10.134
root@OpenWrt:~# ubus call system board
{
        "kernel": "5.10.134",
        "hostname": "OpenWrt",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "TP-Link TL-WPA8631P v3",
        "board_name": "tplink,tl-wpa8631p-v3",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "22.03.0-rc6",
                "revision": "r19590-042d558536",
                "target": "ramips/mt7621",
                "description": "OpenWrt 22.03.0-rc6 r19590-042d558536"
        }
}
root@OpenWrt:~#
root@OpenWrt:~# cat /etc/config/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 packet_steering '1'
        option ula_prefix 'fd57:da65:d814::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        option ipv6 '0'
        list ports 'eth0.102'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'plc0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.240'
        option gateway '172.16.102.1'
        option ipaddr '172.16.102.4'

config device
        option name 'eth0'

config device
        option name 'lan1'

config device
        option name 'wlan0'

config device
        option name 'lan3'

config device
        option name 'plc0'

config device
        option name 'lan2'

config interface 'Wireless'
        option proto 'none'
        option device 'wireless-br'

config device
        option name 'wlan0-1'

config device
        option type 'bridge'
        option name 'wireless-br'
        option ipv6 '0'
        list ports 'eth0.101'
        list ports 'lan1'
        list ports 'lan3'
        list ports 'plc0'

config device
        option name 'eth0.101'
        option type '8021q'
        option ifname 'eth0'
        option vid '101'
        option ipv6 '0'

config device
        option name 'eth0.102'
        option type '8021q'
        option ifname 'eth0'
        option vid '102'
        option ipv6 '0'

root@OpenWrt:~#

What is the desired trunk configuration?

I am trying to trunk two vlans, 101 and 102.

102 is my management VLAN which I want the be able to access OpenWRT serices such as web, ssh etc while VLAN 101 is my LAN, where I will get DHCP, DNS etc from.

The OpenWRT device will be a dumb AP offering nothing other then some different SSIDs in different VLANs.

Thanks

The AP is plugged into port 1 of the EdgeSwitch, which is setup as a TRUNK port with tagging enabled for interface 1 on vlans 101, 102, and 103.

It seems to work on one VLAN if im not tagging the packets at the EdgeSwitch, however I can only have the interface in 1 vlan if untagged.

It seems that your router is DSA, so the DSA tutorial will be useful in this case.

But, given that you are using this as a dumb AP, I'd recommend that you reset the device to defaults and then post the /etc/config/network configuration file which we can use as a baseline.

Full disclosure: I'm not a DSA expert (I don't have any OpenWrt devices using DSA). So I may or may not be able to get you 100% there. But I'll try, and likely others will chime-in if they can help (or if I get things wrong).

Thanks for the help!

I actually got it sorted, started with one VLAN till I got it talking and then just introduced the second VLAN.

I think the trick in this case was to select the VLAN as the device for the interface. Weird how the 2 setups are different.

Thanks anyway!

For me, on this particular switch, I did not set the port in "trunk" mode but just tagged everything on that port for those vlans.

Then I used the VLAN configuration settings under the VLAN option in the bridge.

One thing that seemed to work for me was i had to assign the VLAN device (device.vlanid) as the device that the interface used.

Not sure what fixed it haha. In the end you just start trying anything and everything

Glad you got it fixed! Would be handy to share it though, so you'll help others who run into a similar problem.