If you have a mostly Windows infrastructure including Windows DHCP and DNS servers, and have to run some Linux machines, you may find they fail to register their DNS names even though the Windows DHCP server is set to do this automatically.
This is because Linux has some questionable logic whereby it has a separate setting for the hostname used in DHCP registration than the network configuration. That may be good for rare situations when you want a different DHCP hostname registered, but seems crazy not to default to the same setting when it is not configured. Another example of how the Windows world is just easier and more intuitive.
Anyway, here is how you get your difficult Linux clients to register their host names properly:
- Login with administrative privilege (i.e. login as root then enter “sudo bash” command if SUDO is enabled).
- Enter the command:
- Hit the INSERT key to start editing, move to a free line then enter:
…where “<hostname>” is the host name, best keep it the same as what you configured in the /etc/sysconfig/networking configuration file to avoid confusion.
- Hit the ESCAPE key then enter “:wq” to save and exit.
- When you reboot or restart networking the DNS name should be registered correctly.