3

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.

dhcpd.conf

authoritative;
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. {
    primary 10.1.0.3;
    key rndc-key;
}

zone 1.10.in-addr.arpa. {
    primary 10.1.0.3;
    key rndc-key;
}

shared-network local {
    subnet 10.1.0.0 netmask 255.255.0.0 {
        option routers 10.1.255.254;
        range 10.1.1.0 10.1.4.254;
    }
}

1 Answers1

1

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

DTK
  • 1,688
  • 10
  • 15