I am facing no free leases issue. I am building a new server. I have successfully installed ltsp. Then, I configured the dhcp. This is my dhcpd.conf file.

option subnet-mask;
option broadcast-address;
option routers;
option domain-name-servers;

default-lease-time 600;
max-lease-time 7200;


option root-path "";

subnet netmask  {


        host client1 {
                option root-path "";
                filename "/ltsp/i386/pxelinux.0";
                hardware ethernet 00:1d:72:04:8d:a9;


Error is,

Dec 27 18:18:35 Dennis dhcpd: Wrote 0 leases to leases file.
Dec 27 18:23:27 Dennis dhcpd: DHCPDISCOVER from 00:1d:72:04:8d:a9 via eth0: network 192.168.12/24: no free leases

I referred in internet and tried. But, I am not able to fix.

Can you guide me to fix this issue.

  • 2
    Not sure if it fixes all your problems, but there is a ; missing in the range 192.168... line
    – faker
    Dec 27, 2012 at 13:55
  • 1
    @faker, I tried. it is not fixed.
    – sat
    Dec 27, 2012 at 14:07

1 Answer 1


Your dhcpd probably needs write access to the leases file.

From http://manpages.ubuntu.com/manpages/lucid/man5/dhcpd.leases.5.html:

When dhcpd is first installed, there is no lease database. However, dhcpd requires that a lease database be present before it will start. To make the initial lease database, just create an empty file called /var/lib/dhcp3/dhcpd.leases. You can do this with:

touch /var/lib/dhcp3/dhcpd.leases

This should fix your problem.

  • 1
    Well, I don't think you really need to create this file. Even if you remove this file, you just need to restart the dhcp server, and this file will be automatically created.
    – Napster_X
    Dec 27, 2012 at 17:16
  • see above what the ubuntu documentation says.
    – mgabriel
    Dec 27, 2012 at 22:50
  • @mgabriel , The dhcpd.leases file has been created automatically. There is no content in the file. But, Still it is giving same error.
    – sat
    Dec 28, 2012 at 5:33
  • try a chmod 0777 /var/lib/dhcp3/dhcpd.leases just to test if there is a problem with the write permissions.
    – mgabriel
    Dec 29, 2012 at 9:28
  • 1
    @mgabriel , It is fixed. First, I deleted the /var/lib/dhcp3/dhcpd.leases file. Then, I created the new file with 0777 permission and changed the ownership to dhcpd. Now, It is okay.
    – sat
    Jan 2, 2013 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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