Two Tiny Dual-Gigabit Raspberry Pi CM4 Routers

Since I started testing various PCI Express cards on the Raspberry Pi Compute Module 4, I've been excited to see what new kinds of custom networking devices people would come up with.

Well, after months of delays due to part shortages, both DFRobot and Seeed Studios have come out with their 2-port Gigabit router board designs, and I was happy to receive a sample of each for testing:

DFRobot and Seeed Studios Router Boards with Dual Gigabit Ethernet

The boards are tiny, and even with the Compute Module 4 installed, they are incredibly small—take a look at the entire assembled DFRobot unit, complete with a Raspberry Pi attached:

DFRobot CM4 IoT Router Board with Raspberry Pi CM4 and Quarter

These boards are a huge upgrade from any typical Pi 4 model B multi-port router solution, since you not only have half the required device footprint, you also get two ports side-by-side and don't need an extra USB Gigabit network dongle hanging off a USB 3.0 port!

Plus, with the freedom to access the Pi's x1 PCI Express lane directly, DFRobot's board attaches the second Gigabit NIC directly to the bus, instead of through a USB 3.0 controller, like Seeed Studios did. Look at the benchmarks further down this post to see what kind of difference that architecture shift made.

I have an entire video dedicated to reviewing these two tiny router boards on my YouTube channel, but I'll provide a top-level summary and the benchmarks in this post.

Jeff Geerling holding Raspberry Pi Compute Module 4 based DFRobot router board mini
It really is a tiny router! Click the image to see the full video review of these boards.

OpenWRT on the tiny CM4

OpenWRT is about to release a new version compatible with the Pi 4—but that doesn't mean everything will work perfectly on the Compute Module 4 out of the box.

DFRobot offers a customized OpenWRT image download on their Wiki, but Seeed does not. Currently, for the Seeed board, you have to manually compile a version of OpenWRT to work with the LAN7800 USB to Ethernet bridge chip on the board. That is, unless this pull request gets merged in someday.

With Pi OS, both boards will work out of the box with both ports, but then you'd have to set up all the routing functionality by hand.

I was able to get all OpenWRT's functionality working well, though to get WiFi working, I had to employ a few hacky workarounds. WiFi Access Point performance using the built-in 802.11ac chip over SPI is not amazing, though—I could only route around 60 Mbps through the Pi under ideal conditions.

I'm hoping to build a better Pi WiFi 6E router using Intel's AX210 chip, but that's a project for later this year!

Benchmarks

I ran three simple benchmarks to get a feel for the performance of the two boards—and the main thing I wanted to test was whether either would bottleneck a gigabit network connection. The major difference was the architecture of the second Gigabit adapter. The first adapter on each board is supplied by the built-in Broadcom gigabit NIC on the Compute Module itself, but the second one is routed through the Pi's PCI Express bus.

  • For the Seeed board, there is a USB 3.0 chip on the PCI Express bus, and a Microchip LAN7800 USB to Gigabit Ethernet NIC on that bus.
  • For the DFRobot board, there is a Realtek 8111h Gigabit NIC directly attached to the PCIe lane.

How much of a difference does that make? Well, it's pretty noticeable:

Bandwidth and throughput graphs showing DFRobot and Seeed Raspberry Pi Compute Module 4 Router Boards

Testing method and full results in these GitHub issues: DFRobot board, Seeed board.

On the Seeed board, the overhead of the USB 3.0 bus and hardware and driver limitations cause interrupts to stall on one CPU core (as measured by atop), and the router can't put through more than around 700 Mbps.

On the DFRobot board, I didn't see any indication the CPU was getting overloaded even under longer stress tests with a full gigabit of data going through.

And that overhead is most apparent when sending through small packets—using hping, the Seeed board could only handle half the packets per second of the DFRobot board.

Power consumption offers a similar story: the DFRobot board (which, admittedly, has many fewer features and I/O to support!) uses half the power as the Seeed board:

Power consumption of Seeed and DFRobot CM4 router boards

