[Dnsmasq-discuss] DHCP range for "private" Wi-Fi addresses
Buck Horn
buckhorn at weibsvolk.org
Fri Jan 3 22:15:39 UTC 2025
On 03.01.25 16:06, Nick Kirsch wrote:
> Neither set nor tag worked alone or in both positions. Anyway to verify the
> expression is being matched?
Your MAC pattern seems incorrect, e.g.
> dhcp-host=*:0E:*:*:*:*,set:private_wifi
won't match
> DHCPREQUEST(lan0) 192.168.10.189 0e:00:12:69:fe:61
You could try e.g.
dhcp-host=0E:*:*:*:*:*,set:private_wifi
However, that won't match all locally administered MACs (i.e. with the
U/L bit set).
As dhcp-host wildcards for h/w addresses would match byte-wise, you'd
have to add all 16 definitions per nibble (e.g. all of 0E:*:*:*:*:*,
1E..., 2E... up to FE:*:*:*:*:*) to correctly *set:* your private_wifi
tag for randomised MACs (provided their host OS actually sets that U/L
bit), and *tag:* the the range you want to select for those MACs.
>> But I wonder why you'd have to deal with randomised MAC addresses at all.
>> Is there a reason why you won't simply disable MAC address randomisation
>> on your devices for your wifi home network?
> Wife, kids, visitors... ;)
>
Then I'd recommend to opt for a dedicated guest network and educating
family members.
Many routers allow configuration of a guest wifi that your visitors
could use.
For legit users of your home network, disabling MAC address
randomisation on a client for your specific wifi is a one time job.
Reconsidering your choice is entirely up to you, but don't say I didn't
tell you if you may find out only later that analysing device-specific
issues will be harder when device IP addresses are changing over time
(which dnsmasq is usually good at avoiding for a given MAC, but
randomising MACs will nullify that benefit). ;)
Kind regards,
Buck
More information about the Dnsmasq-discuss
mailing list