LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-24-2015, 10:04 PM   #1
brownwrap
Member
 
Registered: Jan 2010
Posts: 121

Rep: Reputation: 16
dhcp no free leases


I have seen this error here, and elsewhere. I tried deleting /var/lib/dhcpd/dhcpd.leases and restarting dhcpd, same problem. So I am hoping someone has a better set of eyes than I do.

Code:
Mar 24 19:47:50 tsui dhcpd: DHCPDISCOVER from f0:4d:a2:40:a0:5a via em1: network 10.1.1.0/24: no free leases
Mar 24 19:47:54 tsui dhcpd: DHCPDISCOVER from f0:4d:a2:40:a0:5a via em1: network 10.1.1.0/24: no free leases
Mar 24 19:48:02 tsui dhcpd: DHCPDISCOVER from f0:4d:a2:40:a0:5a via em1: network 10.1.1.0/24: no free leases
Mar 24 19:48:18 tsui dhcpd: DHCPDISCOVER from f0:4d:a2:40:a0:5a via em1: network 10.1.1.0/24: no free leases
Mar 24 19:48:50 tsui dhcpd: DHCPDISCOVER from f0:4d:a2:40:a0:5a via em1: network 10.1.1.0/24: no free leases
Code:
[root@tsui dhcp]# more /etc/dhcp/dhcpd.conf
ddns-update-style none;
subnet 10.1.1.0 netmask 255.255.255.0 {
	default-lease-time 1200;
	max-lease-time 1200;
	option routers 10.1.1.1;
	option subnet-mask 255.255.255.0;
	option domain-name "local";
	option domain-name-servers 10.1.1.1;
	option broadcast-address 10.1.1.255;
	option interface-mtu 1500;
	group "local" {
		host tsui-em1 {
			hardware ethernet F0:4D:A2:40:9B:26;
			option host-name "tsui";
			fixed-address 10.1.1.1;
			filename "pxelinux.0";
			next-server 10.1.1.1;
		}
	}
}

The address in the messages is from the machine I am trying to PXE boot. I have a Netgear8 port switch between the two machines. Pretty simple setup for testing, but even this isn't working. Maybe I missed something in the config file.
 
Old 03-25-2015, 03:04 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,505

Rep: Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572
A quick looks shows that you have no range directive, so your dhcp server doesn't know what range of IPs to give out, so you'll never get one.
 
2 members found this post helpful.
Old 03-25-2015, 12:28 PM   #3
brownwrap
Member
 
Registered: Jan 2010
Posts: 121

Original Poster
Rep: Reputation: 16
Giving it a range statement solved the problem, but we have several machines set up using ROCKS which installs a dhcp server. They are all working, and none have a range statement, but at least it offered the client an IP. Still, the client is not booting. On the client side I received:

No bootfile name received

Installing the head node, which has the dhcp server is all canned, so I don't know why I am having all these issues.
 
Old 09-04-2016, 10:07 PM   #4
Kydd
LQ Newbie
 
Registered: May 2004
Posts: 8

Rep: Reputation: 0
We're having the same problem did you ever find a solution?
 
Old 05-29-2017, 03:14 PM   #5
clsgis
Member
 
Registered: Nov 2007
Posts: 37
Blog Entries: 4

Rep: Reputation: 5
@brownwrap (03-24-15) There are no free leases, because there are no ranges defined where they might apply.

You need a range statement inside each subnet{} block. EG
Code:
range 10.1.1.129 10.1.1.199;
Add that line following your max-lease-time line.

Notice the dhcpd.conf(5) manpage says "For any subnet on which addresses will be assigned dynamically, there must be at least one range statement." This is in ISC DHCPd which is the DHCP daemon in many open source distributions.
 
Old 05-30-2017, 04:36 AM   #6
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,505

Rep: Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572
Quote:
Originally Posted by clsgis View Post
@brownwrap (03-24-15) There are no free leases, because there are no ranges defined where they might apply.
lol, wow, congratulations on repeating the answer that was given 2 years ago and acknowledged by the OP!
 
Old 06-01-2017, 10:59 AM   #7
clsgis
Member
 
Registered: Nov 2007
Posts: 37
Blog Entries: 4

Rep: Reputation: 5
Jeering not called for

OP left out the part where the range declaration has to be inside the subnet block braces. I found seven different threads on Linuxquestions and the CentOS and Ubuntu forums where people were asking about that same error message and getting no answer. About half of them had no range statement at all, and the other half had the range statement outside the braces where it no longer has any effect.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP server and no free leases error zrnaqvi Linux - Networking 1 05-06-2010 11:10 AM
dhcp leases BFCsaus Linux - Newbie 1 04-27-2010 05:39 PM
Wrote 0 leases to leases file - DHCP server lionel.rpm Linux - Server 3 07-22-2009 06:05 PM
DHCP on CentOS 4.7 - /var/lib/dhcp/dhcpd.leases: Permission denied Latitude Linux - Networking 1 06-05-2009 02:08 AM
DHCP SERVER ... no free leases!!!!! eder_michael11 Linux - General 2 04-25-2006 05:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration