Ubuntu – Problem configuring dhcp server: Job failed to start

dhcpnetworkingservices

I m trying to configure dhcp server in ubtuntu onto my virtual box and connecting other virtual instance of ubuntu to this dhcp sever

i have installed dhcp server using sudo apt-get isc-dhcp-server

then i went to /etc/networks/interfaces and wrote this

auto eth0 
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254
broadcast 192.168.1.255
dns-nameserver 192.168.1.254
dns-search lan

i then restarted networking service using sudo service networking restart

suddenly my GUI crashed and hanged and all that stuff, which forced me to reboot the system. i checked for ip which showed me that i had got it.

then i went to /etc/default/isc-dhcp-server and made this change
INTERFACES="eth0"

then i went to /etc/dhcp/dhcpd.conf and wrote the following lines

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers-192.168.2.1;
option domain-name "ttc.com";
subnet 192.168.1.0 netmask 255.255.255.0
{
range 192.168.1.20 192.168.1.30;
} 

i restarted the service using sudo services isc-dhcp-server but it says:
stop: unknown instance:
start: Job failed to start

i also tried to start dhcp server using the command
sudo service isc-dhcp-server start

but when i tried sudo start isc-dhcp-server or sudo status isc-dhcp-server it shows me an error of iscinitctl: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket. No such file or directory.

i don't know what to do now so please give me some guidence solving this error. I would like to provide more details i needed.

Best Answer

Seems like you need a space instead of dash,

You have:

option domain-name-servers-192.168.2.1;

But it should be:

option domain-name-servers 192.168.2.1;
Related Question