On 1/8/2019 11:31 AM, smicha wrote:
> 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.
> 

I just tested this option  and the behavior described is correct with
dnsmasq 2.76, from the man page:

"--dhcp-host=lap,192.168.0.199 tells dnsmasq to always allocate the
machine lap the IP address 192.168.0.199.
Addresses allocated like this are not constrained to be in the range
given by the --dhcp-range option, but they must be in the same subnet as
some valid dhcp-range. For subnets which don't need"

As long as a client use the hostname ("lap") the same IP will always be
given to that client, the MAC address is not used.

>>
>> 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?
> 

Possibly, more nolageable dnsmasqer would need to chime in to do that
though! :)
If '--dhcp-host=hostname,IP' is not working for you more info would need
to be provided.

-- 
John Doe

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to