TL-WR841N v13 cannot create a hybrid vlan port

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.?

swconfig dev switch0 show
VLAN 1:
	ports: 6t 
VLAN 2:
	ports: 0 6t 
VLAN 5:
	ports: 1t 2t 4t 6t 
VLAN 10:
	ports: 1t 3 4t 6t 
VLAN 20:
	ports: 1t 4t 6t 
VLAN 99:
	ports: 1t 4t 6t

Then I try this and get:

>> swconfig dev switch0 vlan 20 set ports ‘1 4t 6t’
>> swconfig dev switch0 set apply
>> swconfig dev switch0 show
VLAN 1:
	ports: 6t 
VLAN 2:
	ports: 0 6t 
VLAN 5:
	ports: 1 2t 4t 6t 
VLAN 10:
	ports: 1 3 4t 6t 
VLAN 20:
	ports: 1 4t 6t 
VLAN 99:
	ports: 1 4t 6t

Hi

did you check with wireshark ?

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

plug the PC in port and fire up WireShark

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:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network

Did you tried to attach WireShark and confirm tagged/untagged frames ?

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.

I'll test later today.

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?

Glad you have an answer.

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.

No, and no more needed, but i appreciate if you can provide some workaround for the issue. Thanks

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.

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