Clear DHCP lease cache on the server?

mcinroy
Posts: 35
Joined: Wed Feb 03, 2016 11:51 am

Clear DHCP lease cache on the server?

Postby mcinroy » Sat Dec 09, 2017 6:50 am

Hello,

I am currently running Amahi 10. I had initially limited the maximum number of dynamic IPs to 50... but I keep running out of IPs. I keep having to "up" the maximum. It seems like the cache keeps growing... perhaps the leases aren't expiring??

I've searched for information on this issue, but can't seem to find any recent relevant discussion. Is this expected behaviour? Should I be manually clearing the cache; if so, how do you accomplish that? I've seen lots of general discussion about how to release/renew IPs from the client; however, (a) many of these clients connected once some time ago and may never connect again, and (b) many of the clients are mobile devices or iot devices, so don't lend themselves to the typical commandline tools for release/renew.

Thanks for any assistance.

mcinroy
Posts: 35
Joined: Wed Feb 03, 2016 11:51 am

Re: Clear DHCP lease cache on the server?

Postby mcinroy » Tue Jan 09, 2018 5:26 am

Can anyone comment whether this behaviour -- persistence of DHCP leases -- is expected? or anomalous?

Any suggestions for how to manually clear the lease cache on the server? or even check its contents?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Clear DHCP lease cache on the server?

Postby bigfoot65 » Tue Jan 09, 2018 6:03 am

Any suggestions for how to manually clear the lease cache on the server? or even check its contents?
Have you updated the OS with the latest packages? I don't recall seeing this behavior in the past.

Also there is guidance on the internet that might help.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

mcinroy
Posts: 35
Joined: Wed Feb 03, 2016 11:51 am

Re: Clear DHCP lease cache on the server?

Postby mcinroy » Mon Jan 22, 2018 10:27 am

Have you updated the OS with the latest packages? I don't recall seeing this behavior in the past.
I have now. Thanks for the suggestion. For some reason I thought that OS updates between Amahi releases were discouraged... :oops:
Not sure where I got that idea. And there's this, of course:
Amahi Updates - Amahi Wiki
:oops:

Anyway...
Also there is guidance on the internet that might help.
I had searched, pretty extensively, for information on Fedora and dhcp server leasetime, before posting the question originally...
Everything I've found points to the leases being cached in /var/lib/dhcpd/dhcpd.leases... and the configuration being kept in /etc/dhcp/dhcpd/conf... but neither of those exist on my HDA. And there doesn't seem to be a dhcpd daemon running.

Does Amahi use something different to accomplish DHCP?
Can you suggest where to find the configuration on an Amahi instance?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Clear DHCP lease cache on the server?

Postby bigfoot65 » Mon Jan 22, 2018 12:58 pm

And there's this, of course:
Amahi Updates - Amahi Wiki
:oops:
Yes disabled by default as many users wanted control over updates. It does not say anything about updates being discouraged.
Does Amahi use something different to accomplish DHCP?
Amahi uses dnsmasq for DNS and DHCP capabilities.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

mcinroy
Posts: 35
Joined: Wed Feb 03, 2016 11:51 am

Re: Clear DHCP lease cache on the server?

Postby mcinroy » Tue Jan 23, 2018 8:02 am

And there's this, of course:
Amahi Updates - Amahi Wiki
:oops:
Yes disabled by default as many users wanted control over updates. It does not say anything about updates being discouraged.
No, that "discouraged" part was all in my head... hence the :oops: .

Does Amahi use something different to accomplish DHCP?
Amahi uses dnsmasq for DNS and DHCP capabilities.
Ahh. Perfect. Yes. I see now that dnsmasq is referenced in a few Amahi wiki articles... for some reason I hadn't found that info when looking for DHCP info. That was precisely the piece of information that I needed. Thank you!

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Clear DHCP lease cache on the server?

Postby bigfoot65 » Tue Jan 23, 2018 9:02 am

Happy to assist.

Maybe once you sort this out, you could add some guidance to the wiki. We would greatly appreciate it.

Should we mark this closed?
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

mcinroy
Posts: 35
Joined: Wed Feb 03, 2016 11:51 am

Re: Clear DHCP lease cache on the server?

Postby mcinroy » Tue Jan 23, 2018 12:44 pm

Happy to assist.

Maybe once you sort this out, you could add some guidance to the wiki. We would greatly appreciate it.
Sure. If you could suggest which article would be relevant -- or let me know if there should be a new wiki entry -- I'd be happy to do it.
Should we mark this closed?
Ehh... i still haven't done anything to clear the cache and/or prove that IPs are getting re-used. I'll try to work on that in the next day or so.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Clear DHCP lease cache on the server?

Postby bigfoot65 » Tue Jan 23, 2018 5:23 pm

I’d create a new wiki entry. If I find a better place I can move it later.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

mcinroy
Posts: 35
Joined: Wed Feb 03, 2016 11:51 am

Re: Clear DHCP lease cache on the server?

Postby mcinroy » Mon Jan 29, 2018 2:37 am

@bigfoot65 I think this thread can be closed now.

It seems that the system updates were what I was missing, leases are being reused now. I have dropped the maximum number of dynamic IPs to a reasonable number and everyone seems to be getting an address without trouble (as one would hope).

So, I didn't really have to do anything ground-breaking... but perhaps there are some tidbits that could go into a wiki article -- location of the lease file (relate that back to the Amahi Network Setup UI)... After searching the wiki for dnsmasq, I found some good info under Troubleshooting. Perhaps there could be a mention of Amahi's use of dnsmasq earlier in the docs, say, here?:
https://wiki.amahi.org/index.php/HDA_Ad ... Networking

Initially, when I was looking into this, googling "fedora dhcp server lease" always pointed me to /var/lib/dhcpd/dhcpd.leases as the location for the lease file. Obviously, it's not there in our case, so I was stymied.

What do you think?

Who is online

Users browsing this forum: No registered users and 26 guests