dhcpd fails to start on eth1

Asked by Vivek Ramakrishna

I'm having trouble configuring and starting ISC DHCP server on my machine. I'm running Ubuntu 11.10 desktop edition. I installed ISC DHCP by running

$ sudo apt-get install dhcp3-server

My machine has two NICs: eth0, which is connected to a router for Internet access, that has an IP address of 192.168.2.2; and eth1, where I want dhcpd to serve requests, for a subnet.

I have modified /etc/default/isc-dhcp-server to point to eth1:

$ cat /etc/default/isc-dhcp-server
# Defaults for dhcp initscript
INTERFACES="eth1"

I have configured dhcpd for a simple subnet:

$ cat /etc/dhcp/dhcpd.conf
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;

subnet 192.168.0.0 netmask 255.255.255.0 {
  interface eth1;
  range 192.168.0.50 192.168.0.100;
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.0.255;
}

With this configuration, dhcpd fails to start for me:

$ sudo /etc/init.d/isc-dhcp-server start
* Starting ISC DHCP server dhcpd
* check syslog for diagnostics. [fail]

$ tail /var/log/syslog
Aug 15 15:29:45 eptc4 dhcpd: No subnet declaration for eth1 (no IPv4 addresses).
Aug 15 15:29:45 eptc4 dhcpd: ** Ignoring requests on eth1. If this is not what
Aug 15 15:29:45 eptc4 dhcpd: you want, please write a subnet declaration
Aug 15 15:29:45 eptc4 dhcpd: in your dhcpd.conf file for the network segment
Aug 15 15:29:45 eptc4 dhcpd: to which interface eth1 is attached. **
Aug 15 15:29:45 eptc4 dhcpd:
Aug 15 15:29:45 eptc4 dhcpd:
Aug 15 15:29:45 eptc4 dhcpd: Not configured to listen on any interfaces!

Am I missing a step? I don't understand why dhcpd is complaining that it's not configured to listen on any interfaces.

This is my first time setting up DHCP. I've spent three days reading manuals and forums and think I've done everything right, but keep getting the same error. Any tips to get me on the right track are greatly appreciated!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu isc-dhcp Edit question
Assignee:
No assignee Edit question
Solved by:
Vivek Ramakrishna
Solved:
Last query:
Last reply:
Revision history for this message
Vivek Ramakrishna (vivek-ramakrishna) said :
#1

I found my problem, and have resolved the issue. Before starting dhcpd, I needed to set up an address on interface eth1. Whilst I had made changes to /etc/network/interfaces, I had forgot to run the `if up eth1` command so those changes would register.

http://askubuntu.com/questions/57155/dhcpd-fails-to-start-on-eth1