I apologize if this has been asked before. I checked the similar topics but couldn't quite find anything which would help me elucidate what I'm attempting to do.
I have an old 4th gen i7 that I'm not really using much, only as file storage and very rarely compiling software I can't find on Debian's repo. I'm considering extending its workload to also router/routing tasks since it's barely ever using any CPU power or RAM capacity and because I may get half-a-gig speeds soon and my current router may not be very good at routing that much with SQM enabled. But, how would I go about it?
Would it be best to run OpenWRT directly on the hardware and just add the services I need for file transfer and such from opkg? I'd prefer running it on a VM on top of Debian, if possible. I'd split the RAM evenly and let the VM have full access to processor resources as it requires.
I'd also need the PC to both serve internet connection to clients connected to it and serve internet to itself.
This would require an extra NIC with at least 2 ports, right? perhaps a wireless card? or I could always use my current router as a "dumb AP" if it's easier.
Thanks for your time, hopefully I made myself clear. If not, feel free to inquire further.
yes, a(n old) pc can be used to run openwrt. you need to consider followings:
if you want internet 24/7 and use a pc will power consumption bother you? there is direct cost implication and it is not eco friendly,
running directly owrt on a pc will give best performance, and owrt provides you many functions and services beyond routing but it is not a full blown linux distro
not being a full distro means means you may find application limitations (though e.g. samba as SMB server exists), or find hardware limitations (e.g. video card support is very basic, so using as Plex transcoder may not work as you expect)
not being a full distro it means system and package upgrade has its own limitations, you will not able to use e.g. apt upgrade
you can also run owrt virtualized but obviously it has performance penalty, some folks use ESXi or other to host owrt, and attach server's network card to owrt to act as the main router. which approach has one tiny problem: if you need to patch the host from internet you will not have internet access while host is not running or owrt guest is not running
owrt acts as router so at least two nic ports is a convenient setup,, one for wan facing to public internet, one for lan.
if you want your pc to connect directly to internet and other clients via owrt via same internet access that will raise problems, technical and security.
if you use a pc personally i would not use it as wireless ap, wifi cards are tend to work as STA but not really as AP, better if you use pc owrt as router and plastic AP as so called "dumb AP" for wifi
and a list can go on and on ...
but it is not a bad idea to use pc imho, good luck.
I understand. Rockchip is still ARM, though. If I remain using SoCs, whichever they may be, will they be able to route 500 mbps up/down with SQM? the main reason why I'm looking to size up a little is because I feel these SoC/mobile CPUs won't be able to do that kind of work.
This a point worth repeating IMHO, especially older PCs can daw a lot of power even when idling, while dedicated (often celeron/atom) devices that often come with multiple NICs can be surprisingly frugal for the processing performance they offer.
So yes, especially for fast internet links x86 is a decent option, but "old PCs" often are not necessarily the x86 solution for 24/7...
That said, I had an oldish XEON running as local server 24/7 until I measured its consumption (~50Watts on average, so when ide) after which I turn this thing on when I need it and off afterwards (that little gain in convenience of being able to reach it at all time from remote locations, is not worth wasting 50Watts most of the time... more modern more dedicated x85 solutions can idle at well below 10Watt, same as many older all in one routers).... but I digress.
In general this is not a problem, virtualized firewall is quite common nowadays.
Patching host won't be affected, it downloads all updates before it make changes, why would an offline router causing problem? Unless your host update is breaking the OS itself, I have been running my router inside Synology NAS virtual machine for more than a year and it's never a problem, of course you need a backup anyway to prevent outage (even I have bare metal router, I also have another cheap one just in case).
ARM itself is not a problem, Apple M1 is also ARM processor but it does running faster than a lot of x86 processors, it depends on the generations and how it is designed. In general R4S using RK3399 which is proven to be running very fast, CAKE SQM there's already test showing it can do 1Gbps without problem. The R6S is even faster but since it's not in mainline yet so no official support currently.
Current price for a 1GB ram raspberry pi4B kit (with case, power supply, SD-card) seems to be 95EUR, even if you add a second USB3 gigabit ethernet dongle, a managed switch:
raspberry 4B kit: 95.00 EUR
tp-link ue300: 22.90 EUR
e.g. Netgear GS308E 8-Port: 35.10 EUR
95+22.9+35.1 = 153 EUR -> ~$168
So the price is IMHO not that bad even if you throw in an additional 40EUR for a low cost OpenWrt router to act as AP* (although it used to be considerably lower before 2020...) the bigger challenges IMHO are:
a) availability (currently the 1GB model is hard to source, raspberry pi400s seem to be easier to come by, albeit a bit more expensive)
b) clutter, not everybody appreciates splitting functionality over multiple individual components
c) unease about USB3 ethernet, while working OK for some users, others report mixed experience with USB dongles...
So yes, for going the wired-ARM router path, raspberry pi4Bs are not ideal, as there are cheaper more complete** but similarly powerful arm SBCs available. However, if one has a pi4B sitting around doing nothing/little converting it to a gigabit capable OpenWrt router is not a terrible idea either.
*) This might also allow you to get rid of the managed switch and use the OpenWrt router's configurable switch instead...
**) A raspberry Raspberry Pi CM4 (Compute Module 4), plus a dfrobot Router Carrier Board Mini get you a raspberry 4B-based dual ethernet wired-only router, but that still leaves this rather expensive and currently hard to source.
When bufferbloat test ended (A+, of course) power dropped back to 9.5.
htop shows load "0.0" the whole time, so bufferbloat traffic isn't stressing things at all.
Kill htop, power back at 9.1.
The box is one of the CWWK "v5" (I think, minimal case, no fan), cost US$140 + $13 shipping (took a month from CN to US). The box is new, so I splurged on new internals rather than going the junk pile for parts: WD 550 SSD was $37 (250GB so MASSIVE overkill for OpenWrt), Crucial 8GB 3200CL22 SODIMM stick $28 (again massive overkill), total $218. Could get that down a bit by using a salvaged -- or buying a much smaller -- SSD, and scavenging a RAM stick from an old laptop or whatever.
Well, if you happen to be unhappy with that raspberry, then selling it seems like a decent proposal, as long as the prices are still elevated. Personally I would keep it though, there are things possible with a raspberry that are much harder with competing SBCs (unless using compatible extension connectors).