Rasberry 4 as router?

Hello, at the moment I'm using a R-7800 Netgear behind my modem which is ofcourse my router, Wireguard server and AdGuardHome adblocker. Which works fine.

Because I am interested in what kind of traffic goes in and out my network, I was wondering if I could use my RP4 as router like my R-7800, with a graphical networkmonitor. My RP4 has 4GB memory and a 120GB SSD.
My R-7800 could be used as AP.

Is this possible or is my suggested config too heavy for the RP4?

Thank you all

Greet Tom

it works, but you probably want a 2nd network interface.

I use my RPi4 2G for more than you want to do and it's plenty. You will need a USB-NIC for uplink to WAN. Recommend TP-Link USB 10/100/1000 LAN if you can find one.

Raspberry 4B is good for reasonable demanding processing (like traffic shaping) up to ~1Gbps, so will likely work well for your use-case. However as @frollic and @darksky mentioned you probably should use an USB3 gigabit ethernet dongle based on realtek ethernet chips (people reported bad experiences with asix). According to the forum tp-link's UE-300 works well.
You then would use the R7800 not only as AP, but also as switch to aggregate all your wired devices.
(Which I can not confirm or deny, as so far I only tested it under Macos, where it seems to have issues with bidirectionally saturating traffic, but that is likely a driver issue that is not representative for Linux/OpenWrt).

Oops. I had already bought a usb 3.0 to RJ45 Axis on Ali but I will use it for something else. :slight_smile:
I commanded a TP-link UE-300 for 13 euros.

Does anyone know if there's some kind of manual how to begin?

Thank you for all the help.

grt Tom

I think the main challenge is that the default images for the raspberry4B do not carry the required drivers for the ethernet dongle. Other than that I believe (not having done it myself) all you need to do is flash the image to a SD card and boot it up.

1 Like

Highly recommend that you use the ext4 rootfs for your use case. The TP link dongle needs the rtl8150 kmod (CONFIG_PACKAGE_kmod-usb-net-rtl8150=y I believe.) You will probably want some additional packages to achieve what you want.

Wireguard server and AdGuardHome adblocker

Will you need VLANs (ie do you have guest networks, iot networks, etc.)?

Helpful link: https://openwrt.org/docs/guide-user/network/wifi/dumbap
Especially see the videos there.

Note that if VLANs are required for you, your R7800 does NOT use DSA, it uses the older switch interface. Here is a screenshot the swtich config of my R7800 using VLANs for reference.


Thank you for the links.
No, no VLAN's.
But I prefer an USB SSD for booting but I'll take a look how to accomplish that.

Why? What is your use case? uSD is simplistic. Have an external USB3-SSD for storage. I have this setup for NAS purposes.

I thought because a SSD is more stable as a uSDcard. But I've found a 32GB sandisk which will do for the moment.

The rootfs on uSD is rock solid. If you want storage, add a USB SSD. If you do not need storage, don't bother. Default rootfs on uSD is ~100 MiB. That is plenty but if needed you can scale it.

If you're worried about durability of the uSD card (a common concern on the Pi), then rest easy. When OpenWrt is running normally, it does not write anything to disk as all logging is to memory-based files. Of course you write disk files when you're changing configs, updating and installing software, but once set up, you don't have to worry about drive wear.

I have several uSD cards from before 2016 running Arch ARM on RPi models to this day. Must have thousands of read-write cycles without any damage or corruption. If you do get a bad uSD card eventually, reinstalling OpenWrt is soooo easy.

  1. Reimage new uSD card
  2. Restore the oh so convenient backup tarball of your settings

If you're messing around with external SSDs and if you have no need for extra storage beyond what you can do with a cheaper and easier to use uSD card, you're making your life more complex.

There are also high endurance SD cards that are supposed to be more tolerant to being written...

I've been using the same Transcend 2GB SD (note, not uSD, so older) in my RPi1B since day one,
and I was one of the 1st people to receive the RPi.

It runs 24/7, monitors my boiler. running regular Linux, hence more writes are taking place.
It's been roughly 12 years, no issues so far.

1 Like

Hello, I've already decided to stay with an uSDcard. I'm waiting for my external USB--> RJ45 adapter.
Which graphical software do you advise for monitoring network traffic?

Thanks for all the replies.

something like Send scheduled report with OpenWrt stats via mail? - #7 by giuliomagnifico ?

nlbwmon or collectd? LuCI has some built ins.

@darksky's correct, how much of a graph nerd are you, really ?

(nope, there's no monitorix package in openwrt)

I had collectd on mine for while but found that I rarely looked it... same with nlbwmon.