This video demonstrates how to transform a Raspberry Pi 5, equipped with a 2.5 Gigabit Ethernet HAT, into a capable home or travel router using OpenWrt. The presenter details the challenges of obtaining hardware and waiting for software support, then provides a step-by-step guide on building a custom OpenWrt firmware image to include the necessary drivers for the 2.5 Gigabit Ethernet HAT. The setup process for configuring WAN, LAN, and VLAN interfaces is thoroughly explained, followed by real-world performance tests. The video concludes by showcasing the system's ability to achieve near full 2.5 Gigabit throughput between VLANs, validating the Raspberry Pi 5's viability as a powerful, cost-effective router for typical home network scenarios.
Building a Raspberry Pi 5 Router with a 2.5 Gigabit Ethernet HAT and OpenWrt
0:00 Hardware Acquisition & Software Lag: The presenter shares their experience acquiring an 8GB Raspberry Pi 5 and a 2.5 Gigabit Ethernet HAT from 52Pi, noting the difficulty of obtaining Raspberry Pis due to shortages. A key challenge was the initial lack of full software support for the Raspberry Pi 5 on Linux-based firewalls/routers, including OpenWrt.
1:19 OpenWrt Firmware Selection: It was discovered that OpenWrt's "snapshot" builds do not include the web interface (LuCI). The presenter opted for the more stable 24.10 Release Candidate 2 (RC2) and used OpenWrt's online "firmware selector" to create a custom build, specifically including the r8169 firmware and kmod-r8169 packages to enable the 2.5 Gigabit Ethernet HAT.
3:34 Cost-Effectiveness: The video highlights the cost efficiency, suggesting a 2GB Raspberry Pi 5 (approx. $50) with the 2.5 Gigabit HAT (now around $30) and a power supply ($15-20) can create a functional router for under $100. OpenWrt's low resource footprint (74MB RAM, 24MB disk space) means even the 2GB model is sufficient.
4:47 Custom Firmware Build & Download: A detailed walkthrough of using OpenWrt's firmware selector is provided, emphasizing the need to select the Raspberry Pi 5, the desired stable release candidate, and to add the specific driver packages for the 2.5 Gigabit Ethernet HAT. The presenter also notes a quirky download method for custom builds (right-click "save as").
9:17 Flashing the Firmware: Balena Etcher is used to flash the compact 13MB OpenWrt firmware image onto a microSD card for the Raspberry Pi.
10:09 Initial Configuration (1Gbps Onboard LAN): Upon first boot, OpenWrt uses the Raspberry Pi's onboard 1 Gigabit Ethernet port (eth0) as the default LAN interface (192.168.1.1). The presenter demonstrates accessing the LuCI web interface with default credentials and confirms the minimal resource usage.
11:58 Reconfiguring Interfaces for 2.5Gbps LAN & WAN: The video guides through setting up the 2.5 Gigabit Ethernet HAT (eth1) as the new LAN interface (Lan2, 192.168.2.1) with its own DHCP server and assigning it to the 'LAN' firewall zone. Subsequently, the original 1 Gigabit interface (eth0) is reconfigured as the WAN interface (DHCP client).
18:11 Internet Connectivity & 1Gbps WAN Test: After re-cabling, internet connectivity through the new WAN is confirmed. A speed test on the 1 Gigabit WAN interface shows full gigabit throughput to a local speed test server, although internet-based tests yielded lower results, possibly due to double NAT.
19:51 VLAN Setup & 2.5Gbps Throughput Test: VLANs (VLAN 10 for DMZ, VLAN 20 for IoT) are configured on the 2.5 Gigabit LAN interface. An iperf test between two PCs on different VLANs demonstrates impressive throughput of approximately 2.3-2.35 Gbps, confirming the 2.5 Gigabit HAT operates at near full theoretical speeds.
26:00 Key Takeaway & Viability: The presenter concludes that the Raspberry Pi 5, paired with the 2.5 Gigabit Ethernet HAT and OpenWrt, is a highly viable and powerful solution for a basic home or travel router. It offers significant functionality (VLANs, advanced firewall rules, package support) beyond typical consumer-grade routers and is suitable for most home network scenarios, though not for high-demand services like IDS/IPS.