🛠 Routeur / passerelle réseau double Gigabit avec OpenWrt et PoE

Radxa ROCK 3B (Rockchip RK3568) · avance · Schéma : IMG-radxa-rock-3b-avance-1-rock3b-routeur-dual-gbe.svg — Radxa ROCK 3B sous OpenWrt, deux ports Ethernet en WAN/LAN, HAT PoE 25 W alimentant la carte via le switch

Objectives

Transform the ROCK 3B into a router/gateway: two Gigabit ports (gmac0 + gmac1, both rgmii-id in the mainline device tree), a PoE-powered port via the Radxa 25 W HAT (the port near the USB stack), and an official OpenWrt section in the Radxa documentation. Typical case: ISP box → WAN (eth0), LAN (eth1) to a switch, with the board powered by the switch's PoE — zero mains power supply.

Hardware

Complete code

# 1. Prérequis ABSOLU sur toute image non-Radxa : U-Boot récent, sinon eth1 meurt
#    (« rk_gmac-dwmac ... eth1: Failed to reset the dma ») — flasher l'image SPI
#    Radxa actuelle ou un mainline rock-3b-rk3568_defconfig AVANT tout le reste.

# 2. Option A — OpenWrt (section officielle docs.radxa.com other-os/openwrt) :
#    écrire l'image, configurer /etc/config/network (eth0=WAN wan, eth1=LAN lan),
#    firewall zone wan=LAN->WAN ; le boot NVMe OpenWrt est du DIY (forum 225022).

# 3. Option B — Debian + NAT manuel :
sudo apt install isc-dhcp-server nftables
sudo sysctl -w net.ipv4.ip_forward=1
sudo nft add table ip nat ; sudo nft add chain ip nat postrouting '{ type nat hook postrouting priority 100 ; }'
sudo nft add rule ip nat postrouting oifname "eth0" masquerade
sudo ip link set eth1 up ; sudo ip addr add 192.168.10.1/24 dev eth1

# 4. Débit par port (~940 Mbit/s attendus) :
sudo apt install iperf3 ; iperf3 -s -D ; iperf3 -c <ip-de-la-carte>

Expected verification

ip -br addr shows eth0 (WAN) and eth1 (LAN) active; ethtool indicates 1000 Mb/s on both; a client behind eth1 reaches the Internet (NAT) and iperf3 approaches 940 Mbit/s per port. The board runs, powered solely by the Ethernet cable from the PoE switch.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials