VLANs on BPI-R2

I'm trying to setup VLANs for the BPI-R2 board and went through this article, but not sure which VLAN scheme would apply in this case. The board techpage suggests it is VLAN capable. The board has 4 physical LAN ports and running the /sys/class/net command yields the following result.

root@BPIoR2:~# ls -l /sys/class/net
lrwxrwxrwx    1 root     root             0 Jul 13 07:46 br-lan -> ../../devices/virtual/net/br-lan
lrwxrwxrwx    1 root     root             0 Jan  1  1970 eth0 -> ../../devices/platform/1b100000.ethernet/net/eth0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lan0 -> ../../devices/platform/1b100000.ethernet/mdio_bus/mdio-bus/mdio-bus:00/net/lan0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lan1 -> ../../devices/platform/1b100000.ethernet/mdio_bus/mdio-bus/mdio-bus:00/net/lan1
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lan2 -> ../../devices/platform/1b100000.ethernet/mdio_bus/mdio-bus/mdio-bus:00/net/lan2
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lan3 -> ../../devices/platform/1b100000.ethernet/mdio_bus/mdio-bus/mdio-bus:00/net/lan3
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx    1 root     root             0 Jul 14 22:50 tun0 -> ../../devices/virtual/net/tun0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 wan -> ../../devices/platform/1b100000.ethernet/mdio_bus/mdio-bus/mdio-bus:00/net/wan
lrwxrwxrwx    1 root     root             0 Jul 14 22:57 wlan0 -> ../../devices/platform/1a140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan0

The BPI-R2 uses MT7530 for networking. LuCi doesn't have any Switch/VLAN configuration option showing up. I'm confused if this chip has a built in switch or not. How should I go about creating VLANs?
For eg. A tagged 455 VLAN on WAN.

root@BPIoR2:~# dmesg | grep 802
[    1.197802] hub 2-0:1.0: 1 port detected
[    1.458681] 8021q: 802.1Q VLAN Support v1.8
[    4.490323] 8021q: adding VLAN 0 to HW filter on device lan1
[   15.890934] 8021q: adding VLAN 0 to HW filter on device lan0
[   15.943623] 8021q: adding VLAN 0 to HW filter on device lan1
[   15.981528] 8021q: adding VLAN 0 to HW filter on device lan2
[   16.020478] 8021q: adding VLAN 0 to HW filter on device lan3
[   16.061828] 8021q: adding VLAN 0 to HW filter on device wan
grep -E '(^VERSION|^OPENWRT_RELEASE|^BUILD_ID)' /etc/os-release
1 Like

Thank you again wulfy23. I think this article will be the direction I need as I wasn't sure what approach to take to create VLANs on the 7530 chip from the main VLANs page, and the switch config mentioned on that wiki did not appear in my config. I may come back if I've any questions after reading it.

root@BPIoR2:/# grep -E '(^VERSION|^OPENWRT_RELEASE|^BUILD_ID)' /etc/os-release
VERSION="21.02.0-rc1"
VERSION_ID="21.02.0-rc1"
BUILD_ID="r16046-59980f7aaf"
OPENWRT_RELEASE="OpenWrt 21.02.0-rc1 r16046-59980f7aaf"

1 Like

you need to upgrade for that article...

config-network-device(dsa uci/luci support) was added post rc1...

for wan... your not really touching the 'lan' interfaces anyway... so old x86 articles will work referencing .vlan notation/alias...

but it's probably wiser to upgrade to rc3(or snapshot any) if you are on dsa...

1 Like

Sounds good, will do. The main question I've struggled with, is how do I know if this board is DSA or not.

1 Like

it is... as referenced by the 'lanX' interfaces -> 'ports'...

but pre rc2 there was minimal uci/luci support...


grep DEVTYPE= /sys/class/net/*/uevent | grep -q 'dsa$' && echo "dsa" || echo "nodsa"
1 Like

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