OK, after a long time trawling the Internet and trying to read through man
pages, I mostly figured out what's going on:
[H]ow in the heck did it know to send
the server's real hostname if the
configuration isn't set up to send it
in the first place?
Apparently, send host-name "<hostname>"
, and more specifically, <hostname>
, has special significance on Ubuntu. It tells dhclient
to send your machine's current hostname to the DHCP server. Note that this is case-sensitive (i.e. if you type <HOSTNAME>
, dhclient will send the literal text <HOSTNAME>
to the DHCP server). As reported here and here, this works on Ubuntu Feisty and above, being part of a patch to (ironically) fix a problem with dhclient
not sending the machine's hostname by default.
[W]hy did the first DHCP lease (for the
old network) not include option
host-name, but the second DHCP lease
(on the new network) did include it,
if I haven't touched any of the
configuration files?
This just seems to be because not all DHCP servers will echo the hostname back to the client. Yesterday we still using a Linux-based ClarkConnect router as our DHCP server, which echoed the hostname back to each client. Today we disabled DHCP on that server, and switched to using the built-in DHCP server on our primary domain controller. Our DHCP leases from the PDC don't include option host-name
either, but it doesn't seem to affect anything. The machines get updated in DNS, and they can all find each other by hostname.
When I run hostname
, the server
returns fozzie.our.domain
, but
dhclient.eth0.leases
says the hostname
option was set to fozzie
(no domain).
How did it know to strip off the
domain?
This is me not fully understanding the intricacies of DHCP. Our DHCP server was set to configure all of our clients with our domain. I'm guessing the DHCP server was smart enough to remove the domain name portion from the hostname sent by the client.
Anyone have any corrections or clarifications to add to this answer? It still seems a bit "hand-wavy", so I won't accept it as-is.
Best Answer
Here is the quote from VirtualBox documentation:
In addition, you can turn off the Advanced Configuration and Power Interface (ACPI) which VirtualBox presents to the guest operating system by default. ACPI is the current industry standard to allow operating systems to recognize hardware, configure motherboards and other devices and manage power. As all modern PCs contain this feature and Windows and Linux have been supporting it for years, it is also enabled by default in VirtualBox. It can be turned off on the command line; e see the section called “VBoxManage modifyvm”.