Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to set a DHCP server on 12.04. I installed:

sudo apt-get install isc-dhcp-server

My configuration files look like this:

/etc/default/isc-dhcp-server

INTERFACES="eth0"

/etc/network/interfaces

auto lo
iface lo inet loopback

/etc/dhcp/dhcpd.conf

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;

subnet 192.168.1.0 netmask 255.255.255.0
{
    range                       192.168.1.235 192.168.1.240;
    option subnet-mask          255.255.255.0;
    option broadcast-address    192.168.1.255;
    option routers              192.168.1.1;
    default-lease-time          100000;
    max-lease-time              100000;
}

When I run sudo service isc-dhcp-server restart I get:

stop: Unknown instance: 
isc-dhcp-server start/running, process 15384

After this if I run sudo service isc-dhcp-server status it shows that its stopped:

isc-dhcp-server stop/waiting

What am I doing wrong here?

share|improve this question
    
what is the output of your /var/log/syslog, after you attempt to start the dchp server –  tomodachi Aug 9 '13 at 12:04
add comment

1 Answer

sudo nano /etc/network/interfaces

 auto lo
 iface lo inet loopback

auto eth0
   iface eth0 inet static
    address 192.168.1.5
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

your server must have a static IP. that ip must not be in your dhcp IP range Restart networking deamons and restart dhcp as well

 sudo /etc/init.d/networking restart

 sudo /etc/init.d/isc-dhcp-server restart
share|improve this answer
add comment

Your Answer

 
discard

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.