[Dnsmasq-discuss] Automatic DHCP client naming

Simon Kelley simon at thekelleys.org.uk
Fri Apr 16 15:00:52 BST 2010


Ferenc Wagner wrote:
> Hi,
> 
> Is there any way in dnsmasq to push a hostname to a DHCP client even if
> it didn't report (or ask for) one? 

This much is easy:

dhcp-host=00:11:22:33:44:55,myhost

> I'd like to automatically name my
> clients based on their MAC addresses, like 00:11:22:33:44:55 should get
> the hostname 00-11-22-33-44-55.domain.tld.

That's not possible, other then by enumerating all possible MAC
addresses in the configuration file.

> Currently, I can get this
> effect only if the client sends its hostname in the DHCP request; then
> dnsmasq adds the correct domain, registers the name in its DNS database
> and sends back the fully qualified address.  Good.  But I'd like to
> avoid generating the hostname on the clients before starting DHCP.

It would be possible to add that functionality, probably with something
like dhcp-ignore-names, say "dhcp-mac-as-name", but only for a fixed
name format, (should there be a prefix?)

Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list