SAFELY removing bogus entries in dhcpd.leases
Doug Caviness
Doug.Caviness at jdsu.com
Wed Mar 14 20:33:25 UTC 2007
I have a failover configuration on two Solaris 9 machines using ISC
3.0.1. There are 3 subnets (10.10.10.0, 10.10.14.0, 10.10.80.0)
configured in dhcpd.conf that no longer exist and I want to remove them
from DHCP. However when I commented out one of them on both servers,
then rebooted dhcp one at a time I got lot's of error messages. No, I
don't remember what the messages were. I just uncommented real quickly.
Looking at dhcpd.leases on each machine I find stuff like this:
Main machine:
lease 10.10.10.250 {
starts 3 2007/03/07 19:55:44;
tstp 3 2007/03/07 19:55:44;
tsfp 3 2007/03/07 19:55:44;
binding state backup;
}
Secondary machine:
lease 10.10.10.250 {
starts 3 2007/03/07 19:55:44;
tsfp 3 2007/03/07 19:55:44;
binding state backup;
}
Main machine:
lease 10.10.14.250 {
starts 2 2004/08/31 11:18:19;
tstp 2 2004/08/31 11:18:19;
tsfp 2 2004/08/31 11:18:19;
binding state backup;
}
Secondary machine:
lease 10.10.14.250 {
starts 2 2004/08/31 11:18:19;
tsfp 2 2004/08/31 11:18:19;
binding state backup;
hardware ethernet 00:b0:d0:bf:e6:82;
uid "\001\000\260\320\277\346\202";
}
Main machine:
lease 10.10.80.149 {
starts 4 2004/12/02 21:54:13;
ends 4 2004/12/02 22:54:13;
tstp 4 2004/12/02 22:54:13;
tsfp 5 2004/12/03 10:24:13;
cltt 4 2004/12/02 21:54:13;
binding state free;
hardware ethernet 00:c0:17:31:30:25;
uid "\001\000\300\02710%";
}
Secondary machine:
lease 10.10.80.149 {
starts 4 2004/12/02 21:54:13;
ends 4 2004/12/02 22:54:13;
tstp 5 2004/07/16 19:51:18;
tsfp 5 2004/12/03 10:24:13;
cltt 4 2004/12/02 21:54:13;
binding state free;
hardware ethernet 00:c0:17:31:30:25;
uid "\001\000\300\02710%";
}
Not only does this cruft left behind offend my sense of order, it messes
up my status reporting.
So, how do I safely remove this stuff and then remove the subnets out of
dhcpd.conf? The sentence "It is possible to delete a declaration in the
dhcpd.conf fle; in this case the rubout can never be eliminated from the
dhcpd.leases file" has me a little gun-shy.
Thanks in advance.
More information about the dhcp-users
mailing list