🛠 OpenWrt upstream 24.10 en routeur 2,5G complet

NanoPi R5S (FriendlyElec) · avance · Schéma : IMG-nanopi-r5s-avance-1-nanopir5s-openwrt.svg — NanoPi R5S sous OpenWrt 24.10 (target rockchip) : flux de données WAN GbE vers bridge lan.eth1+eth2, flow offloading matériel activé, mesures iperf3

Objectives

Install upstream OpenWrt (not just FriendlyWrt) on the NanoPi R5S: the board is officially supported under the device friendlyarm_nanopi-r5s in the rockchip target, available since the openwrt-24.10 branch (absent in 23.05). You will write the complete UCI configuration for WAN/LAN, enable hardware flow offloading — key to achieving >1 Gbps routing throughput on RK3568 — and validate with iperf3. Advanced level: sysupgrade manipulation, configuration backup, and rollback.

Hardware

Complete code

#!/bin/sh
# Configuration UCI routeur 2,5G — à adapter selon les noms vus par ip link
# eth0 = gmac0/RTL8211F (GbE WAN) ; eth1/eth2 = RTL8125BG (2,5G LAN)
uci batch <<'EOF'
set network.wan.proto='dhcp'
set network.wan.device='eth0'
set network.lan.type='bridge'
set network.lan.proto='static'
set network.lan.ipaddr='192.168.69.1'
set network.lan.device='br-lan'
add network network
set network.@network[-1].name='br-lan'
set network.@network[-1].type='bridge'
set network.@network[-1].ifname='eth1 eth2'
EOF

# Flow offloading logiciel + matériel (indispensable pour dépasser 1 Gbps)
uci set firewall.@defaults[0].flow_offloading='1'
uci set firewall.@defaults[0].flow_offloading_hw='1'
uci commit
/etc/init.d/network restart
/etc/init.d/firewall restart

# Sauvegarde puis vérification des vitesses
sysctl -w net.ipv4.conf.all.send_redirects=0
ubus call system board | head
for i in eth0 eth1 eth2; do ethtool $i | grep -E 'Speed|Link'; done
# iperf3 -s sur le R5S ; iperf3 -c <ip> -t 30 -P 4 depuis le PC 2,5G

Expected verification

ubus call system board confirms the rockchip target and the model FriendlyElec NanoPi R5S. ethtool displays 2500Mb/s on eth1/eth2 and 1000Mb/s on eth0. iperf3 approaches CNX benchmarks: ~2.35 Gbps in Rx, ~1.85 Gbps in Tx per 2.5G port, ~941 Mbps in WAN. The CPU load remains low thanks to offloading (top during the test). Note: the default firewall settings of FriendlyWrt/OpenWrt may block WAN traffic until the wan zone is accepted — run fw4 reload after modification.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials