No subnet declaration; Can't open /var/lib/dhcp/dhcpd.leases for append

Bill Shirley bill at
Sat Jan 27 13:43:01 UTC 2018

This is all kinds of confusing.  You're configuring DHCP on a machine
named 'yellow' who's address is and has a gateway of
Yet 'yellow' has a WAN connection?

You've configured DHCP for subnet which is on interface
'enp4s5' which IS NOT UP.  Can you ping anything on the LAN?

Is 'yellow' the internet gateway?

Also your DHCP configuration:
        host yellow {
             hardware ethernet f0:7d:24:c2:c4:13;
^^You're defining 'yellow' (which is the DHCP server!!) and it has a
different address that the one you defined in /etc/network/interfaces!!
iface enp4s5 inet static

Don't define host 'yellow' in the DHCP configuration.  Add a comment if
you like.

You need to figure out which address 'yellow' is supposed to
have and bring up interface 'enp4s5'.

Is 'yellow' the gateway for  Your 'option routers'
says it's not.


On 1/27/2018 5:57 AM, Simon Hobson wrote:
> A <publicface at> wrote:
>>> Also in your first post:
>>> subnet netmask {
>>>          interface wlp2s0;
>>>          option domain-name-servers;
>>>          max-lease-time 7200;
>>>          default-lease-time 600;
>>>          range;
>>>          option subnet-mask;
>>>          option broadcast-address;
>>>          option routers;
>>> As far as I know there is no interface directive.  Plus wlp2s0 is the wrong
>>> interface.  You should remove that line.
>>   Wrong name for the device?  Or just shouldn't be the wireless interface?  Why is it wrong?
> There is no instruction in dhcpd.conf called "interface". The example you found probably had it as a comment to help the person keep track of what is where.
>> If that's not how to specify the interface for that subnet, then what is the proper way please?
> You don't ! It happens automagically, and bear in mind that a subnet served by a DHCP server does NOT have to be directly connected - it can come via a relay agent.
> The server uses the IP address(es) of the interface for directly connected clients, or the Gateway Interface Address (GIAddr) field inserted by a relay agent if the client is remote (the other side of a router). That address is used to determine which subnet a client is connected to.
>>> What does 'ip -4 -o addr' show?
>> # ip -4 -o addr
>> 1: lo    inet scope host lo\       valid_lft forever preferred_lft forever
>> 3: enp6s0    inet xx.xx.xx.xx/20 brd scope global enp6s0\       valid_lft forever preferred_lft forever
> OK, you do not have IPv4 addresses on any internal interface ! it isn't going to work like that. Or have you deleted lines from that output thinking they aren't relevant ?
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the dhcp-users mailing list