DHCP Lease…..Whooops!
So, if you’re like me and you love to mess around with all kinds of computer related things, you may have run into this scenario before:
You find some cool piece of software, and you spend a week or so fiddling around with it, but then you decide you like it, and later decide to use it. Well, instead of scrapping everything you’ve been working with and starting over from scratch you just go ahead working with what you’ve got.
Sound familiar? If so, and your software of choice happens to be the DHCP service on OSX 10.5 Server, this post is definitely for you. I went through Server Admin and setup my subnets, static maps, and logging levels. The one thing I forgot to change was the Lease Time. I left it configured to issue leases for a week. No biggie for most folks (including myself) since you’re probably not going to be maxing out your leased IP’s anytime soon. But if you’re like me, it annoys you to have to wait for several leases to expire, and you see duplicate leases for devices in your clients table. Here’s a quick easy fix to clear out all the leases and start fresh (since the option isn’t available via Server Admin):
1. Stop the dhcp server either through Server Admin, or from aTerminal:
% sudo serveradmin stop dhcp
2. delete the file /var/db/dhcpd_leases. You will need root access. Terminal command:
% sudo rm -f /var/db/dhcpd_leases
3. Restart dhcp via server admin or from Terminal:
% sudo serveradmin start dhcp
A very simple Apple Script can be developed to do this (if you have recurring needs). Contact me if you would like it,
-Phenix
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.




Comments
// Begin Comments & Trackbacks ?>No comments yet.
Leave a comment