Find OpenWrt Router in network

Hello,
I have an Ubiquiti AP AC Lite router running OpenWrt and I want to attach the router to an existing local network further I wanto connect some esp32 boards to the OpenWrt router. The problem is, how to find the router in the network. It would be much easier if I could give the router a static ip adress which is always the same so I just have to connect the esp32 boards to the wifi network of the OpenWrt router.The esp32-boards must know the ip adress of the server because the mqtt-client needs the ip adress of the broker which is running on the OpenWrt Server. Of course I could have a look inside the Internet gateway and see the ip adress of the OpenWrt router but this could be another ip adress if I connect the OpenWrt router to another network, which is also a goal. Would be nice if it could be possible to configure the OpenWrt router in such a way that I just have to connect the OpenWrt router via Lan cable to an existing network and the ip which is seen from the esp32 boards is always the same. Because of that they only need to connect to Wifi of the OpenWrt router. The Ip Address of the OpenWrt Server is would be hardcoded in the esp32.
I hope its understandable despite my broken english

I'd appreciate any help! Thanks.
Sebastian

If the OpenWrt has bridged the lan with the wifi, then the IP most likely will change if you connect it to another network.
If you break the bridge and the wifi is separate from the lan, then you can keep a static IP on the wifi, while the lan IP can be DHCP or static and adjusted to the upstream network.

Hey, thanks! Do I still have internet at the esp32's if break the bridge?

In both scenarios there is internet to the hosts connected on OpenWrt. In first case the gateway is the upstream router. In the second case the gateway is the OpenWrt. Then you need to do NAT on the wan interface of OpenWrt or add a static route on the upstream internet router.

1 Like

I will try to configure the Router this evening like you suggested

Is there an instruction somewhere how to do it?

It is done by default.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.