An OpenWrt Beginner's Guide

Preface

A first encounter with the OpenWrt Project might be overwhelming so I created this post to jumpstart newcomers. Note that an OpenWrt Journey is not a walk in the park and may consume countless hours of learning and setup while harvesting information - even when tech experienced.

Planning

Setup your Network Topology based on Home layout and required wired connections.
Plan your Wi-Fi Access Point placement. Two examples:
*All-in-one: Wifi Router (small area, <=4 wired connections)
*Modular: Core Router + Switch + Access Points (large area, >4 wired connections)

Draw a network diagram ie. with draw.io with desired Topology
2023.drawio

Buyer tips

When looking for new hardware you can check following popular devices
note: look into forum threads about experience from others beforehand!

Core Router

SFP+/2.5 GbE - CWWK N100 SFP
SFP+/1.0 GbE - BananaPi BPi-R4 (see also this)
SFP+/1.0 GbE - Mikrotik RB5009
2.5 GbE - BananaPi BPi-R3 mini
2.5 GbE - CWWK N100 mini (see also this and this)
2.5 GbE - Hardkernel Odroid H4+
2.5 GbE - LattePanda Mu N100 with Full-Function Carrier
2.5 GbE - Minisforum UN100D
2.5 GbE - NanoPi R5C / NanoPi R6S (pending official support)
2.5 GbE - Raspberry Pi 5 with Dual 2.5 Gbps HAT
1.0 GbE - GL.iNet GL-MT2500
1.0 GbE - NanoPi R4S 4Gb
1.0 GbE - Raspberry Pi CM4 with DFRobot Routerboard

*2nd hand
10 GbE - Lenovo M920q with dual 10GbE NIC

Managed Switch PoE

2.5 GbE - Netgear MS108EUP
2.5 GbE - TP-Link SG2210XMP-M2 (SFP+)
2.5 GbE - Ubiquiti USW-Pro-Max-16-PoE (SFP+) with Etherlighting
2.5 GbE - Zyxel XMG1915-10EP (SFP+)
1.0 GbE - Netgear GS308EP / GS316EP (SFP)
1.0 GbE - TP-Link TL-SG108PE / TL-SG1210MPE (SFP)
1.0 GbE - Zyxel GS1915-8EP / GS1920-8HPv2
*Switch running OpenWrt: Netgear GS108T or GS310TP (metrics export to Grafana)

Access Point PoE indoor

mt7986 - Netgear WAX220 2.5 GbE
mt7986 - TP-Link EAP683-LR 2.5 GbE (pending support)
mt7981 - Ubiquiti UniFi U6+
mt7981 - Zyxel NWA50AX Pro 2.5 GbE
ipq8072 - Netgear WAX218

*2nd hand
ath79 - TP-Link EAP225
ath79 - TP-Link EAP245
mt7621 - TP-Link EAP613
mt7621 - TP-Link EAP615 see review
mt7621 - Ubiquiti UniFi 6 Lite
mt7621 - Zyxel NWA50AX

Access Point PoE outdoor

ath79 - TP-Link EAP225 Outdoor
mt7621 - Zyxel NWA55AXE
ipq6018 - TP-Link EAP610-Outdoor (pending support)

Wifi Router

mt7988 - BananaPi BPi-R4 (see here)
mt7986 - Asus TUF-AX4200 / Asus RT-AX59U
mt7986 - BananaPi BPi-R3 mini
mt7986 - GL.iNet GL-MT6000
mt7981 - ASUS RT-AX52 (pending support)
mt7981 - Cudy WR3000 / Cudy M3000
mt7981 - D-Link M30 Aquila Pro AI
mt7981 - OpenWrt One
ipq8072 - Dynalink DL-WRX36

*2nd hand (read forum about possible issues)
mt7622 - Belkin RT3200 / Linksys E8450
mt7622 - Netgear WAX206

Travel Router with Travelmate

mt7981 - Cudy TR3000
mt7981 - GL.iNet GL-MT3000
mt7628 - Cudy TR1200
mt7628 - GL.iNet GL-MT300N V2

Fiber

With an SFP interface you can connect devices with Fiber Optic cables. Besides cool to own, this is a solution for long distance connections (>90m)
*module: opt for BIDI - LC - Single-mode with either SFP (1.25Gbps - i.e. Ubiquity UACC-OM-SM-1G-S-2) or SFP+ (10Gbps) - see also here for devices
*cable: OS1 for indoor / OS2 for outdoor

Other

*budgettips: Netgear GS308E / Zyxel WSM20
*Tri-band devices: here
*PCIe NIC adapter: 2.5G Realtek RTL8125B(G) | 10G Intel X550-T2 / Marvell AQC107/AQC113C
*USB NIC adapter: 2.5G Realtek RTL8156A+ | 1.0G Realtek RTL8153C+
*USB Wi-Fi adapter: here - see also this post
*USB Chargers: lygte-info and chargerlab
*Range extender: Cudy RE3000

Installation

Lookup your OpenWrt device for instructions, read Starter FAQ and Quick start guide

  • flash factory image
  • connect OpenWrt device lan-port with PC (wifi off) and goto 192.168.1.1 in browser
    router: in Network > interfaces add wan with DHCP client on eth1; in lan set IPv4 to 192.168.0.1
    accesspoint: in Network > interfaces edit lan and set protocol to DHCP client; enable Wi-Fi network in Network > Wireless and set country code. With multiple APs set different channel per AP, ie. ch1 on AP1 and ch11 on AP2 for 2.4 Ghz. See Dump Access Point
  • Save & Apply (keep settings) - when device does not come up after 5min powercycle it

