By default the Hostname on a Mac will be changed by DHCP. Most of the time, I want my hostname to stay the same. So this can be overridden by setting it in:
/etc/hostconfig change: HOSTNAME=-AUTOMATIC- to read HOSTNAME=mymac
Set it in the Terminal with sudo scutil --set HostName <putinyourhostname_or_fqdn_here> like in: sudo scutil --set HostName server1.mynetwork.com OR 1. System Preferences. 2. Network 3. Select your network adapter on the left. 4. Select "Advanced" button at the bottom. 5. Set the "DHCP client ID" to your hostname.