No subnet declaration; Can't open /var/lib/dhcp/dhcpd.leases for append
A
publicface at bak.rr.com
Fri Jan 26 21:57:48 UTC 2018
Thank you for your response!
> Does wlp2s0 have an IP in 10.1.1.0 assigned to it?
# ip addr show wlp2s0
4: wlp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
state DOWN group default qlen 1000
link/ether f0:7d:68:c1:b4:13 brd ff:ff:ff:ff:ff:ff
I found a mistake in /etc/default/isc-dhcp-server
It saidINTERFACES="wlp2s0 br0", which was a virtual bridge I'm no longer
using.
Now it says INTERFACES="wlp2s0 enp4s5"
That changed the results for the worse, but those are the interfaces I
need. /etc/network/interfaces below. Please note I'm also using hostapd
as mentioned below.
root at yellow:~# systemctl status isc-dhcp-server
● 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 Fri 2018-01-26 13:04:57
PST; 5min ago
Docs: man:dhcpd(8)
Main PID: 30014 (code=exited, status=1/FAILURE)
Jan 26 13:04:57 yellow sh[30014]: *Not configured to listen on any
interfaces!*
Jan 26 13:04:57 yellow sh[30014]: If you think you have received this
message due to a bug rather
Jan 26 13:04:57 yellow sh[30014]: than a configuration issue please read
the section on submitting
Jan 26 13:04:57 yellow sh[30014]: bugs on either our web page at
www.isc.org or in the README file
Jan 26 13:04:57 yellow sh[30014]: before submitting a bug. These pages
explain the proper
Jan 26 13:04:57 yellow sh[30014]: process and the information we find
helpful for debugging..
Jan 26 13:04:57 yellow sh[30014]: exiting.
Jan 26 13:04:57 yellow systemd[1]: isc-dhcp-server.service: Main process
exited, code=exited, status
Jan 26 13:04:57 yellow systemd[1]: isc-dhcp-server.service: Unit entered
failed state.
Jan 26 13:04:57 yellow systemd[1]: isc-dhcp-server.service: Failed with
result 'exit-code'.
# cat /etc/network/interfaces
# Set up the local loopback interface
auto lo
iface lo inet loopback
dns-nameservers 10.1.1.1 8.8.8.8 8.8.4.4 50.23.197.95
dns-search myFQDN
# Set up the external interface
auto enp6s0
########################################
# Keep the dhcp allocated IP as our primary address
########################################
iface enp6s0 inet dhcp
dns-nameservers 10.1.1.1 8.8.8.8 8.8.4.4 50.23.197.95
dns-search myFQDN
auto enp4s5
allow-hotplug enp4s5
iface enp4s5 inet static
address 10.1.1.2/24
gateway 10.1.1.1
network 10.1.1.0
netmask 255.255.255.255
broadcast 10.1.1.255
pre-up ip link set enp4s5 down
up ip link set enp4s5 up
# Do not auto-start wireless. Let hostapd do it.
#auto wlp2s0
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.255
broadcast 10.1.1.255
#pre-up ip address 0.0.0.0 dev wlp2s0
#up ip link set wlp2s0 up
# What is the difference between ip link set up and ifconfig up?
pre-up ip link set wlp2s0 down
up ip link set wlp2s0 up
down ip link set wlp2s0 down
# post-down <insert command here>
wireless-mode master
wireless-essid BHNDG1670B1Z12
wireless-channel 1
wpa-ssid BHNDG1670B1Z12
# encrypted passwd
wpa-psk
b455C4A3XXX7EFB53A0C5D7E9220ZZZZ52DD82A5ZZZZ5282A757C38827f0f7ba
gateway 10.1.1.1
On 01/26/2018 12:31 PM, Rick Dicaire wrote:
> subnet 10.1.1.0 netmask 255.255.255.0 {
> interface wlp2s0;
> Does wlp2s0 have an IP in 10.1.1.0 assigned to it?
>
> On Fri, Jan 26, 2018 at 2:10 PM, A <publicface at bak.rr.com
> <mailto:publicface at bak.rr.com>> wrote:
>
> Hello,
>
> 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.
>
> 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?
>
> Thank you in advance for any solutions and/or helpful suggestions!
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> ubuntu 16.04
>
> root at yellow:~# dhcpd -d -user dhcpd -group dhcpd
>
> Internet Systems Consortium DHCP Server 4.3.3
> Copyright 2004-2015 Internet Systems Consortium.
> All rights reserved.
> For info, please visit https://www.isc.org/software/dhcp/
> <https://www.isc.org/software/dhcp/>
> Config file: /etc/dhcp/dhcpd.conf
> Database file: /var/lib/dhcp/dhcpd.leases
> PID file: /var/run/dhcpd.pid
> Can't open /var/lib/dhcp/dhcpd.leases for append.
>
> If you think you have received this message due to a bug rather
> than a configuration issue please read the section on submitting
> bugs on either our web page at www.isc.org <http://www.isc.org> or
> in the README file
> before submitting a bug. These pages explain the proper
> process and the information we find helpful for debugging..
>
> exiting.
> root at yellow:~#
>
>
> root at yellow:~# dhcpd -t -user dhcpd -group dhcpd
> Internet Systems Consortium DHCP Server 4.3.3
> Copyright 2004-2015 Internet Systems Consortium.
> All rights reserved.
> For info, please visit https://www.isc.org/software/dhcp/
> <https://www.isc.org/software/dhcp/>
> Config file: /etc/dhcp/dhcpd.conf
> Database file: /var/lib/dhcp/dhcpd.leases
> PID file: /var/run/dhcpd.pid
>
>
> # systemctl restart isc-dhcp-server
>
> # systemctl status isc-dhcp-server
> ● isc-dhcp-server.service - ISC DHCP IPv4 server
> Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service;
> enabled; vendor preset: enabled)
> Active: active (running) since Fri 2018-01-26 10:49:55 PST; 23s ago
> Docs: man:dhcpd(8)
> Main PID: 20023 (dhcpd)
> CGroup: /system.slice/isc-dhcp-server.service
> └─20023 dhcpd -user dhcpd -group dhcpd -f -4 -pf
> /run/dhcp-server/dhcpd.pid -cf /etc/dhcp
>
> Jan 26 10:49:55 yellow dhcpd[20023]: Sending on
> LPF/br0/c8:3a:35:da:42:72/10.1.1.0/24 <http://10.1.1.0/24>
> Jan 26 10:49:55 yellow dhcpd[20023]:
> Jan 26 10:49:55 yellow dhcpd[20023]: No subnet declaration for
> wlp2s0 (no IPv4 addresses).
> Jan 26 10:49:55 yellow dhcpd[20023]: ** Ignoring requests on
> wlp2s0. If this is not what
> Jan 26 10:49:55 yellow dhcpd[20023]: you want, please write a
> subnet declaration
> Jan 26 10:49:55 yellow dhcpd[20023]: in your dhcpd.conf file
> for the network segment
> Jan 26 10:49:55 yellow dhcpd[20023]: to which interface wlp2s0
> is attached. **
> Jan 26 10:49:55 yellow dhcpd[20023]:
> Jan 26 10:49:55 yellow dhcpd[20023]: Sending on
> Socket/fallback/fallback-net
> Jan 26 10:49:55 yellow dhcpd[20023]: Server starting service.
>
> # cat /etc/dhcp/dhcpd.conf
>
>
> ddns-update-style none;
> option domain-name "FQDN";
> option domain-name-servers 10.1.1.1, 8.8.4.4, 50.23.197.95;
>
> default-lease-time 86400;
> max-lease-time 604800;
>
> authoritative;
>
> log-facility local7;
>
>
> subnet 10.1.1.0 netmask 255.255.255.0 {
> *interface wlp2s0;*
> option domain-name-servers 10.1.1.1;
> max-lease-time 7200;
> default-lease-time 600;
> range 10.1.1.10 10.1.1.250;
> option subnet-mask 255.255.255.0;
> option broadcast-address 10.1.1.255;
> option routers 10.1.1.1;
>
>
> group {
>
>
> host yellow {
> hardware ethernet f0:7d:24:c2:c4:13;
> fixed-address 10.1.1.1;
> }
>
> host blue {
> hardware ethernet 00:23:ea:d1:c2:61;
> fixed-address 10.1.1.2;
> }
> }
> }
>
>
>
>
>
>
>
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org <mailto:dhcp-users at lists.isc.org>
> https://lists.isc.org/mailman/listinfo/dhcp-users
> <https://lists.isc.org/mailman/listinfo/dhcp-users>
>
>
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20180126/be487414/attachment-0001.html>
More information about the dhcp-users
mailing list