1

This is a os-agnostic question; When deploying to a large number of machines, the only thing you have to differentiate them with is a mac address; DHCP can assign an IP to each machine based on it's mac address, and then DNS will assign it a FQDN but if you deploy the same image to many machines over a network, the OS on the image itself has to know how to set the hostname of the machine when it boots up; so how does the booted / written os image determine how to set its own hostname?

  • Not a totally is agnostic answer but we used to use a piece of software called FOG to deploy images (in our case Windows but it would do block level imaging of any file system I think). Known machines were identified by Mac address, this was used by FOG to decide how to boot (net boot and reimage or normal HDD boot) and was also using by an agent on the machine that checked Mac address/hostname against a database on the server and renamed the machine if it was found not to match. I'm not sure if there was an agent for any other os's. – Jim ReesPotter Dec 12 '17 at 9:10
4

dhcp protocol can send hostname. It can be set with request host-name option in gnu/linux.

https://tools.ietf.org/html/rfc1533#section-3.14

0

As you already said: it either does a reverse lookup of the ip-address that gets assigned by DHCP and sets the hostname from there or it sets the hostname that gets sent as DHCP option 12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.