I am trying to set up my home server (Ubuntu 16.04 LTS - Server) to include a DHCP role but it just won't start.
I have reviewed numerous documents and help pages but whenever I do a status of the DHCP server it gives me error messages yet when I start the DHCP server it returns OK. I know it's not running (despite being enabled on boot) as Webmin is showing that is the case and I am unable to get an IP address using DHCP.
I have a router which I have disabled the DHCP server on so it's not that that is conflicting with it and when I assign a static IP on any of my machines (4 in total with numerous mobile devices) the machines work fine.
I am fairly new to Ubuntu but I am a Windows IT support professional by trade so it's not that I'm not technically minded.
I have attached my dhcp.conf file so if anyone can take a look and see if I've done something wrong, I would appreciate it.
In addition, if you could give me any pointers such that I can "debug" the error messages I would be truly in your debt.
/etc/dhcp/dhcp.conf follows:
ddns-update-style none;
default-lease-time 300;
max-lease-time 84000;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
range 192.168.1.150 192.168.1.175;
# Chromecast
host Chromecast {
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
hardware ethernet a4:77:33:d1:c0:f8;
fixed-address 192.168.1.5;
}
# Vonage (XXXXXXXXX - oops)
host Vonage {
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
hardware ethernet c0:cb:38:49:81:6f;
fixed-address 192.168.1.34;
}
# Synology NAS
host DiskStation {
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
hardware ethernet 00:11:32:02:c9:da;
fixed-address 192.168.1.202;
}
# Grandstream GXP2130 Phone
host GXP2130 {
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
hardware ethernet 00:0b:82:7e:d4:64;
fixed-address 192.168.1.96;
}
# Epson Photosmart PX820FWD Printer
host Epson-PX820FWD {
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
hardware ethernet 00:26:ab:c2:13:f2;
fixed-address 192.168.1.50;
}
# Home Theatre PC
host HTPC {
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
hardware ethernet d0:50:99:1b:3e:fa;
fixed-address 192.168.1.102;
}
# My Business Server
host mybusinessserver {
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
hardware ethernet 00:21:86:f0:e5:4e;
fixed-address 192.1682.1.201;
}
}
The error message I receive (for a status report) is somewhat ambiguous as it doesn't tell me WHY it's failing, just that it's failed as shown below:
â isc-dhcp-server.service - ISC DHCP IPv4 server
Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2017-02-12 14:52:21 WET; 39min ago
Docs: man:dhcpd(8)
Process: 3219 ExecStart=/bin/sh -ec CONFIG_FILE=/etc/dhcp/dhcpd.conf; if [ -f /etc/ltsp/dhcpd.conf ]; then CONFIG_FILE=/etc/ltsp/dhcpd.conf; fi; [ -e /var/lib/dhcp/dhcpd.leases ] || touch /var/lib/dhcp/dhcpd.leases; chown root:dhcpd /var/lib/dhcp /var/lib/dhcp/dhcpd.leases; chmod 775 /var/lib/dhcp ; chmod 664 /var/lib/dhcp/dhcpd.leases; exec dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf $CONFIG_FILE $INTERFACES (code=exited, status=1/FAILURE)
Main PID: 3219 (code=exited, status=1/FAILURE)
Feb 12 14:52:21 mybusinessserver dhcpd[3219]: before submitting a bug. These pages explain the proper
Feb 12 14:52:21 mybusinessserver sh[3219]: before submitting a bug. These pages explain the proper
Feb 12 14:52:21 mybusinessserver dhcpd[3219]: process and the information we find helpful for debugging..
Feb 12 14:52:21 mybusinessserver sh[3219]: process and the information we find helpful for debugging..
Feb 12 14:52:21 mybusinessserver dhcpd[3219]:
Feb 12 14:52:21 mybusinessserver dhcpd[3219]: exiting.
Feb 12 14:52:21 mybusinessserver sh[3219]: exiting.
Feb 12 14:52:21 mybusinessserver systemd[1]: isc-dhcp-server.service: Main process exited, code=exited, status=1/FAILURE
Feb 12 14:52:21 mybusinessserver systemd[1]: isc-dhcp-server.service: Unit entered failed state.
Feb 12 14:52:21 mybusinessserver systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
I have noticed the user and group are specified as "dhcp". Is this something that's instantiated at install time as I don't recall setting those up anywhere?
Hope someone can help me here as I've no idea where to turn next and right now none of my devices can obtain an IP for the DHCP and therefore everything is statically assigned, which is not what I really want to do.
I look forward to your help and support.
Chris
PS: I have done an apt-get update, apt-get upgrade and (just to make sure) an apt-get dist-upgrade but all returned no action required / everything is up to date.
Your pool and your dedicated assignments overlap. Suggest this instead:
There is a typo in the configuration
Not sure if that exists on-disk or just happened during writing. If that's not the cause, run
journalctl
and look fordhcpd
errors.