<div dir="ltr">A couple of new things:<div><br></div><div>1. I have updated the version of dnsmasq from 2.72 to 2.82, cloned from <b><a href="https://salsa.debian.org/debian/dnsmasq">https://salsa.debian.org/debian/dnsmasq</a></b> and compiled locally.</div><div><br></div><div>2. Now I see a more explicit message in the log, making very clear the wrong behaviour:</div><div><br></div><div><font face="monospace">tail -f /opt/var/log/dhcp | grep d0:4d:e3<br></font></div><div><font face="monospace">May 17 09:11:38 cinemateka dnsmasq-dhcp[1726]: 1039677414 DHCPREQUEST(eth0) 192.168.0.217 96:8d:d4:d0:4d:e3 <br><font color="#ff0000"><b>May 17 09:11:38 cinemateka dnsmasq-dhcp[1726]: 1039677414 DHCPNAK(eth0) 192.168.0.217 96:8d:d4:d0:4d:e3 address in use<br>May 17 09:11:38 cinemateka dnsmasq-dhcp[1726]: not using configured address 192.168.0.217 because it is leased to a4:50:46:d0:4d:e3</b><br></font>May 17 09:11:41 cinemateka dnsmasq-dhcp[1726]: 3254867558 DHCPDISCOVER(eth0) 96:8d:d4:d0:4d:e3 <br><font color="#ff0000"><b>May 17 09:11:41 cinemateka dnsmasq-dhcp[1726]: 3254867558 DHCPOFFER(eth0) 192.168.0.234 96:8d:d4:d0:4d:e3 <br>May 17 09:11:41 cinemateka dnsmasq-dhcp[1726]: not using configured address 192.168.0.217 because it is leased to a4:50:46:d0:4d:e3</b><br></font>May 17 09:11:41 cinemateka dnsmasq-dhcp[1726]: 402483634 DHCPDISCOVER(eth0) 96:8d:d4:d0:4d:e3 <br>May 17 09:11:41 cinemateka dnsmasq-dhcp[1726]: 402483634 DHCPOFFER(eth0) 192.168.0.234 96:8d:d4:d0:4d:e3 <br>May 17 09:11:41 cinemateka dnsmasq-dhcp[1726]: 402483634 DHCPREQUEST(eth0) 192.168.0.234 96:8d:d4:d0:4d:e3 <br>May 17 09:11:41 cinemateka dnsmasq-dhcp[1726]: 402483634 DHCPACK(eth0) 192.168.0.234 96:8d:d4:d0:4d:e3 xiaomi-a2</font><br></div><div><br></div><div>So, dnsmasq clearly identifies the client and it knows there is a static lease configured, but it ignores it.</div><div><br></div><div>I also found other thread in the mailing list (not sure if this was the one you talked of, Geert), <b><i>[Dnsmasq-discuss] "multiple MAC addresses in a single dhcp-host" vs "multiple dhcp-host lines with the same IP address"</i></b>, where in the answers Simon Kelly says:</div><div><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Yes. The difference is that in the normal case of multiple lines, once
the IP address is leased to a MAC address, if another MAC address turns
up asking for a lease, it won't be offered that IP address (typically it
will be offered one from the pool) <b>With multiple MAC addresses on a
single line, when the second MAC address turns up, the IP address will
be unceremoniously ripped away from the first MAC address, and given to
the second one.</b></pre></div><div>But that is not being my case.</div><div><br></div><div>Thanks</div><div>Jesus M Diaz</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 17 May 2021 at 07:28, Geert Stappers via Dnsmasq-discuss <<a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk">dnsmasq-discuss@lists.thekelleys.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun, May 16, 2021 at 06:48:59PM +0100, Jesus M Diaz wrote:<br>
> > ><br>
> > > So, this is how the identification happens and I can know it did happen<br>
> ><br>
> > More like<br>
> > } So, this is how the identification should happen and I hope it did happen<br>
> ><br>
> ><br>
> well, setting the tag 'mobile' and 'known' means dnsmasq found it in the<br>
> config file, that is a good hint to assume it was identified ;-)<br>
> <br>
> <br>
> ><br>
> > > > >    assigns a new ip-addr because the old one is in use.<br>
> > > ><br>
> > > > Which is good.<br>
> > > ><br>
> > > Unless in the dnsmasq man page it is said:<br>
> > ><br>
> > > -G, --dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][tag:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore]<br>
> ><br>
> > }   dhcp-host=set:mobile,*:*:*:63:ea:55,samsungA30s<br>
> ><br>
> > Note that the 'set:' is before '<hwaddr>'<br>
> ><br>
> ><br>
> well, you are right, and that could mean something, let me try changing the<br>
> line in the configuration file to:<br>
> <br>
> dhcp-host=*:*:*:d0:4d:e3,set:mobile,xiaomi-a2<br>
> <br>
> and ... it doesn't work, exactly the same situation than before, and the<br>
> two leases can be seen:<br>
> <br>
>   [20210516-181226] 192.168.0.232   / a4:50:46:d0:4d:e3 xiaomi-a2<br>
>   [20210516-180445] 192.168.0.222   / 96:8d:d4:d0:4d:e3 *<br>
> <br>
> the lease with a name is the new one, so, a new hint dnsmasq identifies the<br>
> client and set the configured name removing it from the previous lease ...<br>
> but assigns a new ip-addr<br>
> <br>
   [ ... ]<br>
> > > both wired and wireless interfaces.<br>
> > > In this case, the behaviour is not the expected, hence, cannot be good.<br>
> ><br>
> > I think some pieces of the puzzle are missing.<br>
> ><br>
> ><br>
> ><br>
> > > And this is my only point. I am not arguing if tp-link one-mesh<br>
> > > access-points are doing well by changing the client mac-address, nor if I<br>
> > > am being smart or stupid using wildcards to identify dhcp-clients, nor if<br>
> > > my whole configuration makes sense. The only point is why dnsmasq is not<br>
> > > abandoning the previous lease if the man page says it would do it.<br>
> ><br>
> > IIRC was on the mailinglist in the last six months a "works for me" report<br>
> > about switching from ethernet to WIFI and keeping IPv4 address.<br>
> ><br>
> ><br>
> That's interesting, I will search those posts.<br>
<br>
Please do.<br>
<br>
<br>
> Thanks for the ideas!<br>
<br>
AIUI are more ideas needed.<br>
<br>
<br>
> Jesus M<br>
<br>
<br>
<br>
Groeten<br>
Geert Stappers<br>
-- <br>
Silence is hard to parse<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss</a><br>
</blockquote></div>