5

I have a DHCP server that issues "hostnames" to virtual machines when they boot up, based on their MAC addresses. It looks something like this:-

host VM01 {
  hardware ethernet c0:18:85:e3:13:31;
  fixed-address 10.1.1.129;
  option domain-name "example.org";
  option host-name "VM01";
  ddns-hostname "VM01.example.org";
}

This is working fine for my CentOS based VMs, but not for Windows VMs. Any ideas how to fix this?

0

1 Answer 1

4

option host-name (which is standard DHCP option 12), is ignored by Windows. To my knowledge, there is no way to force Windows to use this name.

I have just done a big DHCP migration from infoblox (which uses dhcpd under the hood) to Microsoft DHCP, and this behavior was consistent in both environments.

In fact, what will happen if your DHCP server is doing dynamic DNS updates, is that the Windows client will tell DHCP what its host name is, and DHCP will use that regardless of what the option 12 setting is.

3
  • You're absolutely correct; Windows does not honor option 12. This is primarily due to the ramifications of a Windows system changing its hostname. Consider an Active Directory client changing its hostname at startup. Windows hostname changes require a system restart to manifest, and in the case of an AD-joined system, they must also successfully receive authorization from AD, which will ensure there are no name collisions, invalid changes, or that the entity even has permission to change its name (which it doesn't; computer accounts do not have the right to name themselves, thankfully).
    – Tohuw
    Aug 6, 2014 at 23:41
  • Is this true for a Windows DHCP server as well, or does it not honour that too? My current DHCP server is Linux based but I can move to a Windows one if it is picky about that.
    – xkcd
    Aug 7, 2014 at 10:16
  • 1
    This is true on Microsoft's DHCP server as well.
    – briantist
    Aug 7, 2014 at 14:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .