I have an Ubuntu 11.04 server virtual machine. I would like to request a specific hostname from the DHCP server at the office. Since I don't run it often, the IP changes nearly every time that I boot it. Obviously, referencing it by a hostname is the preferred option.
I know that my DHCP server respects DHCP client hostname requests. On my windows 7 machine, I can rename the computer, reboot, query the DHCP server, and see the new name in the ANSWER SECTION. The query command that I use is:
dig @192.168.225.5 -x 192.168.235.XXX
and each time it will respond with the new computer hostname. I can also now ping and ssh from other machines using that new hostname.
I have no such luck on the Ubuntu VM. I modified /etc/dhcp/dhclient.conf to include a line:
send host-name "MYRQUESTEDHOSTNAME";
and then run
sudo /etc/init.d/networking restart
but querying with dig using the VM's IP address yields no ANSWER SECTION.
What am I missing?