VLANs in Nanopi R4SE

After hitting the head against the wall and seeing this video on "how to create VLANs using DSA on RPI4", I believe I made it!

With the current configuration, I have a trunk (tagged VLANs 1 and 10) throughout Nanopi's ETH1 towards a managed switch.
The switch receives the tagged frames, decodes it, and even gets its own IP address via DHCP from nanopi because it's PVID setting for that port is VLAN1.
The devices connected to the switch ports assigned to VLAN1, receive an IP from the Nanopi range (192.168.1.x) while the ones connected to the switch ports assigned to VLAN10 receive an IP from the ISP router (192.168.10.x).

After knowing how to do it, it is actually quite simple.
In one hand I admit I was over-complicating things, but in the other hand, the fact that there are maybe many ways to reach the same outcome also confuses people. I was always starting by creating a new VLAN 802.q1 device and it turns out it wasn't needed.

My working config for any future reference:

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdec:8090:b28a::/48'
        option packet_steering '1'

config interface 'lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.1.1'
        option gateway '192.168.10.1'
        option broadcast '192.168.1.255'
        list dns '192.168.10.1'
        list dns '8.8.8.8'
        option device 'MyBridge.1'

config device
        option name 'eth0'
        option macaddr '9e:13:4a:a8:f3:70'
        option igmpversion '3'

config interface 'wan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.10.2'
        option gateway '192.168.10.1'
        option device 'MyBridge.10'

config interface 'wan6'
        option device 'eth0'
        option proto 'dhcpv6'

config device
        option type 'bridge'
        option name 'MyBridge'
        option bridge_empty '1'
        list ports 'eth0'
        list ports 'eth1'

config bridge-vlan
        option device 'MyBridge'
        option vlan '1'
        list ports 'eth1:t'

config bridge-vlan
        option device 'MyBridge'
        option vlan '10'
        list ports 'eth0'
        list ports 'eth1:t'

Next step will be to have Nanopi to be the DHCP server for both VLANs as I did before with EA8500.

Thank you all for your support, patience and knowledge!

1 Like