Is there a way to do VLAN translation?

What I am looking to achieve is the ability for my openwrt device to receive a VLAN tagged packet and foward that packet with a different VLAN ID.

For example:

port lan0 is a tagged port for VLAN ID 2

port lan1 is bridged with port lan0

the packets tagged with VLAN ID 2 is received at port lan0 and sent out of port lan1 with VLAN ID 20

a.k.a. VLAN translation

Bridge lan0.2 with lan1.20

For some reason this works for my edge router 4 but not for my rb5009.

For my rb5009, bridging devices work but bridging vlans of devices do not.

Really? What shows

brctl show

and, for both interfaces,

ip -d link show dev lan0.2

And maybe compare that with the edgerouter.

As a general note. Please note that such hacks should only be used if you inherent a total bonkers network setup and need to transition to a clean architecture.

What's the initial reason to do that? Why can't you just use one vlan id for those network segments?

I must have made a mistake somewhere but it works now after I re-did the config. :man_facepalming:

Apologies for reviving this thread for nothing.

This probably isn’t a normal use case but it is to allow distinguishing of duplicate vlan tagged traffic based on ingress interface.