This guide turns OpenWrt into a routed Wi‑Fi client: an OpenWrt radio joins an upstream network, the wwan interface receives DHCP, and the downstream LAN uses a different subnet and NAT. This is not a bridged AP design; use the source's WDS or relayd guides when both sides must share one subnet.1
Warning: Do not connect the OpenWrt router to the main router while changing its LAN address. Reset to OpenWrt defaults when necessary, configure through a LAN port, and keep a direct recovery path for any change that removes LuCI access.1
Address plan and assumptions
Assume the upstream Wi‑Fi uses 192.168.1.x. OpenWrt must use another subnet, such as 192.168.2.1, so the two networks do not overlap. Before starting, record the SSID, encryption, optional BSSID, the radio to use, and the firewall zones already present on the device.1
The source notes that a device with more than one radio can use the second radio by changing index 0 to 1 and wlan0 to wlan1. Do not guess radio names; inspect the device itself.1
Configure it in LuCI
- Do not wire the OpenWrt router to the main router. Reset to OpenWrt defaults if the current configuration is unclear.
- Connect the computer to an OpenWrt LAN port and open LuCI at
192.168.1.1. - Open Network → Interfaces, edit
LAN, and keep the protocol as Static address. - Move the LAN address to another subnet, for example
192.168.2.1, then click Save. - Click Save & Apply, disconnect and reconnect the computer so it picks up the new address.
- Open Network → Wireless and click Scan.
- Select the target Wi‑Fi network and click Join Network.
- Select Replace wireless configuration when the existing Master AP should be removed from that radio.
- Enter the Wi‑Fi password. In the normal case, the client firewall zone is
wan/wan6. - If the
wanzone does not exist, do not save the Wi‑Fi configuration yet; create the zone in the next subsection and repeat the Join step. - Keep the new network name as
wwan, select thewanfirewall zone, and click Save. - In the client settings, choose the Mode that matches the upstream network, set Width to match the upstream network, and do not change the channel used by the network being joined.
- Click Save, then Save & Apply. View the
wwanaddress under Network → Interfaces; it may not appear on every status screen.1
Create a WAN zone when it is missing
If the wan zone is missing, open Network → Firewall, click Add, and create a zone equivalent to the default WAN zone. Return to Wireless, join the network again, leave the new network name as wwan, select wan, and save. Do not assign a client radio casually to LAN, because that removes the boundary between the upstream and management networks.1
Configure and inspect it from the command line
Enable the radio, save the wireless file, and start Wi‑Fi before scanning:
| |
Inspect the interface names and scan nearby networks:
| |
The following sample shows how to read SSID, BSSID, frequency, signal, and encryption. It is illustrative; do not copy the sample SSID or BSSID into a real network:
| |
These are the UCI values changed by the example procedure. Violetta, the BSSID, and myWifiPasswordHere are sample data; replace the SSID, BSSID, encryption, and key with the results of your own scan. The key shown here is not a real credential.
| |
Verification, limits, and common failures
A client should receive DHCP from the upstream Wi‑Fi, obtain a default route through wwan, reach the gateway and DNS, and reach the Internet. If AP and client mode must share one radio, check the driver limitation; the source links a Cannot enable client and AP on same radio issue. If LuCI disappears after the IP change, try 192.168.2.1, use the correct LAN port, and follow the model-specific recovery path rather than wiring into WAN.1
Do not confuse this design with a Bridged AP: routed client mode creates a separate subnet. When one broadcast domain is required, switch to WDS or relayd and check the compatibility conditions for both devices.


Góp Ý / Bình Luận / Đánh giá