<div dir='auto'><div dir="auto"><br></div><div class="gmail_extra" dir="auto"><div class="gmail_quote">On Mar 29, 2025 22:24, Simon Kelley <simon@thekelleys.org.uk> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"></p>
<p dir="ltr">On 3/28/25 18:33, support | IT visibility wrote:<br>
> <br>
> On 3/24/25 09:47, support | IT visibility via Dnsmasq-discuss wrote:<br>
>> Hi *,<br>
>><br>
>> I’m using dnsmasq with a few vlan interfaces and each interface is tagged.<br>
>><br>
>> And running tests with pihole as well as native dnsmasq.<br>
>><br>
>> An example on how this is setup in both cases (.i.e. pihole as well as<br>
>> native dnsmsaq):<br>
>><br>
>> =====<br>
>><br>
>> # Wired - vlan 210<br>
>><br>
>> interface=eth0.210<br>
>><br>
>> domain=wired.lan,192.168.210.0/24,local<br>
>><br>
>> dhcp-range=set:vlan-210,192.168.210.11,192.168.210.99,168h<br>
>><br>
>> dhcp-option=tag:vlan-210,option:router,192.168.210.241<br>
>><br>
>> dhcp-option=tag:vlan-210,option:dns-server,192.168.210.235<br>
>><br>
>> dhcp-option=tag:vlan-210,option:ntp-server,192.168.210.235<br>
>><br>
>> dhcp-option=tag:vlan-210,option:domain-name,wired.lan<br>
>><br>
>> =====<br>
>><br>
>> The idea behind this is that devices with multiple vlan interfaces<br>
>> have their IP’s registered with dhcp and dns.<br>
>><br>
>> The dhcp part seems to work – all interfaces have the correct IP details.<br>
>><br>
>> However, the log has numerous wrong-address errors like this (i.e.<br>
>> pihole as well as native dnsmasq):<br>
>><br>
>> =====<br>
>><br>
>> Mar 24 09:02:03 dnsmasq-dhcp[49]: DHCPREQUEST(eth0.210)<br>
>> 192.168.210.201<br>
>> bc:24:11:87:be:e5<br>
>><br>
>> Mar 24 09:02:03 dnsmasq-dhcp[49]: DHCPNAK(eth0.210) 192.168.210.201<br>
>> bc:24:11:87:be:e5 wrong address<br>
>><br>
>> Mar 24 09:02:03 dnsmasq-dhcp[49]: DHCPDISCOVER(eth0.210)<br>
>> bc:24:11:87:be:e5<br>
>><br>
>> Mar 24 09:02:03 dnsmasq-dhcp[49]: DHCPOFFER(eth0.210) 192.168.210.201<br>
>> bc:24:11:87:be:e5<br>
>><br>
>> Mar 24 09:02:03 dnsmasq-dhcp[49]: DHCPREQUEST(eth0.210)<br>
>> 192.168.210.201<br>
>> bc:24:11:87:be:e5<br>
>><br>
>> Mar 24 09:02:03 dnsmasq-dhcp[49]: DHCPACK(eth0.210) 192.168.210.201<br>
>> bc:24:11:87:be:e5 osiris<br>
>><br>
>> =====<br>
>><br>
>> *Question-1*: where are these wrong-address messages coming from?<br>
>><br>
>> If I look at the dhcp.leases (Pihole) or dnsmasq.leases (native<br>
>> dnsmasq) there is always one entry like this:<br>
>><br>
>> 1743408124 bc:24:11:87:be:e5 192.168.230.201 osiris *<br>
>><br>
>> *Question-2*: why is there only an entry from the last vlan interface<br>
>> of (in this example) osiris? And not one for every vlan interface?<br>
>><br>
>> *Question-3*: the same applies for dns regestrations where there is<br>
>> only an entry for the last vlan interface?<br>
>><br>
>> I have tried to force this dns regestration for all fqdn’s for each<br>
>> vlan using the following settings (i.e. pihole as well as native dnsmasq):<br>
>><br>
>> dhcp-ignore-clid<br>
>><br>
>> dhcp-fqdn<br>
>><br>
>> dhcp-client-update<br>
>><br>
>> expand-hosts<br>
>><br>
>> domain-needed<br>
>><br>
>> domain=lan<br>
>><br>
>> local=/lan/<br>
>><br>
>> Does the above ring any bells? Any suggestion?<br>
>><br>
>> With warm regards – Will<br>
>><br>
>><br>
> <br>
>> Answer 1: Because a lease exists for the relevant MAC address with a different IP address to the address it's requesting.<br>
>><br>
>> Answer 2: Because the device is using the same MAC address on all the VLANS it's talking through. The MAC address is supposed to be unique: a DHCP<br>
>> server won't allow a MAC address to have more than one lease.<br>
>><br>
>> Answer 3: Partly the same answer as 2, but even if you use unique MAC addresses (or client-ids) dnsmasq will only associate a DNS name with at most one<br>
>> DHCP lease. That's a design decision.<br>
> <br>
> =====<br>
> <br>
> Thank you for the detailed and to-the-point answers... which makes me wundering:<br>
> If the mac-address is unique and clid is set via the duid option, all interfaces/vlan-domains are registered in DNS.<br>
> <br>
> In addition, the leases file shows all the registrations - including the clid for each interface.<br>
> This showed me that both are unique across all interfaces.<br>
> <br>
> If I then remove the custom mac addresses (leaving the unique clid's in place), only the last one is registered in dns.<br>
> Which is not what I would expect based on what the manual says about the way things are expected to work with clid's.<br>
> <br>
> This was tested with a Debian LXC-container where I replaced ifupdown and isc-dhcp-client with systemd-networkd.<br>
> <br>
> What am I missing/overlooking here?<br>
> </p>
<p dir="ltr">>Do you still have dhcp-ignore-clid in >your configuration? That would <br>>mess what you're trying to do here.</p></blockquote></div></div><div class="gmail_extra" dir="auto"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">No - this setting was not in the config. Meaning I tested with active clid's.</p></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Cheers - Will</div><div class="gmail_extra" dir="auto"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"> </p>
</blockquote></div><br></div></div>