DHCP Server needs restart weekly
-
I have posted this before but it is still occurring fairly frequently especially after the last upgrade.
The DHCP server seems to start giving out APIPA addresses (169.x) instead of 192.168.x.x as it should. All the devices that have existing leases will work properly for the remainder of their lease time so often I don't discover this until I restart a device or need a new lease.
If I log into the console and disable and reenable (ie. restart) the dhcp server everything works fine again.
Nothing that I can see in the logs specifically but am open to troubleshooting. This has been happening to a lesser extent for years now.
-
How many devices, how big is the address pool and how long is the lease? Maybe you're trying to hand out addresses that aren't yet available.
BTW, DHCP servers never hand out APIPA addresses. Those happen when a device doesn't get an address via DHCP.
-
@jknott 230 is the size of the pool, I only use around 25-30 of those at any given time.
Understood regarding the 169.x addresses, I agree.
Leases are 86400 seconds.
-
How often are 25-30 replaced by others? If you have a large volume of short term users, you might exhaust the pool. For example, a coffee shop might have a lot more users over a day than within an hour, but if your lease is 24 hours many of your leases will be owned by devices that left hours before.
-
@jknott In my case this is home use only so every one of these minus occasional visitors are the same devices. Any potential log levels that need to be turned up to diagnose? I could also wait until it is in this state and see if I can diagnose from the client end
-
OK I figured this out. I am not really sure why it is doing this, but my Apple airport extreme which I use as a WAP has been requesting a new IP Address and rejecting what the DHCP server gives it over and over again every second for years now. It must not just be a pool exhaustion issue but some other sort of situation where the server finally gets beaten down and won't give out new addresses.
What I ended up doing just for this one client is assign it a static IP address from a static pool and now all is quiet in my DHCP logs and I am guessing things will be fine. I have no idea why the Airport extreme was doing that though but I don't want to mess with it anymore.
-
The DHCP log would have revealed the same MAC address for all those requests, pointing to the guilty party.
BTW, I use static mappings for all my stuff. Would that make a diffeence with that AP?
-
@jknott yep, and I would have conveniently ignored it for years thinking it was normal. Oooops. Don’t be me :)