Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have DHCP setup to hand out leases in the following range:

192.168.10.190 - 192.168.10.254 (roughly 65 leases)

Our small business network only has about 30 computers that use DHCP. We noticed that dhcpd stopped handing out new dynamic leases to the computers, even though there are definitely not 65 computers on the network.

Why has it stopped handing out leases? Is it not releasing old un-used leases? How do we tell dhcpd to let go of old leases and start handing out fresh ones again?

share|improve this question

3 Answers 3

It depends on many things, the biggest being the lease time. If you give out a very large lease time, dhcpd may stop giving out new ones until some expire.

Checking the log (syslog) will likely give you a direct clue on what is going on.

To "fix" this is tricky. You can stop the dhcpd process and edit the lease file directly. This is risky if you are uncertain what you are doing. There may be tools to handle this for you, or tools to list the contents at least.

share|improve this answer

I don't have experience with isc-dhcpd so please don't downvote me for lack of clarity. I can't tell you where the setting is in isc-dhcpd but I would look at the lease expiration setting. If the lease expiration setting is extremely high it may be retaining very old leases. If that's the problem reducing the lease expiration time should release leases which are older than the new lease expiration time.

share|improve this answer

Normally, lease expiration time should have nothing to do here, as long as clients are correctly sending DHCPRELEASE packet, at the end of DHCP client-server communication. Also, check-ping statement in dhcpd.conf should help solve the problem or at least show the source. According to my experience, problems with leases can come from buggy clients - process is following:

  1. Client starts with DHCPDISCOVER
  2. Server reserves IP and reply with DHCPOFFER
  3. Client ignore packet or never receive it and starts conversation again. If this happen quickly, such buggy client can borrow all the leases easily. Search for such client observing conversation in logs and by grep -i ff:ff:ff $PATH_TO_DHCPD_LEASES_FILE On the other hand, remember that in dhcpd.leases file there are also expired leases. So it can looks like all leases are used, but it is not the case. You should easily parse this file with awk and grep (or perl), to see how many is in use.

Also - you can blank lease file and restart the server. This can help you to see how the process looks like. But be aware that if you have no manual dhcp clients (IP assigned depending on MAC), IP addresses provided for workstations could and probably will change.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.