*for serial connection: buy a CP2102 USB to TTL Converter and connect TX, RX and GND (do not connect VCC)

Upgrade

Upgrading is recommended when a new OpenWrt release is out (check release notes beforehand)

Packages

There is a huge Package Library (hit Update lists in System > Software). Favored for a Router are i.e.

  • advertisement blocking - options
  • malicious host blocking - luci-app-banip (select feeds like debl, feodo, firehol1, firehol2, greensnow, iblockspy, proxy, sslbl, threat, tor,cinscore, etcompromised, talos, bruteforce)
  • port info - luci-app-lldpd
  • traffic shaping - luci-app-sqm; DOCSIS settings; variable bandwidth: cake-autorate
  • traffic limiter - luci-app-nft-qos

Privacy/Security

To secure devices and guard privacy

  • use a different DNS resolver than the one provided by your ISP - in Network > Interfaces > wan, uncheck 'Use DNS servers advertised by peer' and add DNS server 1.1.1.1 and 1.0.0.1
  • encrypt DNS traffic use DoH or DNSCrypt - see comparison
  • enforce Network isolation for wireless devices - see Guest WLAN (needs dnsmasq+firewall)
  • enforce Network isolation for logical grouped devices - setup 802.1q VLAN to isolate guest, iot, home etc devices case1, case2, case3. Tip: check also wifi-vlan feature
  • secure Internet connection and mask IP address with Wireguard client
  • secure remote access to home network with Wireguard server
  • perform local vulnerability scan with Nessus Essentials
  • perform local portscan with nmap
  • perform remote portscan with port-scanner

Monitoring

An army of Monitoring options are available with collect-mod plugins

  • Accesspoint monitoring - luci-app-statistics collectd-mod-sensors
  • Router monitoring - luci-app-statistics collectd-mod-sensors collectd-mod-thermal collectd-mod-ping collectd-mod-sqm collectd-mod-irq
  • Router traffic monitoring - luci-app-nlbwmon (extra settings are needed)
  • Export stats to Grafana - prometheus-node-exporter-ucode / collectd_exporter / nlbw2collectd

Troubleshooting

  • keep it simple and stick to defaults if possible
  • look in Status > System Log
  • familiarize yourself with terminal commands (see Appendix)
  • in case of issues search the forum and/or create a topic with your config (see Appendix)

Appendix: Collect config

Connect to your OpenWrt device using ssh, copy output of below commands and post it using the preformatted text button (redact passwords, MAC- and public IP addresses)
Screenshot from 2024-03-26 16-57-00

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
Appendix: Terminal Commands

cpu memory: htop (press F2 and enable detailed cputime)
network: ifconfig, iftop, mtr -ezb4 --report 1.1.1.1, netstat, nslookup, route, traceroute
hardware: ethtool, iwinfo, iw phy0 info, iw list
text view/edit: cat, grep, logread, nano
ps: when a command is not available then install it in System > Software
ps2: see also
https://openwrt.org/docs/guide-user/base-system/user.beginner.cli
https://openwrt.org/docs/guide-user/network/wifi/wireless-tool/wireless.utilities

Appendix: Benchmark

Cloudflare speedtest
Ookia speedtest
Bufferfloat test
iperf3 performance
Wireguard performance
Power consumption
Crusader Network Tester
Flent Network Tester

Appendix: External Resources

Embedded Hardware News https://www.cnx-software.com/
Linux (Kernel) News https://www.phoronix.com/
OpenWrt user Blog https://giuliomagnifico.blog/
Networking Fundamentals https://book.systemsapproach.org/
Networking Fundamentals https://www.geeksforgeeks.org/computer-network-tutorials/
OpenWisp https://openwisp.org/demo.html
OpenWrt Configurator https://github.com/jasrusable/openwrt-configurator
OpenWrt recent commits https://git.openwrt.org/?p=openwrt/openwrt.git;a=summary or https://github.com/openwrt/openwrt/commits/openwrt-23.05
OpenWrt Stats https://sysupgrade.openwrt.org/stats
Wifi Survey https://github.com/jantman/python-wifi-survey-heatmap or https://www.netspotapp.com/gettrial.html or using a Robot Vacuum https://github.com/ccoors/Valeronoi
Wifi SNR https://interline.pl/Information-and-Tips/Minimum-802.11-SNR-Sensitivity

Appendix: Used processor in popular ARM/MIPS SoCs
ath79    MIPS 4Kc
bcm2711  quad-core A72
bcm2712  quad-core A76
mt7621   MIPS1004Kc
mt7622   dual-core A53
mt7628   MIPS24KEc
mt7981   dual-core A53 (filogic 820)
mt7986   quad-core A53 (filogic 830)
mtxxxx   triple-core A73 (filogic 860) WiFi 7
mt7988   quad-core A73 (filogic 880) WiFi 7
ipq53xx  quad-core A53
ipq60xx  quad-core A53
ipq807x  quad-core A53
ipq957x  quad-core A73
RK3399   dual-core A72 + quad-core A53
RK3568   quad-core A55
RK3588   quad-core A76 + quad-core A55

ps: support the OpenWrt Project by making a small donation

11 Likes

For a Wifi Router advice: are ipq807x and filogic the best performing devices for 2023/2024 ?
Do you have 2.5Gbps / 1.0Gbps device recommendations for these?

edit: I digged some time into topics and found following
ipq807x - Dynalink DL-WRX36 looks cool but currently lacks DSA support
filogic - contains a growing number of devices but many are not easily flashed.

I'm not sure why you added this question to your existing thread... but look at this section:

Read and search first, if you don't find answers to your questions, that is a good place to start a new thread regarding OpenWrt + hardware questions