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

I have only One dhcp server which has only one interface with ip address The dhcpd.conf are like:

subnet netmask {                 <-------working
   host yyy {
         hardware ethernet BB:BB:BB:BB:BB:BB;

subnet netmask {              <--------not working, why?
     host xxx {
         hardware ethernet AA:AA:AA:AA:AA;

When the host xxx try to request a dhcp, the dhcp server shows error: DHCPDISCOVER from AA:AA:AA:AA:AA via eth0: network no free leases.

But when the host yyy ask for a ip address, the dhcp server do give out a DHCP offer.

Can I assign address within a dhcp server only have interface? How can I configure to make it work?

share|improve this question
Are these two physically distinct subnets? Are they VLANs? Do they share an Ethernet segment? We need to understand your network topology to give you a useful answer. – David Schwartz Dec 13 '11 at 2:19
please visit this page for full configuration and description… – DEEPAK GEORGE Dec 13 '11 at 4:47
Yes, you are right, add an eth0:1 with ip address will make DHCP server send out the DHCPOFFER. But I cannot do that. – valpa Dec 14 '11 at 5:32
Add a dhcp helper address to the router on the network. That helper address should be the server's IP on the subnet. Also make sure that dhcpd is bound to via netstat -anp. – ewwhite Dec 14 '11 at 6:11

Welcome to serverfault!
Yes, you can issue IP Addresses for subnets on which the server itself does not have an interface.

When a client tries to obtain an IP Address, it sends a broadcast looking for a DHCP server. When there is no DHCP server available on the local network, a router can be configured as a DHCP helper such that when it receives a DHCP broadcast, it will create a unicast packet destined for the DHCP server with the original client's information (mac, network). Using the network information, the DHCP server can determine from which scope to issue a lease to the client. It sends this info back to the router which sends it back to the client.

If you move your additional clients to another vlan or on another network segment and setup a router with an interface in each subnet, then configure the router's DHCP helper with the IP of your DHCP server, you should be in business.

share|improve this answer
+1 You need an relay agent or an interface on that subnet. – Zoredache Dec 13 '11 at 1:25
I have cisco ip helper. I have everything ready! But the DHCP server that cannot send a DHCPOFFER out when it gets the DHCPREQUEST. – valpa Dec 14 '11 at 5:24
You talking about the client and network part. But my problem is a DHCP server problem. If DHCP server don't send the DHCPOFFER out, it fails. – valpa Dec 14 '11 at 5:36
I see but the server must receive the request correctly to begin with. Have you setup the networking such that clients are behind a router in the 192.168.0.X/24 subnet? If so, the server should be getting a unicast request from the router which would match the second scope you have created and an IP should be offered. Since you state the error says "network no free leases", this indicates the request does not include the correct subnet. – Paul Ackerman Dec 14 '11 at 16:19
I don't understand, the request is a BROADCAST message, why and how it include the correct subnet? The server surely get the REQUEST message, then it can show "no free leases". – valpa Jan 5 '12 at 23:30

Your problem here is that you don't have any free leases, as indicated by "no free leases".

That means that your DHCP scope on the network is completely exhausted. You didn't include the IP ranges in your post, but can you post that information? If not, just see if you can expand the IP range to provide more room for the host you're trying to configure. After you make that change, restart the DHCP daemon and check to see if your client can obtain an IP.

share|improve this answer
While that is true, that isn't really what his question was asking. He was asking 'why isn't the second range I have defined working?' – Zoredache Dec 13 '11 at 1:33
But his errors indicate that's why he's not able to server clients. I don't think he's trying to add a new subnet because he's trying to address a different location or network (based on his comment on the oldest post). I think it's exhaustion of DHCP leases. And in any case, the clients on the original subnet should have some breathing room. – ewwhite Dec 13 '11 at 1:42

It can serve as many network ranges as you need to serve. :)

But in your problem, perhaps the IP Address which you wish to lease to the xxx host is already leased to another client as you said:

When the host xxx try to request a dhcp, the dhcp server shows error: DHCPDISCOVER from AA:AA:AA:AA:AA via eth0: network no free leases.

"No free leases" means what it means :).
Human translation here is: Via eth0 interface I have received a DHCPDISCOVER FROM a client AA:AA:AA:AA:AA but I DON'T have any free address to lease to it!

Try to select different address for the host that hasn't been leased already ex: may work. Alternatively you can add an excluded range of addresses in a DHCP and assign the IP address to the host manually.

Also be advised that on some DHCP servers, if the host already has the address (in your case and you add the same address as a fixed address in the server YOU WILL GET THE ERROR MESSAGE. From a point of view the server is correct IT CAN NOT lease an already leased address!
So you may want to free the IP address first from the pool and try the procedure again.
ipconfig /release on the client may do the trick :)

share|improve this answer

Short answer: Yes it's possible

Long answer: You'd better offer those clients a valid gateway or they're probably going to be unhappy.

share|improve this answer
My problem is that the client cannot get the ip address, not the problem afterwards. – valpa Dec 13 '11 at 1:07

Your Answer


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.