I have a fairly simple set up on a Debian server I'm running. I currently have isc-dhcp-server installed along with bind9. I set up my zone and my reverse lookup zones and set up dynamic updates, it's all working as expected.

My problem is that dhcpd is holding onto leases for a long time. If I look at my dhcpd.leases file it's a mess. I only have one VM pulling an address (for testing purposes before I put this server into production) and there's about 10 entries for it in dhcpd.leases.

I set the lease time to 5 seconds in dhcpd.conf just for testing purposes. I shut off this VM and waited a little while. The A and PTR record still exists in DNS.

My question is as follows: Is it possible to force dhcpd to clean up leases AND DNS records immediately after the lease expires?

When the lease is up I want everything that corresponded with that lease gone as well.

If you need any logs/config files let me know. I can post them, I just don't want to waste my time right now posting them if it's not needed.


option domain-name "local";
option domain-name-servers pegasus.local;

ddns-updates on;
ddns-update-style interim;
ignore client-updates;
update-static-leases on;

default-lease-time 5;
max-lease-time 10;
log-facility local7;

include "/etc/dhcp/rndc.key";

zone local. {
    key rndc-key;

zone 1.10.in-addr.arpa. {
    key rndc-key;

shared-network local {
    subnet netmask {
        option routers;

If you disable ddns update-optimization, it should remove the records when the lease ages out. [1]

1: https://kb.isc.org/article/AA-01091/0/ISC-DHCP-support-for-Standard-DDNS.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.