I am trying to set a static leas for devices on the network. I want to do this using the web interface.
Specifics:
OpenWrt Version 23.05.3
LuCI Version 23.05
I have tried the following: Network -> Interfaces -> lan[edit] -> DHCP Server
My Router is at 10.0.0.1
I have set the Start to 5 (wanting 10.0.0.5)
I have set Limit to 150 (assuming 10.0.0.5 - 10.0.0.155)
Save and Save/Apply
Then... Network -> DHCP and DNS -> Static Leases -> Add
Complete the Fields
I always get the error in IPv4 address:
"The IP address is outside of any DHCP pool address range"
For context I am trying to set the device to 10.0.0.50.
I am looking for how to properly set-up/fix this using the web interface.
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:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
ubus call system board
cat /etc/config/network
cat /etc/config/dhcp
Also remove that. Setting to 0 prevents assignment of pool addresses ("random" between start and start+limit) to hosts that don't have a reservation. I assume that you want that functionality.
I was thinking about that, too. But given that the OP had the DHCP server disabled, maybe they do want to limit it to only statically assigned hosts?? Not sure.
ignore 1 definitely will shut everything down, including reservations. The DHCP process simply won't respond to any requests from any host. If you indeed want to require every host to have a reservation, then dynamicdhcp 0 would be correct. In that case start and limit are not relevant.
To update a little more. Currently, my DHCP is handled through a server I run Ubuntu server Graphic Line on. It is running a few things, like ad-blocker, media server, etc. Currently, I use pi-hole on that server to static assign IPs based on MAC. That being said, I am looking to transition the DCHP/IP management back to the router.
So this is why it currently shows as disabled.
Hope this helps provide clarity. I will try some of the solutions that you have provided.
That worked. The error is gone. I am going to build the static leases (a lot of them) and make the transition to "turn on" the router DHCP and the other server off. Thank You all for the help..........I am curious though...I tried the 5 before, as opposed to the 10.0.0.5 and nothing. So I not sure if the "graphical input" via the webGUI was not taking or one of the other settings was the issue?