I am attempting to set up a VERY simple DHCP server. I am using Ubuntu 10.04, and I installed the "dhcp3-server" package. The server has one interface (eth0) statically set to I want to hand out IPs from the network

Doing what I've been told by various online guides, I edit /etc/default/dhcp3-server to include the line "INTERFACES="eth0".

Then I write up my dhcpd.conf. I had to put an empty subnet or I get the error:

No subnet declaration for eth0 (
** Ignoring requests on eth0.  If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface eth0 is attached. **

Once I add this empty subnet the daemon will start. I try another machine acting as a DHCP client to test it. This is what I see in the dhcpd logs:

dhcpd: DHCPDISCOVER from 00:1d:09:b1:f5:dc via eth0: network 10.0.0/21: no free leases

That "network" definitly doesn't look right, but I can't find where the problem is that is preventing my test client from getting an IP. Here is my dhcpd.conf:

ddns-update-style none;
option domain-name "example.org";
option domain-name-servers,;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;

#empty subnet to prevent error on start
subnet netmask { 

subnet netmask {
    option subnet-mask;
    option broadcast-address;
    option routers;

I've worked with ISC-DHCPd some in the past, but this is the first server that I've tried to build and deploy myself. Any hints would be super!


Are the two subnets and on the same physical network? If they are, you are going to need to assign an address from the to the DHCP server or you need to setup the DHCP relay agent on some device on the network.

If they are not on the same network, I am not sure how you the DHCP server would even be seeing the request, but you absolutely need a a DHCP relay agent on a device that has an address on the network to forward requests to the DHCP server.

This is all required because a DHCP server will select the scope to offer addresses from by using the network/mask of the interface the request was received on if it was received by a broadcast. If the request came in via unicast with the GIADDR address populated, a DHCP relay populates this, then the GIADDR will be used to select the scope to make an offer from.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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