DHCPNAK no lease left

@Nas thank you for your fast response. The answer to your question is 20 and the defined scope is between 110 and 130 and that is 20 addresses in total. I have the problem all the time so to solve this problem for the moment. I will try to extend the scope to 40 addresses and monitor the results but I would really like to know if this is a problem or by design.

if u define 20 addresses it would give it to u , more over must be rejected. Use dhcp lease every 5 min if there are a lot of devices and they are changable or extend the number of addresses. Check the ARP table maybe your wifi AP or router like EDIMAX could make some ARP spoofing!

I do get the 20 addresses but what puzzles me is that the ip reserved addresses outside the defined scope are also counted which I never seen before in other DHCP setups? That’s why I was asking if that is normal on nethserver or if this is an error just in my setup?

Short wrap up: If you define a scope between 192.168.0.10 - 29 and create 15 active ip reservation between 192.168.0.110 -114 only 5 addresses will be dynamically assigned between 192.168.0.10 - 29 and the 6th and any other new device will receive an error no more leases available.

I would have expected that those 15 ip reserved addresses would not be counted but it seems they do in my installation.

maybe @malvank it could be , lets try other way :
1 cat /etc/dnsmasq-dhcp-hosts
2 then edit file /etc/ethers like this from step 1
00:16:3e:00:00:01 kvm1 192.168.0.1
00:16:3e:00:00:02 kvm2 192.168.0.2
3 disable IP reservation from WEb UI
4 edit /etc/e-smith/templates-custom/etc/dnsmasq.conf/30dhcp
add
read-ethers
5 signal-event nethserver-dnsmasq-update
6 check pls maybe it help

AFAIK, dnsmasq dhcp-lease-max option is an anti-dos measure. I think we modeled it following Fedora, but I agree that it should count both fixed and dynamic leases.

dhcp-lease-max is setted according to the dhcp range configured, take a look at this bug:

Indeed. If there are a bunch of fixed leases outside the defined scope this parameter could block new leases

@filippo_carletti you ment shouldn’t right?

I read about the filed bug but for it looks not as a bug just a by design setting in DNSMASQ? I think there must be some sort of misunderstanding what the dhcp-lease-max setting does? For me it doesn’t really make sense why someone would have a setting that limits leases for both fix and dynamically assigned addresses? This setting should be set to something like unlimited anything else doesn’t make sense for me? You have the dynamically assigned range that limits your amount of assigned addresses that can be assigned to the guest.

Am I missing something in the purpose of the dhcp-lease-max setting does?

New DHCP options page has landed.
Check it out (tomorrow available on all mirrors): http://dev.nethserver.org/issues/3036

1 Like

Great news! Tomorrow I’ll write something about it :wink:

Great news! I have to test it out straight away.