You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

DHCP static IP removal

DHCP lists some static leases that I fail to remove. They are in a subnet range which doesn't exist anymore and they are all devices with double Mac-adresses. Like pairs of identical mac-adresses with different clientnames and -IP's.


Deleting in the Server-app just makes the entries reappear almost instantly. Deleting /var/db/dhcpd_leases did not help neither and none of the clients show up in bootpd.plist.


How can I remove these entries? I appreciate any ideas.


(and btw: talking of Server 5.3.1/OS 10.12.5 on a MacMini)

Mac mini (Late 2014), macOS Sierra (10.12.5), Server 5.3.1

Posted on Jun 24, 2017 8:07 AM

Reply
1 reply

Jun 27, 2017 7:43 AM in response to labspace

Historically Apple's DHCP server has used one of two methods to define and store static IP assignments for the DHCP server. One method is via a file, the other method is via records stored in Open Directory.


First lets look at the files.


/etc/bootpd.plist is the main configuration file for Apple's DHCP server. Apple's DHCP server is based on bootpd an open source project but has been massively modified from that original version.

/private/var/db/dhcpd_leases is the work file listing the currently active leases, it is not a configuration file, think of it more as a report of current activity.

/etc/bootptab is the file - if you use this method that contains the list of assigned static IP address. This therefore is what your looking for.


Now lets talk about Open Directory. Whilst most people associate Open Directory with a central main 'database' for user records that other Macs systems then access, it is also possible to have a private local only Open Directory database. On a full-blown Open Directory master server the address is usually described as /LDAPv3/127.0.0.1 however the private local only version would be described as /Local/Default the structure would be much the same and the means of editing records would also be much the same.


See this article for more information about Apple's DHCP server and in particular using /etc/bootptab http://krypted.com/mac-security/configure-dhcp-in-mavericks-server/ the fact it was written original for Mavericks makes no difference as the DHCP server has not changed. This old Apple article may also still apply Mac OS X 10.6 Server Admin: Assigning Static IP Addresses Using DHCP


I believe most people use the /etc/bootptab approach and this is the approach that Server.app itself uses.

DHCP static IP removal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.