can anyone share experience of using OpenWrt on switch like Zyxel GS1900-8HP or NETGEAR GS108Tv3/308T ? Are there any issues or gaps ? Has anyone tried to use the switch as router using OpenWrt and paste some results?
The secure operation of such a setup is dependent on the common, but unproven belief, that the PacketProcessingEngine in the SwitchSOCs have no (un-)intended in-band bugs/protocols/features, that could influence VLAN/Port-Mirroring settings.
While you technically could use your managed switch as router using OpenWrt, rtl838x doesn't have the performance (it's a 500 MHz single-core mips 4k CPU and not much RAM either, it's rather surprising how well luci works on that chip) to make this worthwhile for anything but lowest-end ADSL connections (rtl839x and rtl93xx would both have faster CPU cores and dedicated offloading abilities for 'basic routing' features, but that is in its earliest stages of development at this point).
Thanks for the prompt reply! What about using it just as a switch? Would OpenWrt be a better choice than stock firmware? (I have also two other OpenWrt based APs)
Well, it is a switch - that's what it has been designed for
OpenWrt works pretty well on rtl838x, the basic features (VLAN management, etc.) are working pretty well and DSA allows access to quite a few advanced features (via iproute2, ip, tc, etc.), but luci hasn't really been optimized for switch use (beyond VLAN management), yet. Running OpenWrt you do gain real security support (I don't think we'd need to discuss the security of OEM's kernel v2.6.19 and it doesn't stop there) and a uniform configuration interface between your devices (routers and switches), but some of the advanced features of a 'typical' managed switch might not be easily exposed to the webinterface so far. (Don't get me wrong, the basics of VLAN management are working nicely with luci, you can easily define different VLAN groups and configure your ports which to belong to, which to tag/ untag).
But, it works, really well, right now - certainly good enough to give it a try (and even if you might not plan to flash OpenWrt for now, retaining the option for the future (by choosing supported hardware) is certainly a good idea).
EDIT: the OEM management interface of switches from different vendors usually varies widely, which can often be quite confusing and illogical, with OpenWrt you do gain the same interface (and underlying DSA based configuration syntax) for all of your devices, that can be pretty valuable and save a lot of time/ head-scratching. Some OEM firmwares also tend to be rather neglected by their manufacturers, depending on obsolete crypto algorithms (e.g. SSL3) or JAVA/ flash, which can make it a nightmare to work with these devices, luci is getting updated with the rest of OpenWrt to meet current requirements.
Thanks @slh !
In terms of performance have you by chance tested whether it maintains the same throughput?
I'd certainly love the interface uniformity, and if it is a nogo for router, am considering DFRobot Routerboard + CM4 on OpenWrt (and maybe opn sense if it materializes).
The switching is handled within the switch fabric, offloaded to hardware (the mips 4k CPU is not involved with that), you get the full wire-speed of your switch fabric (so identical to the OEM firmware).
I forgot to mention that i meant switching with VLAN's. To my knowledge tagging/untagging requires CPU processing.
This is still a dedicated switch CPU that has built in the hardware to do switch things. It ain’t a general purpose “RaspberryPi CPU thing” so the actual switch work is hardware offloaded.
So I would be very surprised if you would get slower VLAN handling with OpenWRT instead of OEM firmware.
To me it was two things I looked for when buying a D-Link DGS-1210-10MP and putting OpenWRT in it (ongoing project). My old Ubiquinti edgeswitch has kernel 3.6 and that is probably pretty good kernel standard in the switch business but it is still obsolete. But switch firmware is not that often updated by the manufacturers anyway. OpenWRT has kernel 5.10 in the 22.03 release.
And the uniformity, now I soon have fully working OpenWRT in the router, switch and AP. That makes setup scripts and system service much easier since you don’t have to learn and remember all the odd functions for every manufacturer.
Even the UCI code for setup is not even near to have any similarities between different manufacturers and OpenWRT.
For the Luci support question for switches…to be honest my network has grown so complex that Luci is nice for looking but I don’t do setup or settings in Luci anymore.
Which EdgeSwitch do you have. The EdgeSwitch 5XP and EdgeSwich 8XP are both supported by OpenWrt.
I have one of those also. Support for the SOC family is available in mainstream Linux https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/bcm-hr2.dtsi?h=v5.18-rc3 so perhaps someone with time on their hands can add support? I've already got way too many projects. Ubiquiti EdgeSwitch 8 150W is the wiki page I created about 18 months ago.
Yes but I followed that device on this forum but that device crashed and burned with OpenWRT and then this Realtek device support started growing fast and everyone came around and moved to rtl83xx switches.
But for me it doesn’t matter which one have more or less working (buttons and led are putting up a fight on D-link!?) OpenWRT since their OEM datasheet are identical in performance. Personally I think the D-Link is in hardware point-of-view better build than Ubi. Ubi feels at first look nice but it gets very cheep but expensive when trying to fit any screw in any hole…
And the rack mount adapter is 3:d party optional add-on for about 50€, on D-link the mounting brackets is delivered in the box😂