View Full Version : [ubuntu] dhcp3-server fails to start

June 20th, 2008, 10:33 PM
Hi everyone, I've seen several posts here concerning this issue yet I can't seem to find a solution out of them! This i my first time setting up a dhcp server on Linux so I'm hoping there is a simple fix.

I've installed dhcp3-server using: sudo apt-get install dhcp3-server

Here is my dhcpd.conf file:

## start config file ##
ddns-update-style none;
default-lease-time 86400;
max-lease-time 604800;

subnet netmask {
option domain-name "ubuntu";
option domain-name-servers;
option broadcast-address;
option routers;
## end config file ##

My /etc/default/dhcp3-server is set to: INTERFACES="eth1"

My /etc/network/interfaces:

## start interfaces ##
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth1
iface eth1 inet dhcp
#hostname ubuntu
## end interfaces ##

When I try starting dhcp3-server using: /etc/init.d/dhcp3-server start

it gives the error:

dhcpd self-test failed. Please fix the config file.
The error was:

Now I've been looking into the no error display bug and found a fix at https://bugs.launchpad.net/ubuntu/+source/dhcp3/+bug/94804 , however, I'm confused about this. Does it go into the dhcpd.conf file? Thanks for any help!

June 20th, 2008, 11:09 PM
I'm pretty sure that you need to assign eth1 a static address. You have it set to use DHCP:

# The primary network interface
auto eth1
iface eth1 inet dhcp
#hostname ubuntu

Should be:

# The primary network interface
auto eth0
iface eth0 inet static
gateway (or whatever your internet gateway is)

Oh yeah, and you can't have any other DHCP servers on the network. So if your router has a DHCP server, you need to turn it off.

June 20th, 2008, 11:22 PM
That was it, thanks!