<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>I've never setup a dhcp server before and I've been struggling
      with the below issues for several days.  While I did find two
      solutions that worked for others, they didn't work for me. 
      Hopefully someone here can tell me how & where I'm messing
      things up. <br>
    </p>
    <p>As you can see from the below output, I'm getting "No subnet
      declaration" and also "Can't open /var/lib/dhcp/dhcpd.leases for
      append".  Perhaps they're related?<br>
    </p>
    <p>Thank you in advance for any solutions and/or helpful
      suggestions!</p>
    <p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
    </p>
    <p>ubuntu 16.04</p>
    root@yellow:~# dhcpd -d -user dhcpd -group dhcpd<br>
    <p>Internet Systems Consortium DHCP Server 4.3.3<br>
      Copyright 2004-2015 Internet Systems Consortium.<br>
      All rights reserved.<br>
      For info, please visit <a class="moz-txt-link-freetext"
        href="https://www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/</a><br>
      Config file: /etc/dhcp/dhcpd.conf<br>
      Database file: /var/lib/dhcp/dhcpd.leases<br>
      PID file: /var/run/dhcpd.pid<br>
      Can't open /var/lib/dhcp/dhcpd.leases for append.<br>
      <br>
      If you think you have received this message due to a bug rather<br>
      than a configuration issue please read the section on submitting<br>
      bugs on either our web page at <a
        class="moz-txt-link-abbreviated" href="http://www.isc.org">www.isc.org</a>
      or in the README file<br>
      before submitting a bug.  These pages explain the proper<br>
      process and the information we find helpful for debugging..<br>
      <br>
      exiting.<br>
      root@yellow:~# <br>
    </p>
    <p><br>
    </p>
    <p>root@yellow:~# dhcpd -t -user dhcpd -group dhcpd<br>
      Internet Systems Consortium DHCP Server 4.3.3<br>
      Copyright 2004-2015 Internet Systems Consortium.<br>
      All rights reserved.<br>
      For info, please visit <a class="moz-txt-link-freetext"
        href="https://www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/</a><br>
      Config file: /etc/dhcp/dhcpd.conf<br>
      Database file: /var/lib/dhcp/dhcpd.leases<br>
      PID file: /var/run/dhcpd.pid</p>
    <p><br>
    </p>
    <p># systemctl restart isc-dhcp-server</p>
    # systemctl status isc-dhcp-server<br>
    ● isc-dhcp-server.service - ISC DHCP IPv4 server<br>
       Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service;
    enabled; vendor preset: enabled)<br>
       Active: active (running) since Fri 2018-01-26 10:49:55 PST; 23s
    ago<br>
         Docs: <a class="moz-txt-link-freetext" href="man:dhcpd(8)">man:dhcpd(8)</a><br>
     Main PID: 20023 (dhcpd)<br>
       CGroup: /system.slice/isc-dhcp-server.service<br>
               └─20023 dhcpd -user dhcpd -group dhcpd -f -4 -pf
    /run/dhcp-server/dhcpd.pid -cf /etc/dhcp<br>
    <br>
    Jan 26 10:49:55 yellow dhcpd[20023]: Sending on  
    LPF/br0/c8:3a:35:da:42:72/10.1.1.0/24<br>
    Jan 26 10:49:55 yellow dhcpd[20023]: <br>
    Jan 26 10:49:55 yellow dhcpd[20023]: No subnet declaration for
    wlp2s0 (no IPv4 addresses).<br>
    Jan 26 10:49:55 yellow dhcpd[20023]: ** Ignoring requests on
    wlp2s0.  If this is not what<br>
    Jan 26 10:49:55 yellow dhcpd[20023]:    you want, please write a
    subnet declaration<br>
    Jan 26 10:49:55 yellow dhcpd[20023]:    in your dhcpd.conf file for
    the network segment<br>
    Jan 26 10:49:55 yellow dhcpd[20023]:    to which interface wlp2s0 is
    attached. **<br>
    Jan 26 10:49:55 yellow dhcpd[20023]: <br>
    Jan 26 10:49:55 yellow dhcpd[20023]: Sending on  
    Socket/fallback/fallback-net<br>
    Jan 26 10:49:55 yellow dhcpd[20023]: Server starting service.<br>
    <br>
    <p># cat /etc/dhcp/dhcpd.conf</p>
    <p><br>
    </p>
    <p>ddns-update-style none;<br>
      option domain-name "FQDN";<br>
      option domain-name-servers 10.1.1.1, 8.8.4.4, 50.23.197.95;<br>
      <br>
      default-lease-time 86400;<br>
      max-lease-time 604800;<br>
      <br>
      authoritative;<br>
      <br>
      log-facility local7;<br>
      <br>
      <br>
      subnet 10.1.1.0 netmask 255.255.255.0 {<br>
              <b>interface wlp2s0;</b><br>
              option domain-name-servers 10.1.1.1;<br>
              max-lease-time 7200;<br>
              default-lease-time 600;<br>
              range 10.1.1.10 10.1.1.250;<br>
              option subnet-mask 255.255.255.0;<br>
              option broadcast-address 10.1.1.255;<br>
              option routers 10.1.1.1;<br>
      <br>
      <br>
          group {<br>
      <br>
      <br>
              host yellow {<br>
                  hardware ethernet f0:7d:24:c2:c4:13;<br>
                  fixed-address 10.1.1.1;<br>
              }<br>
      <br>
              host blue {<br>
                  hardware ethernet 00:23:ea:d1:c2:61;<br>
                  fixed-address 10.1.1.2;<br>
              }<br>
          }<br>
      }<br>
      <br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
  </body>
</html>