2

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?

1
  • 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. Dec 12, 2017 at 9:10

2 Answers 2

5

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

https://www.rfc-editor.org/rfc/rfc1533#section-3.14

1

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

0

You must log in to answer this question.

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