I am using OpenWrt 23.05.0 (r23497-6637af95aa) on a Netgear WNDR3700 v2.
I have been fighting with some sort of a bug (potentially) for a couple of weeks now,
not being able to set up my OpenWRT Router (Netgear) as a wireless bridge in order to work with my main router (ASUS). Actually this should be a pretty simple task to accomplish.
My goal was to be able to use the Lan ports of the OpenWRT Router for other devices. I have tried creating a bridge, I have tried using the relay daemon (installed with opkg). I have tried 100 times. Now I am thinking about getting a big hammer and smashing the damn thing into small pieces. Can somebody please help me. Would really appreciate it!
My setup is the following. My main ASUS Router has an IP 192.168.0.1. The Netgear OpenWRT Router connects successfully with it and obtains an IP 192.168.0.2. I can access the OpenWRT Luci Interface via the later IP from the Wi-Fi network. This works good. When I connect however to one of the LAN ports of the OpenWRT Router per wire, I loose connectivity. Somehow the bridge is not working, or the DHCP/DNS requests don't get forwarded to the main router. Or else. I am out of ideas.
What main router are we talking about exactly, what firmware is it running. OpenWrt (and non-Broadcom) or not matters here, because it decides between:
WDS/ 4addr (best, but requires OpenWrt on the main router)
routed client (inconvenient, but o.k.)
relayd (not great, but compatible with 'any' router firmware)
Your screenshots only tell half of the story, please provide the textual config files instead (make sure to redact revealing personal data, as in MAC addresses, WAN passwords, wireless access credentials):
I have just upgraded. Now I have version 23.05.3 , thanks for that!
I am connecting to the OpenWRT router per IP 192.168.0.2 via the Luci interface while being connected per wifi to the main Asus router (192.168.0.1). The wireless connection between the 2 routers works. I am unsure if it was using wifi backhaul.
When I turn off (on my laptop) the wifi connection to the main router and connect my laptop per Lan cable to one of the 4 Lan ports of the OpenWRT router, then it stops working.
Thanks for the fast response!
The main router is Asus GT-AXE11000 with the Asus native OS. So it's a non OpenWRT router. It's an uptodate firmware Version: 3.0.0.4.388_23801
The fact, that the main router matters also is an interesting thought, I didn't think about that, thanks for that!
No, I am using a usb-c to Ethernet dongle, basically a LAN card, which however has been tested in that very same setup and works flawlessly. Because I am using that very same setup when I factory reset the OpenWRT Router and start the initial setup up through its initial ip address (192.168.1.1.) via its LAN port.
The reason I ask, and something you should check, is that some USB-C ethernet adapters will actually produce a broadcast storm when the computer goes to sleep or is shut down. In the case of a docking hub, they usually have a power connection so they will remain active when the computer is disconnected from the USB-C cable, and they can cause all sorts of problems. Given that you describe a somewhat similar symptom, it would be worth unplugging the ethernet connection from the USB-C adapter to make sure that it isn't the actual culprit here.
I see your point, thanks for pointing that out, but I don't think that's the case here. The device is working perfectly fine. It's a USB-C to RJ45 LAN card/adapter. Single connector, no hub! There is some issue with the configuration.
I am sorry perhaps I didn't clarify above correctly. It works fine while being connected to the main router (per wifi) and from there to the OpenWRT router. It works in a sense that I can connect to the luci interface of the OpenWRT router per IP 192.168.0.2.
When I disconnect from the main router and attempt to connect per cable to one of the 4 LAN ports of the OpenWRT Router - as I want to use the OpenWRT as a wireless switch - so I need these LAN ports - then they are not working. Then it stops working.
Well, the primary issue is that you have relayd setup on your device which is designed for a wireless backhaul. Wireless vs wired backhaul approaches are entirely different.
Reset your router to defaults and then follow the bridged ap guide.
You're asking about a "wireless switch" but you also said that you've got the uplink via ethernet (and not wireless).
For the purposes of clarity, the OpenWrt device in the diagram above is known as a "dumb AP" or "bridged AP" -- it's basically just a simple L2 bridge between ethernet (uplink) and a wireless access point. It operates purely as an AP (with respect to the wireless functions), and it also may contain multiple ethernet ports that operate as standard ethernet switch.
If you need a wireless uplink (the device uses sta mode to be a wireless client of an existing wifi network) and the downstream devices (wireless and/or ethernet) must be on the same L2 network as the upstream network, you use relayd (or wds or mesh/802.11s) for this. This typically is called a wireless repeater (or mesh if using the 802.11s standard).
I fear this was a misunderstanding! I meant uplink from the laptops perspective. The uplink for the OpenWRT router is the wireless link to the main router.
I came up with the idea of using relayd because all other ways were not working... This was somewhat a matter of last resort. If you can show me a way for this to work without relayd, I'd be more than happy! Will even buy you a beer!
Did that way before installing relayd. Unfortunately it didn't work
Let me try explain again!
Wanna be situation:
- 1. An Asus main Router connected to the internet with an ip 192.168.0.1. DHCP running here.
- 2. An OpenWRT Router, connected wirelessly to the main Asus router with an ip 192.168.0.2. No DHCP running here.
- 3. The wireless (uplink) connection works, as my OpenWRT router is connected to the internet.
- 4. A bunch of devices, which are connected per LAN cable to the OpenWRT LAN ports, which also have internet and receive per DHCP from the main Asus router ip addresses from the 192.168.0.* network.
-5. The devices connected to the OpenWRT LAN ports receive internet access from the main Asus router per DHCP/DNS.
Actual Situation (as of config files above)
- 1. works!
- 2. works!
- 3. works!
- 4. does NOT work!
- 5. does NOT work!
Ok... with that clarification, you need to use relayd, WDS, or mesh (802.11s).
If your Asus main router is running OpenWrt, you can likely one of the latter 2 options. If it's running the vendor firmware, you will have to use relayd.
Keep in mind that relayd is a kind of hack and it has some quirks (see the known issues). But this is what will be required if the following statements are true:
The uplink from the OpenWrt router to the main router must be made wirelessly.
The main router is not running OpenWrt
The downstream connections from the OpenWrt router need to be on the same L2 subnet as the upstream connection.
That's also my goal, making them part of the aforementioned network 192.168.0.*. However this is not working, as the DHCP protocol does not go through the OpenWRT router. It only assigns the OpenWRT router the defined address (192.168.0.2) and stops there.