Ubuntu – DHCP + Static IP for DHCP server on eth1


I'm trying to set up an intranet using DHCP. I'm using Ubuntu 11.04 and a ZyXEL GS2200-24 managed switch. I installed dhcp3-server.

Here is my configuration for DHCP (/etc/dhcp/dhcpd.conf):

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;


subnet netmask {
  interface eth1;
  option subnet-mask;
  option broadcast-address;

Here is setting or /etc/default/isc-dhcp-server:


Here is /etc/network/interfaces config for eth1:

auto eth1
iface eth1 inet dhcp

Now, I try to start my server (sudo /etc/init.d/isc-dhcp-server) and I get this error:

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

If I assign eth1 an IP address, (sudo ifconfig eth1 I can startup just fine. I have not tried routing DHCP requests to the server yet, but it seems as everything is gravy.

Am I correct that I just need to permanently assign to eth1, and then I can configure my managed switch to route requests for IP assignment to, my DHCP server?

If so, how can I do that? Do I need to make a config change in /etc/network/interfaces ?

Best Answer

  • The interface where the DHCP server is listening must have an Static IP of the same subnet you are using in your DHCP configuration.

    To do so, edit your /etc/network/interface as follows: (assuming that is your network gateway)

    auto eth1
    iface eth1 inet static

    Then, edit your dhcpd.conf, change the range to and add the following option line:

    option routers;

    Let me know if it helps.


  • Related Question