Re: [Dnsmasq-discuss] dhcp-lease-max is only for DHCPv4?
On Tue, May 23, 2023 at 12:05:08AM +0100, Simon Kelley wrote: > On 22/05/2023 12:18, Linyih Teng wrote: > > In the manual page is written: > > > -X, --dhcp-lease-max= > > >Limits dnsmasq to the specified maximum number of DHCP > > >leases. The default is 1000. This limit is to prevent DoS > > >attacks from hosts which create thousands of leases and use > > >lots of memory in the dnsmasq process. > > > > Hello, > > > > I'm using dnsmasq2.89 and testing the maximum lease count of the DHCPv6 > > server with the *dhcp-lease-max* option. > > > > For the testing, I'm using below configuration: > > > > *dhcp-lease-max* = 512 > > *dhcp-range*=tag:pool0,2022::1,2022::1f:::fffe,64,120m > > tag-if=set:pool0,tag:intfv0 > > > > > > However, when the number of clients reaches the maximum number, the > > server still provides IPs to clients. Is this the expected behavior of > > DHCPv6? > > > There's a possible difference between the number of clients and the number > of DHCP leases, since leases can expire to be deleted by the client. > > Are you saying that the number of simultaneous DHCP leases increases without > bound, or that the 513th client gets a lease? Have you checked the number of > leases in the dnsmasq.leases file? Original Poster has yet to say what the expected behaviour should be. Thing I am saying: Why limit dhcp-range by dhcp-lease-max? Regards Geert Stappers -- Silence is hard to parse ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] dhcp-lease-max is only for DHCPv4?
Smile On Tue, May 23, 2023 at 12:23:46AM -0400, imn...@gmail.com wrote: > Other thoughts (maybe dumb, but could be easily overlooked): > - An easy-ish thing to check in the source: is the counter wide enough > (16-, 32- or 64-bits)? > - What happens when max is set to 4, 16, etc.? > o Is there a maximum before the limit fails to limit? > o Does it always assign max+1 leases? > - Do each of the clients have different MAC addresses? > The answers could yield a clue. > > N > > On Tue, 23 May 2023 00:05:08 +0100 > Simon Kelley wrote: > > > There's a possible difference between the number of clients and the > > number of DHCP leases, since leases can expire to be deleted by the client. > > > > Are you saying that the number of simultaneous DHCP leases increases > > without bound, or that the 513th client gets a lease? Have you checked > > the number of leases in the dnsmasq.leases file? > > > > > > Simon. > > > > On 22/05/2023 12:18, Linyih Teng wrote: > > > Hello, > > > > > > I'm using dnsmasq2.89 and testing the maximum lease count of the DHCPv6 > > > server with the *dhcp-lease-max* option. > > > > > > For the testing, I'm using below configuration: > > > > > > *dhcp-lease-max* = 512 > > > *dhcp-range*=tag:pool0,2022::1,2022::1f:::fffe,64,120m > > > tag-if=set:pool0,tag:intfv0 > > > > > > > > > However, when the number of clients reaches the maximum number, the > > > server still provides IPs to clients. Is this the expected behavior of > > > DHCPv6? > > > > > > > > > Best Regards, > > > Lin ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] dhcp-lease-max is only for DHCPv4?
Other thoughts (maybe dumb, but could be easily overlooked): - An easy-ish thing to check in the source: is the counter wide enough (16-, 32- or 64-bits)? - What happens when max is set to 4, 16, etc.? o Is there a maximum before the limit fails to limit? o Does it always assign max+1 leases? - Do each of the clients have different MAC addresses? The answers could yield a clue. N On Tue, 23 May 2023 00:05:08 +0100 Simon Kelley wrote: > There's a possible difference between the number of clients and the > number of DHCP leases, since leases can expire to be deleted by the client. > > Are you saying that the number of simultaneous DHCP leases increases > without bound, or that the 513th client gets a lease? Have you checked > the number of leases in the dnsmasq.leases file? > > > Simon. > > On 22/05/2023 12:18, Linyih Teng wrote: > > Hello, > > > > I'm using dnsmasq2.89 and testing the maximum lease count of the DHCPv6 > > server with the *dhcp-lease-max* option. > > > > For the testing, I'm using below configuration: > > > > *dhcp-lease-max* = 512 > > *dhcp-range*=tag:pool0,2022::1,2022::1f:::fffe,64,120m > > tag-if=set:pool0,tag:intfv0 > > > > > > However, when the number of clients reaches the maximum number, the > > server still provides IPs to clients. Is this the expected behavior of > > DHCPv6? > > > > > > Best Regards, > > Lin > > > > ___ > > Dnsmasq-discuss mailing list > > Dnsmasq-discuss@lists.thekelleys.org.uk > > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] dhcp-lease-max is only for DHCPv4?
There's a possible difference between the number of clients and the number of DHCP leases, since leases can expire to be deleted by the client. Are you saying that the number of simultaneous DHCP leases increases without bound, or that the 513th client gets a lease? Have you checked the number of leases in the dnsmasq.leases file? Simon. On 22/05/2023 12:18, Linyih Teng wrote: Hello, I'm using dnsmasq2.89 and testing the maximum lease count of the DHCPv6 server with the *dhcp-lease-max* option. For the testing, I'm using below configuration: *dhcp-lease-max* = 512 *dhcp-range*=tag:pool0,2022::1,2022::1f:::fffe,64,120m tag-if=set:pool0,tag:intfv0 However, when the number of clients reaches the maximum number, the server still provides IPs to clients. Is this the expected behavior of DHCPv6? Best Regards, Lin ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] dhcp-lease-max is only for DHCPv4?
On 5/22/23 3:25 PM, Geert Stappers wrote: On Mon, May 22, 2023 at 07:18:49PM +0800, Linyih Teng wrote: Hello, I'm using dnsmasq2.89 and testing the maximum lease count of the DHCPv6 server with the *dhcp-lease-max* option. For the testing, I'm using below configuration: *dhcp-lease-max* = 512 *dhcp-range*=tag:pool0,2022::1,2022::1f:::fffe,64,120m tag-if=set:pool0,tag:intfv0 And how to test at client side? my eWAG of the day is that 513 clients would be needed and the last one should not get an address... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.* ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] dhcp-lease-max is only for DHCPv4?
On Mon, May 22, 2023 at 07:18:49PM +0800, Linyih Teng wrote: > Hello, > > I'm using dnsmasq2.89 and testing the maximum lease count of the DHCPv6 > server with the *dhcp-lease-max* option. > > For the testing, I'm using below configuration: > > *dhcp-lease-max* = 512 > *dhcp-range*=tag:pool0,2022::1,2022::1f:::fffe,64,120m > tag-if=set:pool0,tag:intfv0 > And how to test at client side? > However, when the number of clients reaches the maximum number, the server > still provides IPs to clients. Is this the expected behavior of DHCPv6? > > > Best Regards, > Lin Groeten Geert Stappers -- Silence is hard to parse ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] dhcp-lease-max is only for DHCPv4?
Hello, I'm using dnsmasq2.89 and testing the maximum lease count of the DHCPv6 server with the *dhcp-lease-max* option. For the testing, I'm using below configuration: *dhcp-lease-max* = 512 *dhcp-range*=tag:pool0,2022::1,2022::1f:::fffe,64,120m tag-if=set:pool0,tag:intfv0 However, when the number of clients reaches the maximum number, the server still provides IPs to clients. Is this the expected behavior of DHCPv6? Best Regards, Lin ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss