I was not able to refuse changing my hostname by DHCP Server on Mac Book. None of these solutions below worked for me:
After deleting the files as suggested from the Apple engineer it retrieved a new hostname and a new ip. But it wasn't a static hostname. Creating the file /etc/hostconfig doesn't work neither.
I mean come on, that's a well known feature and it should work. Poorly it doesn't for now. I'm sure there must be a solution for this.
As the server we are using a Mac Mini with built-in DNS and DHCP. My Mac Book's system is macOS Sierra 10.12.3
Edit: From the 3rd link, the Apple engineer suggested to delete the following three files in /Libray/Preferences/SystemConfiguration
:
com.apple.airport.preferences.plist
NetworkInterfaces.plist
preferences.plist