<div dir="ltr"><div class="gmail_default" style="font-family:arial,sans-serif;color:rgb(0,0,0)">
<pre class="gmail-newpage"><span class="gmail-h2">Here's some details on what Simon is talking about, the DHCP DUID:<br><br></span><a href="https://www.rfc-editor.org/rfc/rfc3315.html#page-19">https://www.rfc-editor.org/rfc/rfc3315.html#page-19</a><br><br></pre><pre class="gmail-newpage">I was wondering if the dhclient was releasing when it dies at step #4? Maybe just background it and keep running more clients?<br><br></pre><pre class="gmail-newpage">I would definitely try @imnozi's suggestions, especially the one of trying smaller values for the limit.<br></pre>
</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 23, 2023 at 1:15 AM Linyih Teng <<a href="mailto:tenglinyih@gmail.com">tenglinyih@gmail.com</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"><div dir="ltr"><div>For the test.. i'm just curious, there is no other reason.</div><div><br></div><div>However, On the client side, I wrote simple scripts to run the dhclient, and this script will sequentially run 512 dhclient.(the number 512 is not a magic value, other values will happen same situation.)</div><div><br></div><div>steps of the script:</div><div><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px"><div>1. create macvlan interface(It will make different MAC address for clients)</div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px"><div>2. run dhclient with macvlan interface</div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px"><div>3. get an IP from DHCPv6 server</div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px"><div>4. kill the dhclient and remove the macvlan interface</div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px"><div>5. back to step 1. and go on.</div></blockquote><div><br></div>Results:</div><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px"><div>After scripts, if the 513th client comes, the server will serve the IP to the 513th client. but it is not just lease max + 1 th client getting this issue, all after the 512th client can get IP from the server.</div><div>At this time, the lease entries are remaining at 512, and all after clients will not appear in the lease file.</div></blockquote><div><br></div><div><br></div><div>Thanks,</div><div>Lin</div><div><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px"><div><br></div></blockquote></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Geert Stappers <<a href="mailto:stappers@stappers.nl" target="_blank">stappers@stappers.nl</a>> 於 2023年5月23日 週二 下午1:59寫道:<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 Tue, May 23, 2023 at 12:05:08AM +0100, Simon Kelley wrote:<br>
> On 22/05/2023 12:18, Linyih Teng wrote:<br>
> > In the manual page is written:<br>
> > > -X, --dhcp-lease-max=<number><br>
> > > Limits dnsmasq to the specified maximum number of DHCP<br>
> > > leases. The default is 1000. This limit is to prevent DoS<br>
> > > attacks from hosts which create thousands of leases and use<br>
> > > lots of memory in the dnsmasq process.<br>
> > <br>
> > Hello,<br>
> > <br>
> > I'm using dnsmasq2.89 and testing the maximum lease count of the DHCPv6<br>
> > server with the *dhcp-lease-max* option.<br>
> > <br>
> > For the testing, I'm using below configuration:<br>
> > <br>
> > *dhcp-lease-max* = 512<br>
> > *dhcp-range*=tag:pool0,2022::1,2022::1f:ffff:ffff:fffe,64,120m<br>
> > tag-if=set:pool0,tag:intfv0<br>
> > <br>
> > <br>
> > However, when the number of clients reaches the maximum number, the<br>
> > server still provides IPs to clients. Is this the expected behavior of<br>
> > DHCPv6?<br>
> > <br>
> There's a possible difference between the number of clients and the number<br>
> of DHCP leases, since leases can expire to be deleted by the client.<br>
> <br>
> Are you saying that the number of simultaneous DHCP leases increases without<br>
> bound, or that the 513th client gets a lease? Have you checked the number of<br>
> leases in the dnsmasq.leases file?<br>
<br>
Original Poster has yet to say what the expected behaviour should be.<br>
<br>
Thing I am saying: Why limit dhcp-range by dhcp-lease-max? <br>
<br>
<br>
Regards<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>
_______________________________________________<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>