How to create a VLAN trunk with DSA on 21.02.0-rc1 (mvebu)

Hi all,

I'm using a WRT32X (basically WRT3200ACM) which is mvebu based hardware and I've been trying 12+ hours to create VLAN IDs.... starting to lose the will to live... ha

I thought as my device is DSA supported and this is the way things are going I'd use 21.02.0-rc1 which I'm starting to feel was a mistake as I can't find any guides on it.

Ideally - all I need is just one trunk port - is this possible?

If anyone has any suggestions please let me know.

As mentioned I know there is nothing in LuCI for VLAN tagging currently. I'm happy to edit the network config file in nano!

Thanks all

I'm using a VLAN to reach the internet through a single-port BananaPi M1. The VPI/VCI is 0/35, which
connects when I tack on .35 to ETH0, or ETH0.35 as WAN interface. LAN is eth0. This is for 21.02rc1. For 19.07.7 on another router with 2 interfaces with an internal switch, I would use the Switch tab in Luci.

For anyone else stuck - I'd advise just flashing 19.07.7, created 12 VLANs inc a trunk, all working straight away - happy network! Save yourself a lot of trouble and messing around! Wait until it's no longer a release candidate :smiley:

1 Like

Hi
So I spent countless hours figuring out the same thing on my wrt3200.

But I remember that the ER-X (running EdgeOS) requires SWITCH0 to be SWITCH0.1 for vlan trunking. It requires the SWITCH0 to be deleted and SWITCH0.1 be created at the same time.

Anyways, start with the default configuration

$ vi /etc/config/network

config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'

add the following:
config bridge-vlan
option device 'br-lan'
option vlan '1'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4:t'

and edit only the second line, adding only '.1'
config interface 'lan'
option device 'br-lan.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'

$ service network restart

I bricked the ER-X because I didn't realize it used 'eth1' instead of 'lan1'. TTL into the ER-X and issue a $ 'firstboot && reboot now' to unbrick.

It's a bit risky, so I would not recommend if you cannot recover from bricking.

The BR-LAN interface should now be BR-LAN.1
The LUCI GUI/Interfaces/Devices/BR-LAN/Bridge Vlan Filtering tab now works.

3 Likes

Thank you for posting this. Worked like a charm

Hi

A follow up on my Oct '21 post. Found a way to do this using only LUCI.

A:
Network/Devices tab
[Add device configuration...]
device type: VLAN 802.1q
base device: br-lan
VLAN ID: 1
device name: br-lan.1

click [save] and refresh browser window [f5]

B.
Network/Interfaces tab
[edit] existing LAN/BR-LAN
device: br-lan.1

click [save] and refresh browser window [f5]

C.
Network/Devices tab
[configure...] existing BR-LAN
bridge VLAN filtering tab
enable VLAN filtering box: checked
click [add]: VLAN ID '1'
local box: checked
all "ports": check untagged

click [save] and refresh browser window [f5]

D.
click [Save & Apply]

There appears to be a bug in the save button at the end of step C. When you click save, nothing appears to happen. Refreshing the windows takes you to a higher menu.

1 Like

Many thanks, @94121-usr. I had been scratching my head trying to get it around vlan trunking on DSA after upgrading OpenWrt on my WRT3200ACM from 19.07 to 21.02. Needing vlan trunking, I was at the point of going back to 19.07 before I came across something useful; this post. Elegant solution and easy to understand.

Just a small point, but there's a discrepancy between your posts of Oct 21 and March 6. On the image and in the text of the Oct 21 post, vlan ID 1 port 4 is tagged, in the LUCI method post on March 6, it is untagged. Having followed it, I can confirm that the LUCI method works with all four ports on vlan ID 1 untagged.

/etc/config/network:

config device
    option name   'br-lan'
    option type   'bridge'
    list   ports  'lan1'
    list   ports  'lan2'
    list   ports  'lan3'
    list   ports  'lan4'

config interface 'lan'
    option proto      'static'
    option device     'br-lan.1'
    option ipaddr     '192.168.1.1'
    option netmask    '255.255.255.0'
    option ip6assign  '60'

config device
    option name    'br-lan.1'
    option type    '8021q'
    option ifname  'br-lan'
    option vid     '1'

config bridge-vlan
    option device  'br-lan'
    option vlan    '1'
    list   ports   'lan4'

config device
    option name   'br-lan.100'
    option type   '8021q'
    option ifname 'br-lan'
    option vid    '100’

config bridge-vlan
    option device 'br-lan'
    option vlan   '100'
    list   ports  'lan4:t'

config interface 'vlan100'
    option proto    'static'
    option device   'br-lan.100'
    option ipaddr   '192.168.100.1'
    option netmask  '255.255.255.0'