Help setting up 8021q vlan

Hi Guy,
Im trying to Setup Double tagged vlans with 802.1q

i have 2 mt7621 based routers, which are running openwrt 21.02
Following is the configurations

R1

config device
option type '8021q'
option ifname 'lan1'
option vid '251'
option name 'lan1.251'

config device
option type 'bridge'
option name 'br-t'
list ports 'lan1.251'

config interface 't'
option proto 'static'
option device 'br-t.100'
option ipaddr '192.168.5.16'
option netmask '255.255.255.0'

config device
option type '8021ad'
option ifname 'br-t'
option vid '100'
option name 'br-t.100'
option mtu '1508'


R2

config device
option type '8021q'
option ifname 'lan1'
option vid '251'
option name 'lan1.251'

config device
option type 'bridge'
option name 'br-t'
list ports 'lan1.251'

config interface 't'
option proto 'static'
option device 'br-t.100'
option ipaddr '192.168.5.15'
option netmask '255.255.255.0'

config device
option type '8021ad'
option ifname 'br-t'
option vid '100'
option name 'br-t.100'
option mtu '1508'

if i assign static address on br-t then R1<>R2 rechability is there, but once i configured 8021ad vlan and assignip there, im not loosing the connectivity between R1<>R2

Thanks for your help

The 8021q blocks are used by Luci for housekeeping (to populate GUI lists of available VLANs) and aren't needed at all to make a network work.

Since I think that by 21.01 the MT7621 was migrated to DSA you need to use a DSA style configuration:

  • Use only one bridge, and place all the physical Ethernet ports into it.
  • Configure a bridge-vlan within that bridge for each vlan.
  • Attach a vlan to its interface with option device 'br-xxx.N' This is the only place that the dotted VLAN notation should appear in the configuration.
  • bridge-vlans which exist only for hardware switching between ports still need an interface of proto none to be set up in the hardware properly.

Is there something in here lost in translation?

Do you really wanted to say "double tagged" or just "I want two (2) VLAN"?

@_bernd I need the configuration for QinQ.

I'm trying to achieve the following setup:
LAN1 is connected between R1 and R2.
On LAN1, I have configured VLAN 251 as the outer VLAN.
Inside VLAN 251, I want to encapsulate 10 inner VLANs, i.e., 100, 101, 102, 103.

As traffic is forwarded from R1 to R2 via LAN1, it should carry two tags: VLAN 100 (inner tag) and VLAN 251 (outer tag). R2 should decapsulate the packets.

May I ask why do you need QinQ or why do you think you need it?