Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
    
I'm curious what the dhcp traffic looked like when a request for a new lease came in. The reason I'm curious is that on paper, in a pinch dhcpd will reuse addresses in the pool -- the protocol even has dhcpd attempt to ping the IP addresses it is considering giving, out to ensure it is unused. – kiko Feb 3 at 1:31

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

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

Check your default-lease-time and max-lease-time settings in /etc/dhcpd3/dhcpd.conf

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

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.