Configuring OpenWRT as a Wireless Bridge | Original

Home PDF Audio

With the help of Grok, I am still trying to work on the following.


To address your query, “is it right?” regarding the steps to configure OpenWRT as a wireless bridge, and to provide the correct ways to achieve this, I’ll evaluate the steps you provided and refine them based on best practices for OpenWRT. Your goal is to set up your OpenWRT router (e.g., Xiaomi Mi Router 4C with OpenWRT 24.10.0) as a wireless bridge—connecting wirelessly to an existing Wi-Fi network as a client and sharing that connection via its own Wi-Fi access point (AP) or Ethernet ports, keeping all devices on the same subnet as the main router.

Your provided steps are mostly accurate but miss a critical adjustment to ensure proper bridging and avoid IP conflicts. Below, I’ll first assess your configuration and then present the correct, complete steps to achieve a wireless bridge in OpenWRT using the simple bridge method (client + AP on the same bridge), which aligns with your intent. I’ll also briefly mention an alternative using relayd for cases where the simple method fails, though your setup likely supports the simpler approach.


Evaluation of Your Provided Steps

Your steps aim to:

  1. Connect the OpenWRT router as a client to an existing Wi-Fi network.
  2. Set up an AP to broadcast a new Wi-Fi network.
  3. Bridge the client and AP interfaces to share the internet.

Here’s a quick review:

What’s Missing or Wrong?

With this in mind, your steps are “mostly right” but incomplete without adjusting the lan interface settings. Below are the corrected steps.


Correct Steps to Configure OpenWRT as a Wireless Bridge (Simple Bridge Method)

This method sets up your OpenWRT router to connect to an existing Wi-Fi network as a client and share that connection via its own AP or Ethernet ports, all on the same subnet as the main router (e.g., 192.168.1.x). Here’s how to do it via the LuCI web interface:

Prerequisites

Step 1: Log In to LuCI

Step 2: Configure the Wireless Client

Step 3: Adjust the LAN Interface to DHCP Client

Step 4: Configure the Wireless Access Point

Step 5: Verify the Bridge

Step 6: Test the Setup


Why This Works


Alternative Method: Using relayd (Pseudo-Bridge)

If the simple bridge method fails (e.g., due to wireless driver limitations), you can use the relayd package for a pseudo-bridge. This creates a routed setup where the OpenWRT router’s clients are on a different subnet, but it’s more reliable on some hardware. Here’s a brief overview:

  1. Install relayd:
    • Go to System > Software, search for relayd, and install it.
  2. Configure Wireless Client:
    • Join the main Wi-Fi, but assign it to a new interface (e.g., wwan) set to DHCP client.
  3. Configure LAN:
    • Set lan to a static IP (e.g., 192.168.2.1) with its own DHCP server.
  4. Set Up relayd:
    • Configure relayd via SSH or LuCI (under Network > Hostnames) to relay between wwan and lan.
  5. Configure AP:
    • Set the AP on the lan network.
  6. Test:
    • Devices on OpenWRT_AP will be on 192.168.2.x, with internet relayed from the main router.

Note: This isn’t a true bridge (different subnets), so use it only if the simple method doesn’t work. For your Xiaomi Mi Router 4C with OpenWRT 24.10.0, the simple bridge should suffice.


Conclusion

Your original steps are mostly correct but incomplete without setting the lan interface to DHCP client mode to avoid IP conflicts and ensure proper bridging. The corrected steps above provide a reliable way to configure OpenWRT as a wireless bridge. If you follow them, your router will connect to the main Wi-Fi and share that connection seamlessly via its AP or Ethernet ports, all on the same subnet. Test the setup, and if issues arise (rare with modern OpenWRT), consider the relayd alternative.


Back 2025.04.02 Donate