Hi. I am having a problem creating a hybrid vlan port using this router which has this switch switch0 - rt305x. When I set a physical port to be untagged for VLAN20 and tagged for VLAN5 and VLAN10, it just does not work. I have tried doing it with LuCi and swconfig. Am i doing something wrong or just this switch does not support hybrid port, if so are there any workarounds like firewall rules, routing, etc.?
output of swconfig could be wrong, at least i have similar problem on tp-link with same switch, where it show tagged, but in reality it is not tagged at all
The problem is not with having many tagged vlans on a given port, but the problem is that no hybrid port can be configured (untagged for a given VLAN and tagged for some). Having all VLANs tagged in the port works fine.
Some hardware has this limitation. I'm not sure if yours does or not, but let's review your configs:
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:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
Some switches don't support mixed tagged and untagged on the same port, and that is either a hardware limitation (for example 841n v7 switch has a hardware limitation where a port can only be either all tagged or untagged). v13 is based on mt7628 and while I don't think that it is a hardware limitation, the switch driver might not support mixed ports.
It looks like this RT305x switch doesn't support mixed mode ports so it is a hardware limitaion and the only solution is to use another device with a better switch hardware.
The driver code has the following comment:
HW limitations for this switch:
No large frame support (PKT_MAX_LEN at most 1536)
Can't have untagged vlan and tagged vlan on one port at the same time,
though this might be possible using the undocumented PPE.
And the driver code itself sets PORT_UNTAG only if there are no tagged VLANs configured on the port.
Thanks @zekica, you brought the long story short and to the end. I wonder if there is some workaround there, and what is the mentioned in comment "undocumented PPE"
Thanks @psherman but i think it is no more needed because @zekica has found the answer. Do you know for some workaround about creating hybrid/mixed ports?
Since this is a hardware limitation, no, there is no workaround (locally) -- you could do this with an external managed switch that has all networks tagged on the uplink port and then the 'hybrid' tagging (one untagged, the rest tagged) on one or more of the downlinks.
Do you have some recommendations about managed switches. I usually prefer low cost Chinese equipment because no demand for high speeds or high load. And many times they actually have some capable equipment that could run openwrt, like routers equipped with dual core MT7621AT.