Having issues with old data, DNS/DHCP

I'm having a few issues with DNS/DHCP, I'll ask about these one at a time.

bind 9.9.7-P1, dhcpd 4.2.5-P1, Slackware 64, 14.1

First, old leases seem to hang around forever in /var/state/dhcp/dhcpd.leases, example below. Those listed are from back in March. None of the computers in the lease file are currently connected. Why are they hanging around?

Should static IPs be in there? If so, something is not working.

/var/state/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.2.5-P1

lease 192.168.0.101 {
  starts 6 2015/03/07 11:46:52;
  ends 0 2015/03/08 11:46:52;
  tstp 0 2015/03/08 11:46:52;
  cltt 6 2015/03/07 11:46:52;
  binding state free;
  hardware ethernet 00:16:17:46:70:69;
  uid "\001\000\026\027Fpi";
}
lease 192.168.0.104 {
  starts 2 2015/03/17 17:01:10;
  ends 3 2015/03/18 17:01:10;
  tstp 3 2015/03/18 17:01:10;
  cltt 2 2015/03/17 17:01:10;
  binding state free;
  hardware ethernet c8:9c:dc:6e:24:e8;
  uid "\001\310\234\334n$\350";
}

Open in new window


My dhcpd.conf file:

authoritative;

ddns-updates on;
update-static-leases on;
allow unknown-clients;  # default, deprecated (man dhcpd.conf)
ignore client-updates;  # see https://www.centos.org/forums/viewtopic.php?t=29256, man dhcpd.conf: ignore client-updates
ddns-update-style interim;
default-lease-time 86400;

log-facility local7;

zone hprs.local. { primary 192.168.0.2; }
zone 0.168.192.in-addr.arpa. { primary 192.168.0.2; }

subnet 192.168.0.0 netmask 255.255.255.0 {
    option routers 192.168.0.2;
    range 192.168.0.100 192.168.0.254;
    option domain-name-servers 192.168.0.2;
    option domain-name "hprs.local";
    ddns-domainname = "hprs.local.";
    ddns-rev-domainname = "in-addr.arpa.";
}

# Web Server (Linux)
host webserver {
    hardware ethernet 60:A4:4C:61:9C:FE;
    fixed-address 192.168.0.3;
}

# SQL Server Database Server (Server 2008)
host server {
#    hardware ethernet 40:E0:4C:39:7F:61;
    hardware ethernet 3C:1E:04:47:16:B0;
    fixed-address 192.168.0.4;
}

# Network Attached Storage (Linux)
host ohprsstorage {
    hardware ethernet F4:6D:04:60:04:38;
    fixed-address 192.168.0.5;
}

# COMMON workstation (WIN7)
host COMMON {
    hardware ethernet 2C:27:D7:2F:CF:7A;
    fixed-address 192.168.0.58;
}

host ricoh {
    hardware ethernet 00:26:73:55:63:AB;
    fixed-address 192.168.0.20;
}

# Postage meter
host postage {
    hardware ethernet 00:10:60:B6:72:D4;
    fixed-address 192.168.0.21;
}

Open in new window

LVL 1
MarkAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daniel McAllisterPresident, IT4SOHO, LLCCommented:
The file is essentially a LOG file, the "old" leases stick around because the DHCP server likes to be kind and serve the same address to the same host when possible.

The entries have "ends" values, so there is nothing wrong.... when an address lease expires, the DHCP server is free to reassign it (but there is no requirement for it to do so).

There is a decent description of what I'm talking about, as well as a script to display only active leases, located at http://askubuntu.com/questions/219609/how-do-i-show-active-dhcp-leases

I hope this helps

Dan
IT4SOHO

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MarkAuthor Commented:
So ... "old" leases never get purged from that file? It just grows forever?

Dan: that script worked well.

IPs statically assigned are not in the lease file, eh? Is that correct? None of my dozen-ish static assignments show as active leases.
Daniel McAllisterPresident, IT4SOHO, LLCCommented:
Yes, again it is as much a LOG file as anything.

Dan
IT4SOHO
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.