[Dnsmasq-discuss] DHCP, how to ignore the client MAC address?

smicha smicha at schleicher.li
Tue Jan 8 10:31:17 GMT 2019


Hi John,

thanks for your reply.

I did some tests with your hints.

On 7.1.2019 17:41, john doe wrote:
> 
> Some hints from dnsmasq.conf:
> 
> # Give the machine which says its name is "bert" IP address
> # 192.168.0.70 and an infinite lease
> #dhcp-host=bert,192.168.0.70,infinite

Do not work with my setup, because when we re-deploy a VM, the MAC 
address will be autom. changed.
The re-delpoyed VM will than get a different IP as the old vm had 
before.

> # Always give the host with client identifier 01:02:02:04
> # the IP address 192.168.0.60
> #dhcp-host=id:01:02:02:04,192.168.0.60
> 
> # Always give the host with client identifier "marjorie"
> # the IP address 192.168.0.60
> #dhcp-host=id:marjorie,192.168.0.60

OK, the setting of the DHCP Client ID on the linux clients to example 
the "hostname" will fix the problem.
But, as far as I see, I can not change or set the DHCP Client-ID on 
Windows systems :-(
Or, when we need to run a vm appliance, where I do not have access to 
the OS, this option will also not work.

Do you have an other idea how I can fix the problem?

> # Enable the address given for "judge" in /etc/hosts
> # to be given to a machine presenting the name "judge" when
> # it asks for a DHCP lease.
> #dhcp-host=judge
> 
> 
> See also (1) for more info on 'dhcp-host'.
> 
> 
> 1)  http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html


Maybe is it possible to "patch" the code of dnsmasq, where dnsmasq can 
ignore the MAC address in the DHCP task?


Many Thanks
Michael



More information about the Dnsmasq-discuss mailing list