Meet The RouterPi, A Compute Module 4 Based GbE Router

[Zak Kemble] likes to build things, and for several years has been pining over various Raspberry Pi products with an eye on putting them into service as a router. Sadly, none of them so far provided what he was looking for with regard to the raw throughput of the Gigabit Ethernet ports. His hopes were renewed when the Compute Module 4 came on scene, and [Zak] set out to turn the CM4 module into a full Gigabit Ethernet router. The project is documented on his excellent website, and sources are provided via a link to GitHub.

A view underneath shows off the RTC, power supply, and more.

Of course the Compute Module 4 is just a module- it’s designed to be built into another product, and this is one of the many things differentiating it from a traditional Raspberry Pi. [Zak] designed a simple two layer PCB that breaks out the CM4’s main features. But a router with just one Ethernet port, even if it’s GbE, isn’t really a router. [Zak] added a Realtek RTL8111HS GbE controller to the PCIe bus, ensuring that he’d be able to get the full bandwidth of the device.

The list of fancy addons is fairly long, but it includes such neat hacks as the ability to power other network devices by passing through the 12 V power supply, having a poweroff button and a hard reset button, and even including an environmental sensor (although he doesn’t go into why… but why not, right?).

Testing the RouterPi uncovered some performance bottlenecks that were solved with some clever tweaks to the software that assigned different ports an tasks to different CPU cores. Overall, it’s a great looking device and has been successfully server [Zak] as a router, a DNS resolver, and more- what more can you ask for from an experimental project?

This CM4 based project is a wonderful contrast to Cisco’s first network product, which in itself was innovative at the the time, but definitely didn’t have Gigabit Ethernet. Thanks to [Adrian] for the tip!

26 thoughts on “Meet The RouterPi, A Compute Module 4 Based GbE Router

      1. The question is: Does it use upstream kernel? Or are you locked on some out of tree kernel from the vendor?
        OS image I can build very easily with Nix or Buildroot. But I’ve been burnt by funny boards like Odroid where you have to use their old unsecure kernel because of some proprietary drivers.

          1. @Frankel
            Support in Armbian DOES NOT IMPLICATE upstream kernel.

            I thought that I made it clear that I was talking about kernel not an OS distribution.

            Raspberry Pi 2 W is a very good example of that. There are Armbian images for it, there is Archlinux image for it but… There is no support in any official released Linux version which is a problem I personally encountered last month. One have to use vendor provided kernel sources which contains patches adding the support i.e. https://github.com/raspberrypi/linux but upstreaming is hopefully coming in 5.18! https://www.phoronix.com/scan.php?page=news_item&px=Tesla-FSD-In-Linux-5.18

            As for my experience with Odroid I had Ordroid-X where not only you had to use kernel sources from the vendor which were rather old but you couldn’t even update them yourself because there was some binary driver(s) which required the specific kernel version with all its old driver a graphic APIs.

            Perhaps the Odroid situation has changed since then but even Raspberry folks with their glorious support take time to do it.

        1. oh this again. the FUD, if you don’t use pi then you’ll be locked into proprietary kernels and proprietary bootloaders and you’ll never get to the bottom of any problem.

          no, that’s raspberry pi. it’s specifically the least open of all of the pi-alike boards. all of these things have closed components but pi is the only one that puts all the drivers in the closed bootloader and just opaque badly-designed stubs in the open source kernel.

          1. No Greg. It is not a FUD and also Raspberry itself is very bad IMHO… weird system architecture, blobs you mentioned, Zero 2 W which is only now getting support in upstream Linux
            and most importantly it is a SoC you can’t get hands on in low quantities or maybe at all if you truly wish to make a custom board!

            There absolutely are and always have been ARM boards having upstream support and no blobs. I even worked with one or two eons ago in 2015 and the situation must have gotten just better since then but still there are tons of SoCs which do not have upstream support …. for example (almost!) all those Allwinner and Mediatek ones where you can’t even get GPL stubs.

            Some Rockchip SoCs do have upstream support and you can even get them without a board. Does RK3399 in the gizmo @Clueless posted a link to have upstream support? That is the question!

      2. I’d rather not support a company whose government has been conducting large-scale genocide against numerous ethnic groups (e.g. Uyghurs) for the past decade or more. Morally, I cannot do this, and so am doing everything in my power to avoid purchasing _new_ equipment made in this place.

        Manufacturing is slowly drifting away from China, it’ll just take a bit of time. COVID-19 started the process, and now it is accelerating.

        Sad, because that company looks like it has some nice stuff, but if I support that company, implicitly I’m supporting the genocide too. Said government has also been placed under sanctions and may be further sanctioned due to their ties to another eastern-European government that’s conducting war crimes right now.

        The RPi CM4 shown there is “Made in the UK” (I believe they also manufacture these in a few other places too) and the board it’s attached to can be made anywhere that takes your fancy.

        I think from a supply-chain point of view, is a safer bet. I can theoretically buy either today, tomorrow? Who knows?

  1. If he is intending to rackmount lots of these devices in a data center then having environmental sensors would really assist in environmental monitoring of stuff like air flow though the device and managing moisture and temperature.

    if combined with data visualization like a 3D model of the datacenter, it would allow for stuff like visualizing real time airflow.

    As for practical uses of such data… that’s less clear. However it might be useful for finding other use cases like determining mean times between failure if you know about the thermal and moisture stresses on the device.

  2. Clever, but why not buy an APU2 or APU4 from PC Engines? These have a quad core Intel AMD 64bit processor + either 3x or 4x GBE ports. If you go for the APU2 then those are Intel i210 devices so quad queue on input and transmit.

    They have SATA. Mpcie expansion and sell for a little over $100 (bit higher at the moment due to electronics shortages)

    No issues with distros because they are just an Intel board (there are a couple of kernel drivers for the LEDs and switch but not much else needs worrying about)

    Cool board

    1. Why would you want the power consumption and performance limitations of an Intel/AMD for a project you can do with ARM?

      I’m not sure why anyone would need or want SATA on a router, but to each their own.

    2. Are they back in stock? They’re nice machines, I run an APU3 as my border router here.

      That said, mSATA is getting harder to come by these days (I had to hunt real hard to get one for mine), and for some applications (e.g. Ceph), 4GB RAM is a deal breaker in those cases. So a refresh of the APU hardware would be nice.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.