I set the IP addresses in luci -dhcp-static leases. It worked, but after rebooting the addresses changed and now they change every time the router reboots.The router does not respect the settings.
Let's take a look at the config to see if we can spot any issues:
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button (red circle; this works best in the 'Markdown' composer view in the blue oval):
![]()
Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:
ubus call system board
cat /etc/config/network
cat /etc/config/dhcp
Static ip addresses (reserved leases) should be set in /etc/config/dhcp. For example:
config host
option name 'hostname'
option mac '00:11:22:33:AA:BB'
option ip '192.168.1.2'
See also https://openwrt.org/docs/guide-user/base-system/dhcp_configuration
Also, remember that this will bind the ip address to the mac address. If your device (for example mobile phone) has an option for "private mac address", turn it off or set it fixed. Otherwise, it will generate a new mac address everytime it connects to your router and the binding to the ip address will not work.
thanks for your help,but i but I took advantage of the fact that it had now thrown away all my IP addresses and I pulled my old Asus router out of the closet and spent the morning resetting it and putting it back to its original state. The problem with IP addresses has been with me the entire time I've been using it, actually for more than a year and with every reset, some address has changed and despite all possible efforts, I haven't been able to get it back. I don't know how long it's been, but I've already solved it with the help of a colleague, I set it up as you write, and it only took a few hours for one IP to change, so I didn't solve it anymore and gradually rewrote the addresses according to the change. But this time, absolutely all of them changed and it's not like changing one address, I have containers on Proxmox, that wouldn't be so bad, but then I have different ESP32s with manual addresses and that would mean flashing them all again, adjusting the settings in HA for the next one The thing is that I can do it again. I used that Asus for a year and I know that when I initially set the IP there, it was the same even when I disconnected it years later. I will probably use that router with OpenWRT to extend the signal and I will be able to connect a few things via wire. Anyway, thanks for the help and good luck
So if I'm reading this correctly, you've swapped to your old router and fixed the problem by means of using an older but known good configuration, is that correct?
That obviously doesn't fix the root cause of the issue in your OpenWrt config. And to be clear, the DHCP server running in OpenWrt (dnsmasq) should work as you desire if it is properly configured. This suggests that there is an error somewhere in the config... if you'd like to try to find/fix that error, please post the config as requested earlier.
Thanks for the offer, but I'll leave it as it is for now. I have enough other things to do now, and since I spent almost the whole morning on it today, I don't want to deal with it anymore. Even the router on which the operwrt was running isn't the newest,