DSA and Primary VLAN and local?

Trying new builds with DSA and trying to duplicate older config,
with a bridge of all lan ports and enabled vlan filtering in luci.
but having trouble finding clear info on new options .

What is Primary VLAN ? in old config it was just tagged or untagged for trunks and vlans.
would that be same thing as cisco Primary vlan containing secondary Private,Comunity
vlans? and Promiscuous ports ?

And what is local checkbox for each vlan ?

Or would it be easier to configure like i would on X86 without a switch.
just defining subinterfaces for vlans under internet[1-4].vlanid


Primary VLAN is what the rest of the world (including openwrt up to 19.07) often call PVID. PortVlanID that is the tag all untagged packages get that is coming in on a port gets in the VLAN system. You can only have one PVID per port but a lot of tagged VLAN on a trunked port.

I set this to match outgoing VLAN on my single vlan ports. For the trunked ports I set this to the blackhole vlan.

In swconf we also had pvid but not in luci. You had to write the pvid blocks in network config. So it isn’t new, it has only got a lot easier in 21.02 with DSA.

If vlan is untagged already on a port , what does primary vlan option do on top of unttaged ?
Still do not understand , seems redundant ?

Looking at all of my old /etc/config/network from e4200-ea4500,wrt54g-wrt54gs , i do not
see pvid configured anywhere, just tagged and untagged vlans on switchports.

On cisco it would be one native vlan(untagged) peer trunk and all others tagged.
But also an access vlan can be set for the port ,different from native,
if port falls out of trunking mode that one becomes native(untagged) .
could that be what pvid is for ?

That is because you didn’t read the switch manual.

local and PVID in wiki

I would not be asking if i did not read the manual, every mention of pvid
on openwrt.org and the forums , and google searches.
Just cannot wrap my head around it , after not using it for so long.

As i have used openwrt for quite some time, in various configurations
with managed cisco catalyst switches , dell power connect, other openwrts
configured as dumb aps and just layer2 switches. Without problems.

And have not had to use pvid , as just having tag and untag was sufficient
to perform the trunking functions. (maybe i was miss configuring it all this time?)

Also maybe i am not the only one that does not get it after reading the required information!

So in your words , after reading more then i have ( i just cannot wrap my head around it),
can you explain why PVID needs to be used on a vlan in a trunk port?

Where a vlan is allready marked untagged . and incoming untagged packets to the
port will be tagged to that vlan internaly inside the switch.
And packets going out of switch tagged with that vlan on the port will be unttaged.
Atleast that has worked for me up to 19.07.8 , without ever using pvid.


VID tags outgoing data on the port.

PVID tags incoming data on the port that has no tags.

All data in a switch and router is tagged until it reaches the RJ45 connector.

An untagged outgoing port can only be used for a client that are stupid and see all data in the cable as its own. Like all computers and consumer things. But when the stupid computer sends data the router and switch needs to sort it into the right VLAN and to do that you need PVID.

Again , I have been using trunks to various devices from openwrt .
Without ever configuring PVID!!!!!!! only vid and (u and t) for vlans on ports.
And it has performed as expected tagging in and untagging out the untagged(native) lan
on the trunk .

And back to my original (which might not have read clearly) IS PVID redundant if
openwrt was correctly tagging and untagging , untagged vlan on trunks without

If for untagged(native) vlan on a trunk ,vid is what tags is out , pvid tags it in . Then why need (u) ???

To me logicaly vid identifies vlan you are configuring , and u and t sets how it deals with it.
t leaves tags on in and out. u adds it comming in , and strips going out. why compicated it ?

Or is it needed in some special cases which i have not run across?


Pvid is only need in special async vlan setups (where ingress tagging != egress tagging). You usually do not need to specify it explicitly. It either implicitly defaults to the first untagged VLAN configured on the port or it is not defined at all if unspecified.

1 Like

jow , THANK you .

And my OCD got the best of me , and i had to look up use cases for asymmetric vlans.

Seems very similar to Ciscos Private vlans. Ability to selectively switch at layer2 ,
without the slowdown of getting in to layer3 routing.

Now reason for confusion was that all these docs and Howtos mention using PVID
for basic setups where there is no need ( or atleast clarify when it is needed ).

Posted a continuation thread for PVID and usage examples

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