Under 2W at idle is pretty respectable for a full gigabit router!

Conclusion

These little routers aren't for everyone. If you're passionate about networking and are familiar with the basics, they're a fun way to build a reasonably-performant network router without breaking the bank.

You can buy them from their respective stores:

They each have their own limitations, and I'm also looking forward to testing out a more full-featured (and full-priced!) Compute Module 4-based router I'm building with Dual-2.5 Gbps router with WiFi 6E as I mentioned earlier. Stay tuned and subscribe to my YouTube channel or this blog's RSS feed if you don't want to miss it!

Comments

Intel wifi chips do not support 5Ghz AP mode. FYI.

According to Intel's support doc, this is true, and I confirmed it on the AX200... but I was hopeful the AX210 might support it. Something like the PN02.7 could work, but those cost a lot and don't seem like they have any kind of open source drivers yet :(

Very much looking forward to replacing my current PI3B+ Router on a stick setup with the DFRobot + CM4. Glad I pick the right one with both nics on the PICE bus.

Hi, I've bought for my pleasure a DFRobot CM4 carrier and I have a small issue with it. After flashing the "official" dfrobot openwrt image router won't boot (probably). LEDs PWR and ACT lights are constantly on (they don't blink); furthermore, if I plug ethernet cable into ETH0 (WAN) port - lights go up BUT if the cable is in ETH1 (LAN) they don't. I have tried different sd cards (I guess that this is not the cause of the problem). Unfortunately I have only one CM4 board :/
Do I understand correctly that serial tty comes up when opewrt successfuly boots up ?

Okay it seems that I have to buy a motherboard as well. Totally missed that piece of information.
No possible way of switching priority between SDCard and eMMC I guess ?!

I think that might be done by guide from this wiki page https://wiki.dfrobot.com/Compute_Module_4_IoT_Router_Board_Mini_SKU_DFR… :

eMMC Installation
Suitable for Compute Module 4 with eMMC version.
1 Requirements
USB-C data cable
rufus Mirroring tool
7-Zip Compressed File Manager
rpiboot eMMC tool
System Mirror

2 Enter Boot Mode
i Toggle RPiBOOT on the CM4 router to side 1, and disable eMMC startup
ii Use the USB-C data cable to connect the computer and the USB data port of the CM4 router, and then connect the CM4 router to the power supply
iii Install and run the rpiboot tool on the computer, you can see that eMMC has been displayed as a disk

3 Use 7-Zip to decompress the system mirror compression package, get the img image file

4 Use rufus to open the decompressed img file, and select the corresponding drive letter of the card reader to write.

hello jeff

would the dfrobot board+ CM4 perform well as part of a pi-hole solution?

have you tried running the dfrobot board with openwrt 21.02-rc3? I have flashed it when I use this image only one of the NIC's appear.

Same for me. Seems one has to manually load/install the driver for the Realtek NIC. I’m trying to find the correct driver now but it is not obvious which one it is.

What I did was plug the NIC that works into my switch, then from the OpenWRT GUI on the one NIC, assign your default gateway to the correct one you currently have, then set your DNS too so the OpenWRT pi router can have internet access.

After that, I was able to update the opkg from within the interface and download the kmod-r8169 package. Then you will see your other interface and you can then assign that to your WAN and setup both how you please.

You might have an IP address conflict if your current router is 192.168.1.1 too. In that case just unplug your current one temporarily and then change the OpenWRT interface to something different. Then you can plug it all back in and access both routers.

The easiest way to do this is to either:
1. Download the driver for your flavour and version of OpenWrt (e.g. for 21.02.0-rc3 use this link - https://downloads.openwrt.org/releases/21.02.0-rc3/targets/bcm27xx/bcm2…), copy it to your OpenWrt instance via SCP and install using "opkg install kmod-r8169_5.4.124-1_aarch64_cortex-a72.ipk"
2. Change you OpenWrt instance temporary to be a Wifi / Ethernet client to your existing network by editing your network configuration in "/etc/config/network", setting a static ip address and DNS to your existing router for the "lan" interface and then running "opkg install kmod-r8169"|

> Seems one has to manually load/install the driver for the Realtek NIC.

I just ran into that this evening, bringing up the hardware that arrived from across the pond a couple of days ago. There are five modules you need to add, and it might be easier to install them over a serial connection. I've documented what I did over on my website: https://alfter.us/2021/09/17/rpi-cm4-dfrobot-iot-router-carrier-board-m…

hello jeff

i finally have the CM4 2G lite and the DFrobot board.

I wonder if it might be easier to install and use Pi Os (Buster) instead of WRT?
I am more familiar with setting up the pi with Raspian/Pi Os

i have formatted the sd card and installed Raspian-Buster.

Would i now need to edit the config file to enable usb or should that work OOB?
presumably i can ssh into the board through usb or ethernet?

If anyone has done this and can give some tips or a walk through that info would be gratefully received.

Yes i am new to this so yes the above are newbie questions.

Thank you.

Hi Jeff,

So which of these two devices would you recommend to use with connectify.me VPN?
I need two LANs, but also a minimum of two USB for LTE modems / etc and WiFi built into Raspi.
Will it work with CM4's built-in wireless network?

Is it better in this case to sacrifice some speed over two USBs, or is it better to keep speed, over of some HUB - using USBC.

This especially was useful: "On the Seeed board, and the router can't put through more than around 700 Mbps."

Which means I would not do sufficiently better than my current stock Raspberry Pi 4 in an Argon One case with a USB 3 as eth1.

(Amazing how hard it is to find reviews with the hardline Ethernet performance of routers.)

-ahd-

Hello, I bought one of these since it looked so good on your video. Is there something I have to do other than plug in a 3a 5V charger to the usb marked POWER? I'm on my second one and the PWR light won't so much as blink.

Hi Jeff,

I have been using an normal Raspberry Pi 4 as wifi access point and this very unstable. I'm using the original power supply. If freezes and reboot. As a work-around I'm using a travel wifi router. I was wondering if this could have more success with one of those two? I use it as on the road backup for pictures, store them and serve them over Wifi & http. So the size is important.

Regards,
Dion

Hi Jeff,

Been reading your blogs and learning a lot, but wondering what your take on the following is.
I would like to monitor (live if possible but also based on logs) my internet usage. A bit like in your blog https://www.jeffgeerling.com/blog/2021/monitor-your-internet-raspberry-… but with a twist.
In that blog we see dns requests and speedtests next to ping responses. I would however like to also see actual throughput.
Something like in this post: https://www.technicallywizardry.com/raspberry-pi-network-monitor/

Stumbling across this blog about the DFRobot CM4 it seems to be the ideal device to accomplish this.

For me the ideal situation would be a Raspberry type of device that you can put in between network devices (like home router and ISP box) that can give information on your actual usage and problems.
Maybe even with some hooks into it so you could monitor it (via snmp?) from another PI with LibreNMS / Nagios or even PRTG on a windows box.
Would it be possible with a DFRobot of a PI with additional USB-Ethernet and do you see this as a challenge to write a step by step blog about?

Thanx for your answer, kind regards,
Jeroen

This gosh dang thing is kicking my rear end with the Wifi..... I have the wifi up and running thanks to your "hacky workaround (https://bityl.co/AJOH)" but i cant for the life of me get an IPv4 over wifi. I've tied the wifi to the "lan", I've created an additional interface(same page as eth0 & eth1) as wlan then created a bridge assigning the wlan and lan to the same br. connecting it with an ethernet cable is fine and wont be using the wifi for anything other than just being able to connect directly to the CM4 Router over wifi should i need to in the futre for any configuration changes. I've got a seperate Dump WAP setup for the house for normal use but I still want to be able to wirelessly connect directly to the router... technically it does connect and shows my mac address as a client and for some reason assigns me an ipv6 address but no ipv4 even though i disabled the ipv6 .... ugh so frustrating im sure its something stupid simple im missing.

man, anyone able to get the wifi to issue dhcp from the lan? i got the wifi up and running and can even connect and even tho the wifi was assigned to the lan dhcp isn't assigning me an IP, if i plug in with an ethernet cable i get an IP just not over wifi for reasons i don't understand, i have even gone the route of creating a wlan interface and bridging the wlan and lan and that doesn't work either 🤨 what am i missing here?

Hey Jeff,
Just bought the seeed router. Very nice.
I want to use this as a PI starter machine to experiment on.
How would I backup the OpenWrt image on the emcc so I could restore it later?

Russ

You could use 'SD Card Copier' on Pi OS, but for OpenWRT... I'm not 100% certain. I would imagine there's a backup mechanism within OpenWRT itself?

Hi Jeff! Do you know if the Raspberry CM4 can support a 5G module and function as a router? If so could I buy one from you or could you post instructions on how to build one? I am trying to get a fairly priced LTE/5G router. 5G routers such as the Peplink Max BR1 Pro 5G are out of my price range.

Hi Jeff,

I purchased the DFRobot board and a CM4 with eMMC, flashed it with both the stock OpenWRT firmware and the preconfigured firmware provided by DFRobot. When I powered up the board, the activity light flashes long 4 times and short 4 times. The pi4 documentation says that the board is unsupported. Can you shed some light on this?

What about the DFRobot with Wifi ?
What about the DFRobot with Wifi + 5G?

There is a way?

Is it possible to use these as a Raspberry Pi Hole?

Sorry for bumping an old post, but did you ever see the request someone sent to test Router7 on one of these Pi boards?
https://github.com/rtr7/router7/issues/2

Don't know if you even have the board still but if you did I would love if you could do a follow on for it's performance.

The Seeed board has the CM4 Ethernet_SYNC_IN/OUT pins exposed at testpad 14 and 15 so you can sync the ethernet hardware timestamping timer with PPS for PTP. Are these signals available somewhere on the DFRobot board as well?

Man, im taking another stab at the wifi on this - I've got OpenWrt 22.03.3 r20028-43d71ad93e / LuCI openwrt-22.03 branch git-22.361.69894-438c598 running on my Raspberry Pi Compute Module 4, Wireless, 4GB, 32GB with the DFRobot IoT Router. The is my main router and the functionality has been great. I've got Dynamic DNS setup, have a handful of devices with assigned IPs for portforwarding. A seperate WRT3200ACM has been setup in bridge mode like dumb AP to serve as the wireless throughout the house. And I've got Pi-hole setup on a seperate Pi4. This has been my setup for a while now and everything works great except for being able to connect directly to the Pi CM4's wireless - it will connect but gets it never gets DHCP from eth1. Any help would be greatly appreciated - Wireless and Network Configs below:

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

config globals 'globals'

config interface 'lan'
option proto 'static'
option netmask '255.255.255.0'
option device 'eth1'
option ipaddr '192.168.1.1'
list dns '192.168.1.4'

config interface 'wan'
option device 'eth0'
option proto 'dhcp'
option type 'bridge'

config interface 'wlan'
option proto 'none'
option device 'radio0.network1'

Wireless Configuration:

config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
option band '5g'
option htmode 'VHT80'
option channel 'auto'
option cell_density '0'

config wifi-iface 'default_radio0'
option device 'radio0'
option ssid 'OpenWrt'
option encryption 'psk2'
option key 'PASSWORD'
option mode 'ap'
option network 'lan wlan'

Hi,
I have a CM4, 4GB RAM, 8GB eMMC and a DFROBOT board. The WebUI from Openwrt shows the right platform. BCM2711 and ARMv8 as architecture. BUT if i have a look at /proc/cpuinfo or lscpu or hwinfo and alike, I get the output, hat the board has a BCM2835 CPU.
I am running Openwrt 23.05.3.
Can you take a look at your system.
My guess is, that my eeprom version is to old. Ist is from 2021/12/02