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

Simon Hobson dhcp1 at thehobsons.co.uk
Sat Jan 27 19:57:11 UTC 2018


A <publicface at bak.rr.com> wrote:

> # ip -4 -o addr
> 
> 1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
> 2: enp4s5    inet 10.1.1.1/24 brd 10.1.1.255 scope global enp4s5\       valid_lft forever preferred_lft forever
> 3: enp6s0    inet [xx.xx.xx.xx/20 brd 255.255.255.255 scope global enp6s0\       valid_lft forever preferred_lft forever
> 4: wlp2s0    inet 10.1.1.10/24 brd 10.1.1.255 scope global wlp2s0\       valid_lft forever preferred_lft forever
> ...
> Jan 27 10:37:48 yellow sh[5804]: No subnet declaration for enp4s5 (no IPv4 addresses).
> Jan 27 10:37:48 yellow sh[5804]: ** Ignoring requests on enp4s5.  If this is not what
> Jan 27 10:37:48 yellow sh[5804]:    you want, please write a subnet declaration
> Jan 27 10:37:48 yellow sh[5804]:    in your dhcpd.conf file for the network segment
> Jan 27 10:37:48 yellow sh[5804]:    to which interface enp4s5 is attached. **
> Jan 27 10:37:48 yellow dhcpd[5804]: No subnet declaration for enp4s5 (no IPv4 addresses).
> Jan 27 10:37:48 yellow dhcpd[5804]: ** Ignoring requests on enp4s5.  If this is not what
> Jan 27 10:37:48 yellow dhcpd[5804]:    you want, please write a subnet declaration
> Jan 27 10:37:48 yellow dhcpd[5804]:    in your dhcpd.conf file for the network segment
> Jan 27 10:37:48 yellow dhcpd[5804]:    to which interface enp4s5 is attached. **
> Jan 27 10:37:48 yellow dhcpd[5804]: 
> Jan 27 10:37:48 yellow dhcpd[5804]: Listening on LPF/wlp2s0/f0:7d:68:c1:b4:13/10.1.1.0/24
> Jan 27 10:37:48 yellow dhcpd[5804]: Sending on   LPF/wlp2s0/f0:7d:68:c1:b4:13/10.1.1.0/24
> Jan 27 10:37:48 yellow sh[5804]: Listening on LPF/wlp2s0/f0:7d:68:c1:b4:13/10.1.1.0/24
> Jan 27 10:37:48 yellow sh[5804]: Sending on   LPF/wlp2s0/f0:7d:68:c1:b4:13/10.1.1.0/24
> Jan 27 10:37:48 yellow sh[5804]: Sending on   Socket/fallback/fallback-net
> Jan 27 10:37:48 yellow dhcpd[5804]: Sending on   Socket/fallback/fallback-net
> Jan 27 10:37:48 yellow dhcpd[5804]: Server starting service.

Hmm, I have an idea what the problem might be. You have two interfaces in the same subnet and I don't think the dhcp server can handle that. The OS can deal with it because it keeps an ARP cache and so can figure out which interface to use for outbound packets.
BUT, ISC DHCPD doesn't use the OS for routing a lot of it's packets - it works at a lower level as it has to be able to send packets which wouldn't ordinarily be routable (no destination IP address) to clients.

So what I think might be happening is that it's connecting the 10.1.1.0/24 subnet with the wlp2s0 interface, and then when it tries to configure the enp4s5 interface, there is no subnet available to connect with it



> # cat /etc/network/interfaces
> ...
> auto enp4s5
> allow-hotplug enp4s5 
> iface enp4s5 inet static
>     address 10.1.1.1/24
>     gateway 10.1.1.1
>     network 10.1.1.0
>     netmask 255.255.255.0 
>     broadcast 10.1.1.255
> 
>     pre-up ip link set enp4s5 down
>     up ip link set enp4s5 up
> 
>     #down ip link set enp4s5 down
>     # post-down <insert command here>
> 
> 
> allow-hotplug wlp2s0 
> 
> iface wlp2s0 inet static
>     address 10.1.1.3/24
>     gateway 10.1.1.1
>     network 10.1.1.0
>     netmask 255.255.255.0 
>     broadcast 10.1.1.255

I'm assuming this box is permanently connected to both networks ? If not then it wouldn't be very useful as a DHCP server.
Is there another device bridging the ethernet and WiFi ? I assume there's an AP, or it's built into the router - and in that case, you do not need (for DHCP anyway) to listen on the WiFi interface since packets will get bridges to the ethernet interface by the AP.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20180127/56a7a930/attachment.html>


More information about the dhcp-users mailing list