MacOS – How to clear DHCP leases in OS X Server (v4.1.3-14S1127) on Yosemite 10.10.4

ethernetmacosNetworkosx-server

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?

Best Answer

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!

Related Question