Single Board Computer Dual Ethernet | You Call That A Router?! 2 Tiny Raspberry Pi Routers

Jeff Geerling

Subscribe Here





You Call That A Router?! 2 Tiny Raspberry Pi Routers


The Raspberry Pi 4 model B was the first model to include both a dedicated Gigabit Ethernet, port and two USB 3 ports. Older Raspberry Pis had pretty lackluster networking performance, and if you wanted to use multiple network interfaces, you’d be limited to around 300 Megabits of network throughput. But the Pi 4 made it possible to add on additional gigabit interfaces and people started using the Raspberry PI as a router, the device that controls access between a Wide Area Network (like the Internet) and a Local Area Network. (like your home Network). A popular way of doing this is with OpenWRT, a lightweight operating system designed for wired and wireless routers. I also learned the VyOS community is working on ARM support. And I’ll be testing that out soon too. The PI 4 Model B is certainly capable if you need less than a gigabit of bandwidth. But let’s be honest, the entire footprint of a basic 2-port. PI 4-based router gets pretty ugly fast. And that’s where these guys come in. This is the DFRobot Routerboard, which is literally the tiniest gigabit router I’ve ever held. It’s a case study in minimalism. And only a tiny bit larger is Seeed Studio’s Dual Gigabit Carrier board. Both of these little guys are much more compact than the PI 4-based router, and they use the Compute Module 4 which is basically a PI 4 But with all the IO chopped off. But while these boards look similar on the outside in this video, I’m going to test whether one small architecture difference has an impact on real-world router performance. The Dfrobot board uses a Gigabit PCI Express interface, while the Seeed board uses a Gigabit to USB 3.0 bridge through the PCI Express interface. In the Seeed board’s case, a network packet travels through this Network Jack to the Gigabit Nic through the USB 3.0 bus, which connects to the CM4 PCI Express bus, then back out to the CM4’s built-in, Nic and finally out the other Network Jack For the Dfrobot board, the USB 3.0 bus is eliminated. Will that make it faster? We’ll watch the video and find out. Were also gonna explore how these boards perform in general. How much power they consume and whether one of these could replace an off-the-shelf router. Looking at the Seeed board up close, There’s a lot of IO. That’s not present on Dfrobot’s board. This little Vli Chip is the heart of the operation—its, a USB 3.0 controller and its wired to both this little USB network chip and two external and two expansion USB 3.0 ports Over on the side of the Seeed board. It has a CSI and Dsi plug for a PI display and camera a 4-pin fan header with Pwm control a USB port header for internal USB 3.0 ports, a micro HDMI port for display and a USB-C port for power only. This board crams a lot of functionality into a really tight space. One thing that annoyed me, though, is the orientation of the microSD card slot on the bottom. The contact pins are actually pushed into open space. When you insert a card, so if you don’t have a good enclosure to cover that area (and prevent shorts between the pins), you could end up corrupting the filesystem just because of the physical layout of the board. Not only that if you have an HDMI cable plugged in—which, you might not if you’re using it only as a router—then. The card is upside-down and it’s really hard to pull out the card. One other design quirk is this vertical USB Type C power plug. I can imagine this thing pulling off the board due to the torque involved in the connection. I’d be gentle with the power plug on this board if you want it to last a while. Now, moving over to DFRobot’s Routerboard. Wow, this thing is tiny. And it might be small, but one critical architecture change might make it mighty. The Gigabit Ethernet chip is wired directly into the Pi’s PCI Express bus with no USB controller in the way. Other than that, this board covers the basics like power via Usb-c, a single USB Type C port with USB 2.0 speeds, a reset button, a microSD card slot and even 26 GPIO pins. But that’s it, There’s no frills here—no’t even an HDMI port for a display. This thing was made for one thing: being the tiniest little Pi router in existence. I also noticed that Dfrobot has a downloadable 3D model with a snap-together enclosure design. So I printed it on my 3D Printer. It printed fine, but I ended up having to sand down the corners on every tab since the design has basically 00mm tolerances. Once I did that, it fit together just barely, and it held the board in, okay, but I’d rather have a smaller metal enclosure. So how does it work as a network router, though? Both boards are perfect for OpenWRT, so my next step was installing it. I’ll start with DFRobot’s board. Right now, Openwrt doesn’t have a full version that works out of the box with the Compute Module 4 so until that happens, Dfrobot offers a custom image based on the latest development snapshot and there’s a link to it on the Routerboard Wiki. I downloaded that image to my Mac and decompressed the image file. Then I inserted the Microsd card. I was going to boot the Pi from and wrote the image using DD with the command. You see on the screen? I popped the microSD card into the Routerboard and plugged in the PI to boot it and well. This is a little weird if you’re used to using a monitor with your Pi. This board doesn’t have a display output, so there are only two ways you can get. Openwrt set up: first you could use a serial console through USB on another computer or second, you could plug the ETH1 port directly into a computer and access the OpenWRT web interface at I wanted to access the web interface, but which port is ETH1? It’s not labeled on the board itself, but at least it’s in the documentation. I wish the ports were labeled on the board, though. It would save me having to look it up whenever I plug in the board. Anyways, I plugged the Routerboard straight into my Mac using a separate network dongle and went to the router’s address in Safari. The default Login is root with no password and I was in. The first thing you should do is set a root password. Once that’s done, you can also log into the router via SSH in a Terminal or using Putty if you’re on Windows. The login is root@19216811. The USB 2.0 Type C port on the side is actually disabled by default. But that’s not the fault of the Routerboard. That’s a limitation of the Pi; you have to manually go in and add this configuration line in the /boot/configtxt file and reboot If you want to use USB. OpenWRT also doesn’t expand your boot volume to use all the available space on the Pi’s storage. So if you want to have all the room available, you have to. Adjust the OpenWRT root partition manually. With all that setup work done, it was time to start digging into the system First. I plugged in my Internet connection—in my case, the rest of my home. Lan—into, the ETH0 port on the right. And I installed pciutils so I could check out the Ethernet chip with LSPCI And there. It is with the r8169 driver loaded for the Realtek Gigabit Ethernet controller. Now let’s do some tests to see how well it runs. First, the most basic test. I unplugged my 10 Gigabit wired connection from my Mac and turned off Wifi, so all my network and Internet connections would go through the Router board. I ran a few Speedtests on Speedtestnet and my cable Gigapower connection actually lived up to its name, giving me around 930 Megabits of bandwidth. That’s the same result. I get over my normal home Gigabit network, so there’s no bottleneck there. So this board seems to be doing great in terms of a Gigabit Internet connection. I wanted to make sure the router could also perform when connecting through it to other devices on my home network, so I ran an iperf3 test between my Mac and my main home Network. Router 943 Megabits per second is right at the limit of the normal line speed. I get so yay, no bottleneck there either. It doesn’t seem like the board or the Pi are throttling anything at all. For my last test, I wanted to get a rough idea of how many packets per second the PI could put through in its default configuration, and I used this command with Hping to basically flood a connection through the router from my Mac on one side to a Pi running on the other side And with 64-byte packets, I was able to pump through around 77 thousand packets per second. I’ve been documenting all my testing in this Github issue and it’s linked in the description. If there are any major flaws in my tests or you have ideas for better ones. Please let me know in the comments. These are pretty basic networking tests and you can go a lot deeper testing, quality of service and benchmarking things like VPN performance. I even tried getting Flent to do some benchmarks between my Mac and another server on the other end of the router, but I was having some trouble with netperf, so I’m gonna have to put that testing on hold for now. Before I wrap up the testing on the DFRobot, I wanted to check Thermals and energy consumption. At idle, the board uses 1.79 Watts as measured by my Satechi Usb-c power meter and at maximum throughput running iperf3 and speedtest. Simultaneously, It uses 2.95 Watts, That’s pretty good for a device. You’ll keep running 24×7! The board never got hot enough to even warrant a fan, though the network chip did warm up a little to 35 degrees Celsius Now moving on to the Seeed board. It uses a Microchip LAN7800 USB Gigabit Ethernet Bridge, which is supported in the Linux kernel. It’s actually the same chip used on the Raspberry Pi 3 B+ So hopefully it’s supported out of the box. I tried swapping the Microsd card and Compute Module from the Dfrobot board to the Seeed board, but that didn’t work;. It only identified one network interface because the current OpenWRT builds don’t include the LAN7800 driver for the Pi 4 Since Openwrt is open source, I opened a [pull request](https://githubcom/openwrt/openwrt/pull/4191) to see if Openwrt might add support. So the Seeed board could work out of the box, but I was also able to get the board Fully working with Raspberry Pi OS. I even ran all my benchmarks using a custom lightweight router configuration which I blogged about on my website and I documented that experience on Github, too. While I was doing that benchmarking Github user Bobafetthotmail built a version of OpenWRT with the right driver and I got it working on the Seeed board, I had to do a tiny bit of manual work to get the LAN and WAN configuration working, but I got the Seeed board working exactly the same as the Dfrobot board. One interesting thing I noticed when I was first booting it. Was that the lights on the ETH1 port? Which is the one that goes through. USB never came on. I should note that the board I have is a late prototype and you can even see a little jumper here. That’s common on prototypes. I get It’s common for small issues like this to appear and I think they sorted out the issue with the activity lights on the final production version. But back to testing: My first benchmark running a Speedtest through the Pi wasn’t amazing;. I got just under 700 megabits, down about 25% worse than the DFRobot result. So I tried iperf3 and found the throughput was similar between two devices in my House: around 700 Megabits And to round it out using hping, I measured just over 36,000 packets per second of throughput, meaning for small packets. This board has half the capacity of DFRobots. I could see that the bottleneck was IRQ. Interrupts, which I measured with atop Interestingly. I didn’t see the same thing on the Dfrobot board, so I’m guessing the driver for its PCI Express Realtek chip or maybe even the Realtek chip itself does some offloading that saves the Pi’s CPU from being crushed by the packets? This is behavior. I’ve seen on some other network cards on the Pi too, So it’s not too surprising. And before you comment on how I need to use Irqbalance—i know, you’re out there with your finger on the comment button, right, Now—i tried that too, and it seems like on the Pi. Each network interface is pinned to one CPU core. And just to be thorough. I flashed Pi Os to the Microsd card, booted the Seeed board with that and ran an iperf test directly through the LAN1 port and it was still giving me less consistent. Numbers maxing out around 700 Mbps. The Built-in network interface, using the same cable plugged into the same port on my switch tested with the same devices was getting 930 megabits, so there’s definitely some overhead using the USB-to-Gigabit architecture like the Seeed board does. But is that a show-stopper? Well, if you have a slower Internet connection and want to be able to plug in an SSD and use the router as a little NAS too, that might be a compelling reason to buy the Seeed board instead of the Dfrobot board. There are plenty of other nice features. I covered earlier too plus. I like the fact that all the ports are on one side, making it simpler to mount it somewhere without a spaghetti mess of cables. Before I wrap up here are the benchmarks for energy consumption: It uses about 4 Watts at idle and 5 Watts fully saturated And that’s a big difference from the DFRobot board, which uses about half the energy. With that, increased wattage comes a little extra heat, too. This board runs pretty hot, and I’d worry a little about the network and USB chips, which are sandwiched under the CM4 board with no airflow to them. You definitely need a fan with Seeed’s board, but you could probably get away with just a heat sink on the PI on the Dfrobot board. But what about wireless? Can these devices also act as wireless routers or WAP’s Well? Technically, they can. And you could use the Pis built-in 802.11ac Wifi. But I should warn you that the built-in Wifi chip is not great for sharing with multiple wireless devices and in my testing, I wasn’t able to get more than 60 Megabits of Wifi data in the best case, Plus Openwrt doesn’t support the Compute Module 4’s Wifi out of the box right now, so I had to do a couple hacky workarounds to get it working. If you wanna build the best Raspberry Pi Wireless Access Point. Well, let’s just say I’m also working on that. Maybe using this Wifi 6E Intel chip for over a gigabit of Wifi. Unfortunately, this chip won’t work on either of these router boards due to their hardware design. So while these boards look similar on the outside, their internal architecture makes a big difference if you want to use them as routers. Different use cases will dictate which one you might choose if you do like building your own router with a PI And price may also impact your decision. The DFRobot CM4 Iot Router Board is $30, and the Seeed Studio Board is $45. It’s not a huge difference, but pair that with a Compute Module 4 and you’re looking at spending at least $60 to get one of these tiny Gigabit routers. You can get a decent budget router for around the same price. But the PI is more upgradeable and often much more customizable. But going the opposite direction. I’m also testing a custom dual 2.5 Gigabit Pi Router build, which might blow both of these tiny boards out of the water, both in price and performance. So subscribe. So you don’t miss it? Until next time, I’m Jeff Geerling.

3d Printed Master Chief Helmet | 3d Printed Halo Helmet

Transcript: Hey, how's it going, guys? Just, uh, thought I would share with you. A project I've been working on. This is my master chief or your halo mark 6 helmet. And this was 3d printed on my ender threes. Uh, so I've got an Ender, Three and Ender, Three pro. And,...

read more