[Dnsmasq-discuss] Lease duration for hosts without names

Jay Guerette jayguerette at gmail.com
Sun Jul 20 03:20:20 UTC 2025


Thanks Dan, that looks promising. Running "grep -Pi ' \w[26AE][\w:]+ 
[\d\.]+ ' /var/lib/dnsmasq/dnsmasq.leases" does yield all the leases in 
scope.

I wasn't able to get a working config just a "bad hex constant" error on 
that line. It appears to dislike the "*2:*:*:*:*:*" filter.


On 7/19/25 1:15 AM, Dan Schaper wrote:
> You can use --dhcp-host to tag or otherwise dispense with clients 
> based on mac address. You can also specify mac addresses with a * 
> wildcard byte, so you might be able to leverage the fact that 
> randomized mac addresses follow a pattern.
>
> Per https://www.rfc-editor.org/rfc/rfc7042.html#section-2.1 the local 
> bit is set, meaning that the mac addresses will be in the form of 
> x2:xx:xx:xx:xx:xx, x6:xx:xx:xx:xx:xx, xA:xx:xx:xx:xx:xx, 
> xE:xx:xx:xx:xx:xx. What I'm not sure of, and would need testing, is if 
> you can use wildcards for part, like *2:*:*:*:*:*
>
> Apple's MAC randomization is _supposed_ to be per WiFi SSID, so each 
> device _should_ only have one randomized mac address per SSID. I don't 
> really think it works that way in the real world.
>
> Dan
>
> ------ Original Message ------
> From "Jay Guerette" <jayguerette at gmail.com>
> To donmuller22 at outlook.com; dnsmasq-discuss at lists.thekelleys.org.uk
> Date 7/18/2025 8:16:21 PM
> Subject Re: [Dnsmasq-discuss] Lease duration for hosts without names
>
>>
>> I should have been more explicit in my ask. I know how to fix it but 
>> I want to prevent it in the future. When I'm not around I want my 
>> network to work without intervention.
>>
>> Most people don't know what a MAC is, don't know where the setting 
>> is, and may not react well to "you have to disable privacy if you 
>> want to use my wifi". The smaller pool size & longer lease length 
>> could be considered short-sighted or self-inflicted. I didn't 
>> anticipate guests requiring 4+ IPs on my network each and constantly 
>> acquiring new ones without releasing the old ones.
>>
>> I think that hosts that don't provide a name are either 
>> mis-configured, poorly designed, or just privacy focused. We already 
>> have 'dhcp-generate-names' that identifies these hosts, I'm wondering 
>> if we could extend the concept to allow you to add a tag to such 
>> hosts so that specific policies could be applied.
>>
>>
>> On 7/18/25 6:40 PM, Donald Muller wrote:
>>> Have them turn off MAC randomization or modify your dnsmasq config 
>>> to increase the pool or set a short lease time while they are guests.
>>> ________________________________
>>> From: Dnsmasq-discuss
>>> <dnsmasq-discuss-bounces at lists.thekelleys.org.uk> 
>>> <mailto:dnsmasq-discuss-bounces at lists.thekelleys.org.uk> on behalf 
>>> of Jay Guerette <jayguerette at gmail.com> <mailto:jayguerette at gmail.com>
>>> Sent: Friday, July 18, 2025 6:01 PM
>>> To:
>>> dnsmasq-discuss at lists.thekelleys.org.uk<dnsmasq-discuss at lists.thekelleys.org.uk> 
>>> <mailto:dnsmasq-discuss at lists.thekelleys.org.uk>
>>> Subject: [Dnsmasq-discuss] Lease duration for hosts without names
>>>
>>>
>>> I have some house guests who brought devices that randomize their 
>>> macs and don't provide host names. Due to their usage patterns they 
>>> quickly exhausted my small DHCP pool.
>>>
>>> Is there a way that I can tag hosts that don't provide a name so 
>>> that I can provide a custom/shorter lease time?
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20250719/c7a8a6bc/attachment.htm>


More information about the Dnsmasq-discuss mailing list