Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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;
    }
}
share|improve this question
    
Show us the dhcpd config file? –  Andrew B Aug 9 at 16:49
    
Added the contents of dhcpd.conf –  dhcpd_is_the_death_of_me Aug 9 at 18:12

1 Answer 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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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