Hello,
I wanted to share and idea not directly related to dietpi but I guess of interest for people in this community.
I recently tested and proved myself a concept I had pending for many years, the applications of VLANs for extending the ethernet ports of a SBC
Using an SBC as a router (with openwrt installed on it) is much more powerful than most commercial routers to, for example handle way better VPN server, load balancing 2 internet connections, traffic analyzing, downloads, file server… endless options under openwrt, even docker… kindof dietpi…
But the biggest hardware obstacle is that most SBC have only 1 ethernet.
How to solve it? with VLANs and a managed switch supporting VLANs or another openwrt flashed commercial router acting as a managed switch (easy to set up).
The hardware connection is easy: The only ethernet in the SBC to one ethernet in the managed switch, in my case both run openwrt and its very easy to set up once you get the concept.
I will provide more detailed information hopefully tomorrow, I have to go now.
Wow that’s a cool tiny quite powerful board, and very cheap! 22 USD or 25 case included. Thanks for sharing! It did not exist in friendlyarm catalog when I was up to date…
Add a usb wifi supported by openwrt and you have also AP functionality (or wireless client if that fits your needs better).
And if 2 ethernet ports are not enough they can be increased with the method shown here.
In my case I’m using an old Buffalo router (WZR-HP-G300NH, Gigabit) with 3 VLANs:
for WAN (DHCP client, using LAN 4 port of the switch)
for my LAN (192.168.7.X using LAN 3 port)
for the neighbors LAN (192.168.1.X using LAN 2).
LAN 1 port is for the trunk, the only ethernet cable between SBC and the managed switch.
With Luci (the web interface of openwrt) I have the following setup for the router acting as managed switch
Menu Network → Switch
VLAN ID CPU (eth0) LAN 1 LAN 2 LAN 3 LAN 4
102 tagged tagged untagged off off
103 tagged tagged off untagged off
104 tagged tagged off off untagged
I also use the buffalo as an AP
Then in the SBC, under menu Network → Interfaces more interfaces can be added and attached to vlans, in the example eth0.104 for WAN
With this info I guess it’s not enough to understand how VLANs work but I hope you see the possibilities, let’s say being able to carry different networks through a single cable at the same time.
NanoPi R2S looks good, had I known its existence a month ago I would prefer it over the RPi4 for internet router at home with OpenWrt.
Might as well buy one just for fun.
@femispam I was going to implement this, but ended up just picking a 802.11ax consumer wireless router instead.
I was planning to use Rock Pi 4 (though any other RK3399 board with PCIe would do, e.g. RockPro64 or NanoPi M4v2) with 4-port RTL8811 PCIe network adapter, for 1x WAN + 4x LAN ports with VLAN tagging and all. OpenWRT doesn’t support any of these boards; I was going to run Armbian and build on top of that.