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.

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 255.255.255.0;
option broadcast-address 192.168.12.255;
option routers 192.168.12.205;
option domain-name-servers 192.168.12.205;

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

next-server 192.168.12.205;

option root-path "192.168.12.205:/opt/ltsp/i386/";

subnet 192.168.12.0 netmask 255.255.255.0  {

range 192.168.12.55 192.168.12.100;

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

}

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.

share|improve this question
2  
Not sure if it fixes all your problems, but there is a ; missing in the range 192.168... line –  faker Dec 27 '12 at 13:55
    
@faker, I tried. it is not fixed. –  sat Dec 27 '12 at 14:07
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
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. –  GeekRide Dec 27 '12 at 17:16
    
see above what the ubuntu documentation says. –  mgabriel Dec 27 '12 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 '12 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 '12 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 '13 at 13:48
add comment

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.