[Dnsmasq-discuss] DHCP range for hostnames containing string

Buck Horn buckhorn at weibsvolk.org
Mon Jan 23 14:40:16 UTC 2023


On 23.01.2023 10:28:50, Craig Wright wrote:

>I have currently:
>
>dhcp-range=192.168.0.2,192.168.0.10,255.255.255.0,12h
>dhcp-range=tag:mbdevices,192.168.0.50,192.168.0.60,255.255.255.0,12h
>dhcp-range=tag:!known,192.168.0.11,192.168.0.20,255.255.255.0,12h
>
>and have tried each of the lines:
>
>dhcp-match=set:mbdevices,option:hostname,MB
>dhcp-match=set:mbdevices,option:hostname,4d:42
>dhcp-match=set:mbdevices,12,MB
>dhcp-match=set:mbdevices,12,4d:42
>dhcp-name-match=set:mbdevices,MB*
>
>and the devices with hostnames starting with MB are all being allocated 
>to the !known range

As far as I am aware of, a host would receive the 'known' special tag 
automatically only if a matching 'dhcp-host' record exists.

What's your intention for matching !known (i.e. unknown hosts)?

If you don't require it for reasons, you could try to omit 'tag:!known,' 
from your second 'dhcp-range' line completely.

Regards,
     Buck






More information about the Dnsmasq-discuss mailing list