I have a situation where my OS X Server app seems to not be completely dropping DHCP leases and I think it is causing some of my hardware MAC's to conflict as per the assignments I have set.

I use DHCP to assign machines IP's based on their MAC's and there is one set of network devices that allows me to inject data over our radio stations STL path. (Moseley LANLINK HS, yes I already contacted their tech support...awaiting response, but this does not seem be a specific issue with the devices functionality) I need this to connect on our network to access the remote site network devices for federally mandated logging and site control purposes. I am able to connect my laptop directly to the device and it works just as it normally should!

I feel there is some weirdness in OS X Server with the DHCP service not properly assigning address and I really want to clear all leases before I move forward with an uninstall and reinstall everything in Server.app, including all of it's settings files and...everything

All other services are working just fine in the application, such as DNS, Open Directory and WWW. So this seems to be isolated to just the DHCP service.

Is there a command that I can input to the terminal to drop all DHCP leases assigned by Apple OS X Server?

  • Check if this file exists /etc/bootpd.leases. This is where static leases are held. – tron_jones Jul 16 '15 at 18:37
  • Not there. I even searched the other HDD for this folder and does not exist, except on the primary hdd that holds all of the SERVER data. The only possibly related file is 'booted.plist'. Is it worth manually creating the 'booted.leases' file you mention and letting the application populate it? – Chief E Jul 16 '15 at 18:49
  • No. Run a "serveradmin fullstatus dhcp".. Locate the log file and see if you can get an idea where its holding the array of static leases. – tron_jones Jul 16 '15 at 18:59
  • I was able to locate the /var/log/system.log file and it seems to only show the dynamic leases...which i think is what it would do. The odd thing in there is that I see the device name that I had already tried to assign statically based on it's MAC...in the dynamic list with a different Ip than what I saw it with yesterday...will try restarting the DHCP service to see if it assigns properly upon reinitialization – Chief E Jul 16 '15 at 19:07
  • 1
    serveradmin settings dhcp:logging_level = "HIGH" ; will give you detailed logging. – tron_jones Jul 16 '15 at 19:12

I found this but can not test since I do not have your set up.

  1. Stop the dhcp server either through Server Admin or from a command line command of sudo serveradmin stop dhcp.

  2. delete the file /var/db/dhcpd_leases. You will need root access. Terminal command of sudo rm -f /var/db/dhcpd_leases

  3. Restart dhcp via server admin or by terminal command of sudo serveradmin start dhcp

Be very careful when deleting files in terminal!

| improve this answer | |
  • I VI'd into the dhcp_leases file just to see what might be in there...and it had nothing, except "new file"...proceed with file delete anyhow? – Chief E Jul 16 '15 at 18:54
  • Sorry, can not verify. – Ruskes Jul 16 '15 at 19:40
  • I ended up stopping the dhcp service, then deleting the "dhcp_leases" file, restarting and rebooting the machine (as an extra kick in the pants and for some extra ensurance) the server came back online and seemed to properly allow the remote IP injectors to pass data onto our network once again. Thank you for the suggestions. – Chief E Jul 16 '15 at 21:48
  • This could be marked as the right answer. – forgotstackxpassword May 24 '16 at 20:41
  • @Buscar웃 next time add the source of your answer Offical Apple Support Communties – dbf Sep 21 '16 at 9:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .