AryInd
Posts: 6
Joined: Fri Mar 08, 2019 11:06 pm

No subnet declaration for eth0. Setting up DHCP server.

Fri Mar 08, 2019 11:26 pm

Hi guys,
I am trying to set up a DHCP server on my Raspberry Pi 3 B+ (with Raspbian Stretch). I have looked through numerous guides but I still cannot find a solution. I keep on getting this error:

Code: Select all

Mar 08 18:00:33 raspberrypi isc-dhcp-server[1746]: DHCPv4 interfaces are no longer set by the INTERFACES variable in
Mar 08 18:00:33 raspberrypi isc-dhcp-server[1746]: /etc/default/isc-dhcp-server.  Please use INTERFACESv4 instead.
Mar 08 18:00:33 raspberrypi isc-dhcp-server[1746]: Migrating automatically for now, but this will go away in the future.
Mar 08 18:00:33 raspberrypi isc-dhcp-server[1746]: Launching IPv4 server only.
Mar 08 18:00:34 raspberrypi dhcpd[1758]: Wrote 0 leases to leases file.
Mar 08 18:00:34 raspberrypi dhcpd[1758]: 
Mar 08 18:00:34 raspberrypi dhcpd[1758]: No subnet declaration for eth0 (no IPv4 addresses).
Mar 08 18:00:34 raspberrypi dhcpd[1758]: ** Ignoring requests on eth0.  If this is not what
Mar 08 18:00:34 raspberrypi dhcpd[1758]:    you want, please write a subnet declaration
Mar 08 18:00:34 raspberrypi dhcpd[1758]:    in your dhcpd.conf file for the network segment
Mar 08 18:00:34 raspberrypi dhcpd[1758]:    to which interface eth0 is attached. **
Mar 08 18:00:34 raspberrypi dhcpd[1758]: 
Mar 08 18:00:34 raspberrypi dhcpd[1758]: 
Mar 08 18:00:34 raspberrypi dhcpd[1758]: Not configured to listen on any interfaces!
Mar 08 18:00:34 raspberrypi dhcpd[1758]: 
Mar 08 18:00:34 raspberrypi dhcpd[1758]: If you think you have received this message due to a bug rather
Mar 08 18:00:34 raspberrypi dhcpd[1758]: than a configuration issue please read the section on submitting
Mar 08 18:00:34 raspberrypi dhcpd[1758]: bugs on either our web page at www.isc.org or in the README file
Mar 08 18:00:34 raspberrypi dhcpd[1758]: before submitting a bug.  These pages explain the proper
Mar 08 18:00:34 raspberrypi dhcpd[1758]: process and the information we find helpful for debugging..
Mar 08 18:00:34 raspberrypi dhcpd[1758]: 
Mar 08 18:00:34 raspberrypi dhcpd[1758]: exiting.
Mar 08 18:00:36 raspberrypi isc-dhcp-server[1746]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed!
Mar 08 18:00:36 raspberrypi isc-dhcp-server[1746]:  failed!
Mar 08 18:00:36 raspberrypi systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1
Mar 08 18:00:36 raspberrypi systemd[1]: Failed to start LSB: DHCP server.
-- Subject: Unit isc-dhcp-server.service has failed
I have the server setup in the DHCP config file correctly as this:

Code: Select all

subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.10 192.168.1.40;
  option routers 192.168.1.1;
  option broadcast-address 192.168.1.254;
}
In the /etc/network/interfaces:

Code: Select all

source-directory /etc/network/interfaces.d
iface eth0 inet static
    address 192.168.1.0
    netmask 255.255.255.0
    gateway 192.168.1.1
And in the /etc/default/isc-dhcp-server

Code: Select all

DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
DHCPDv4_PID=/var/run/dhcpd.pid
INTERFACESv4="eth0"
INTERFACESv6=""
This is supposed to work, but it keeps on giving me the error above. Help is appreciated!

epoch1970
Posts: 4993
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: No subnet declaration for eth0. Setting up DHCP server.

Sat Mar 09, 2019 10:30 am

Either your instance is not reading your config file, or the debug trace is totally misleading... (“please use INTERFACESv4”)
Have you considered using dnsmasq as your DHCP server?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

incognitum
Posts: 476
Joined: Tue Oct 30, 2018 3:34 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Sat Mar 09, 2019 2:28 pm

AryInd wrote:
Fri Mar 08, 2019 11:26 pm
In the /etc/network/interfaces:

Code: Select all

source-directory /etc/network/interfaces.d
iface eth0 inet static
    address 192.168.1.0
    netmask 255.255.255.0
    gateway 192.168.1.1

Double check with ifconfig the IP is actually set.
May need to add "auto eth0"

AryInd
Posts: 6
Joined: Fri Mar 08, 2019 11:06 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Sat Mar 09, 2019 4:12 pm

incognitum wrote:
Sat Mar 09, 2019 2:28 pm
AryInd wrote:
Fri Mar 08, 2019 11:26 pm
In the /etc/network/interfaces:

Code: Select all

source-directory /etc/network/interfaces.d
iface eth0 inet static
    address 192.168.1.0
    netmask 255.255.255.0
    gateway 192.168.1.1

Double check with ifconfig the IP is actually set.
May need to add "auto eth0"
Where would I need to add that?

epoch1970
Posts: 4993
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: No subnet declaration for eth0. Setting up DHCP server.

Sat Mar 09, 2019 4:28 pm

The static address config is another issue.

Ifupdown (/etc/network/*) is on its way out. With Raspbian you're mostly supposed to use dhcpdcd.conf. See here.
Remove everything you've been adding to /etc/network/interfaces.

If you're bent on using the interfaces file, add "denyinterfaces (?s?) eth0 foo1 bar2" in dhcpcd.conf to avoid it clasing with ifupdown.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

hortimech
Posts: 416
Joined: Wed Apr 08, 2015 5:52 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Sat Mar 09, 2019 7:15 pm

If you are running a dhcp server, you probably should remove dhcpcd (its actual name is dhcpcd5).

You have this:

Code: Select all

option broadcast-address 192.168.1.254;
I would change it to this:

Code: Select all

option broadcast-address 192.168.1.255;
Is the dhcp servers IP really 192.168.1.0 and the gateway 192.168.1.1 ?
If the gateway is your router, then I would have expected them the other way around, talking of the router, is a dhcp server running on that, if it is, turn it off. You can only have one dhcp server running on a subnet, unless you are using failover.
You also are not providing enough options, what about nameservers ?

User avatar
rpdom
Posts: 16984
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: No subnet declaration for eth0. Setting up DHCP server.

Sat Mar 09, 2019 7:42 pm

hortimech wrote:
Sat Mar 09, 2019 7:15 pm
Is the dhcp servers IP really 192.168.1.0 and the gateway 192.168.1.1 ?
If the gateway is your router, then I would have expected them the other way around, talking of the router, is a dhcp server running on that, if it is, turn it off. You can only have one dhcp server running on a subnet, unless you are using failover.
You also are not providing enough options, what about nameservers ?
Actually, 192.168.1.0 is not a valid address. It is the address of the network itself.

Valid addresses for that subnet are 192.168.1.1 to 192.168.1.254 with 192.168.1.255 being the broadcast address (goes to every system on the subnet).
Unreadable squiggle

AryInd
Posts: 6
Joined: Fri Mar 08, 2019 11:06 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Sat Mar 09, 2019 8:24 pm

hortimech wrote:
Sat Mar 09, 2019 7:15 pm
If you are running a dhcp server, you probably should remove dhcpcd (its actual name is dhcpcd5).

You have this:

Code: Select all

option broadcast-address 192.168.1.254;
I would change it to this:

Code: Select all

option broadcast-address 192.168.1.255;
Is the dhcp servers IP really 192.168.1.0 and the gateway 192.168.1.1 ?
If the gateway is your router, then I would have expected them the other way around, talking of the router, is a dhcp server running on that, if it is, turn it off. You can only have one dhcp server running on a subnet, unless you are using failover.
You also are not providing enough options, what about nameservers ?
I don't want my raspberry pi connected to a router. I was able to do this about 6 months ago, but all my files got corrupted so I had to reinstall raspbian.

AryInd
Posts: 6
Joined: Fri Mar 08, 2019 11:06 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Sat Mar 09, 2019 8:26 pm

epoch1970 wrote:
Sat Mar 09, 2019 4:28 pm
The static address config is another issue.

Ifupdown (/etc/network/*) is on its way out. With Raspbian you're mostly supposed to use dhcpdcd.conf. See here.
Remove everything you've been adding to /etc/network/interfaces.

If you're bent on using the interfaces file, add "denyinterfaces (?s?) eth0 foo1 bar2" in dhcpcd.conf to avoid it clasing with ifupdown.
Thanks! I tried this before though (not having it added to /etc/network/interfaces) but it still gave the same error. I added that recently.

epoch1970
Posts: 4993
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: No subnet declaration for eth0. Setting up DHCP server.

Sat Mar 09, 2019 10:20 pm

hortimech wrote:
Sat Mar 09, 2019 7:15 pm
If you are running a dhcp server, you probably should remove dhcpcd (its actual name is dhcpcd5).
Why??
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

hortimech
Posts: 416
Joined: Wed Apr 08, 2015 5:52 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Sun Mar 10, 2019 9:26 am

epoch1970 wrote:
Sat Mar 09, 2019 10:20 pm
hortimech wrote:
Sat Mar 09, 2019 7:15 pm
If you are running a dhcp server, you probably should remove dhcpcd (its actual name is dhcpcd5).
Why??
Because if you are running a dhcp server it needs to have a fixed IP, so anything that sets the ipaddress isn't needed , so why have it installed and running ?

I also had a bit of brain fade, yes 192.168.1.0 is the networks address, it cannot be the IP of the dhcp server, but is 192.168.1.1 the ipaddress of the computer that connects this subnet to any other subnet ?

epoch1970
Posts: 4993
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: No subnet declaration for eth0. Setting up DHCP server.

Sun Mar 10, 2019 10:40 am

hortimech wrote:
Sun Mar 10, 2019 9:26 am
Because if you are running a dhcp server it needs to have a fixed IP, so anything that sets the ipaddress isn't needed , so why have it installed and running ?
Technically, it doesn’t. But of course you don’t want 2 competing DHCP servers on the same network so a static IP it is often.
Something has to setup that static IP. On Raspbian Stretch the preferred way is dhcpcd.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

hortimech
Posts: 416
Joined: Wed Apr 08, 2015 5:52 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Sun Mar 10, 2019 2:25 pm

epoch1970 wrote:
Sun Mar 10, 2019 10:40 am
hortimech wrote:
Sun Mar 10, 2019 9:26 am
Because if you are running a dhcp server it needs to have a fixed IP, so anything that sets the ipaddress isn't needed , so why have it installed and running ?
Technically, it doesn’t. But of course you don’t want 2 competing DHCP servers on the same network so a static IP it is often.
Something has to setup that static IP. On Raspbian Stretch the preferred way is dhcpcd.
Why?

incognitum
Posts: 476
Joined: Tue Oct 30, 2018 3:34 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Sun Mar 10, 2019 3:30 pm

AryInd wrote:
Sat Mar 09, 2019 4:12 pm
Where would I need to add that?
Either at top or bottom of file. Does not really matter.

epoch1970
Posts: 4993
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: No subnet declaration for eth0. Setting up DHCP server.

Sun Mar 10, 2019 4:02 pm

hortimech wrote:
Sun Mar 10, 2019 2:25 pm
Why?
Mhh. Let me see. It is preintalled since Jessie, it is documented, it mostly works.
Did I get that right?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

hortimech
Posts: 416
Joined: Wed Apr 08, 2015 5:52 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Sun Mar 10, 2019 4:24 pm

epoch1970 wrote:
Sun Mar 10, 2019 4:02 pm
hortimech wrote:
Sun Mar 10, 2019 2:25 pm
Why?
Mhh. Let me see. It is preintalled since Jessie, it is documented, it mostly works.
Did I get that right?
So, just because it is installed on something that gets its IP via dhcp and is documented, it is a good reason not to remove it when you are replacing it with a dhcp server ?
The 'it mostly works' worries me, it means you are championing the use of something that isn't needed if you are running a dhcp server and by your words has problems.

epoch1970
Posts: 4993
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: No subnet declaration for eth0. Setting up DHCP server.

Sun Mar 10, 2019 5:11 pm

hortimech wrote:
Sun Mar 10, 2019 4:24 pm
So, just because it is installed on something that gets its IP via dhcp and is documented, it is a good reason not to remove it when you are replacing it with a dhcp server ?
The 'it mostly works' worries me, it means you are championing the use of something that isn't needed if you are running a dhcp server and by your words has problems.
I’m not going to discuss this further. For the record, removing dhcpcd from Raspbian without a good reason is not sound advice.

The OP has left the room with reason. Perhaps he needed a dhcp server because his project was a Pi 3 wireless router. I don’t think removing the dhcp client would have done any good in this case. Or any case in general.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

hortimech
Posts: 416
Joined: Wed Apr 08, 2015 5:52 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Sun Mar 10, 2019 7:46 pm

epoch1970 wrote:
Sun Mar 10, 2019 5:11 pm

I’m not going to discuss this further. For the record, removing dhcpcd from Raspbian without a good reason is not sound advice.
The OP has left the room with reason. Perhaps he needed a dhcp server because his project was a Pi 3 wireless router. I don’t think removing the dhcp client would have done any good in this case. Or any case in general.
You still haven't given a really valid reason why this is a bad idea, what catastrophic disaster will befall anybody who does this ?

I also wasn't suggesting removing the dhcp client program, I was suggesting removing dhcpcd5, but neither are actually required on a machine that has a fixed IP.

Just because something is a default install package doesn't mean it cannot be removed, though there are some packages you shouldn't remove, dhcpcd5 isn't one of them.

User avatar
rpdom
Posts: 16984
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: No subnet declaration for eth0. Setting up DHCP server.

Sun Mar 10, 2019 8:31 pm

hortimech wrote:
Sun Mar 10, 2019 7:46 pm
I also wasn't suggesting removing the dhcp client program, I was suggesting removing dhcpcd5
What do you think the second "c" in dhcpcd5 stands for? It is the dhcp client.
Unreadable squiggle

hortimech
Posts: 416
Joined: Wed Apr 08, 2015 5:52 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Mon Mar 11, 2019 12:47 pm

No, I didn't know what the second 'c' was for, so thanks for telling me, but you still haven't answered the main questions.

Why not remove it ?
What will happen if you do ?
Why do you need something to set a clients IP if the client has a fixed ipaddress ?

On an rpi you have limited disk space, so why not remove software that isn't needed and probably isn't being used ?

AryInd
Posts: 6
Joined: Fri Mar 08, 2019 11:06 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Wed Mar 13, 2019 1:21 am

Ummm thanks for all the input guys! I am unfortunately still having this error. I tried adding the

Code: Select all

auto etho
at the top of the file but it did not work and still gives me the same error.
epoch1970 wrote:
hortimech wrote:
Sun Mar 10, 2019 4:24 pm
So, just because it is installed on something that gets its IP via dhcp and is documented, it is a good reason not to remove it when you are replacing it with a dhcp server ?
The 'it mostly works' worries me, it means you are championing the use of something that isn't needed if you are running a dhcp server and by your words has problems.
I’m not going to discuss this further. For the record, removing dhcpcd from Raspbian without a good reason is not sound advice.

The OP has left the room with reason. Perhaps he needed a dhcp server because his project was a Pi 3 wireless router. I don’t think removing the dhcp client would have done any good in this case. Or any case in general.
I am looking to create a wired server to bypass a router and create a fixed IP to access an Apache Web server + MySQL database.

epoch1970
Posts: 4993
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: No subnet declaration for eth0. Setting up DHCP server.

Wed Mar 13, 2019 9:52 am

As already said, setting a static IP in Stretch is done with dhcpcd. Link above.
Remove the stuff you have in interfaces.

Alternatively, remove dhcpcd or disable it via systemctl or add "denyinterfaces eth0" and configure the interfaces file.
There is no reason to do this but you can.

It's one solution OR the other. They are interfering with each other.

One problem at a time: prevent the dhcp server from starting until you manage to get a static IP address.
It should not be long.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

incognitum
Posts: 476
Joined: Tue Oct 30, 2018 3:34 pm

Re: No subnet declaration for eth0. Setting up DHCP server.

Wed Mar 13, 2019 10:55 am

AryInd wrote:
Wed Mar 13, 2019 1:21 am
Ummm thanks for all the input guys! I am unfortunately still having this error. I tried adding the

Code: Select all

auto etho
at the top of the file but it did not work and still gives me the same error.
ifconfig does show the address was configured correctly?

==
epoch1970 wrote:
Wed Mar 13, 2019 9:52 am
It's one solution OR the other. They are interfering with each other.
Interfering is a big word.
dhcpcd is very aware of when its presence is not desired:

Code: Select all

Mar 13 10:49:51 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
Mar 13 10:49:51 raspberrypi dhcpcd[325]: Not running dhcpcd because /etc/network/interfaces
Mar 13 10:49:51 raspberrypi dhcpcd[325]: defines some interfaces that will use a
Mar 13 10:49:51 raspberrypi dhcpcd[325]: DHCP client or static address

User avatar
RaTTuS
Posts: 10555
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: No subnet declaration for eth0. Setting up DHCP server.

Wed Mar 13, 2019 11:02 am

AryInd wrote:
Sat Mar 09, 2019 8:24 pm
....
I don't want my raspberry pi connected to a router. I was able to do this about 6 months ago, but all my files got corrupted so I had to reinstall raspbian.
OK so you did something else like opening your RP to the world with default username / passwords or you have a compromised system
I'd fix my local problems first
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

agasfer
Posts: 16
Joined: Fri Feb 17, 2017 5:13 am
Location: East Bay, California, USA

Re: No subnet declaration for eth0. Setting up DHCP server.

Sat Mar 28, 2020 1:19 am

guys, any more ideas on this?

I am suffering from the same problem, am using R-Pi as a DHCP server on the home network, and it does not come up on its own after power interruptions (of which we started having a few :P) Note that in my setup the Pi is also configured with static IPv4 address, and IPv6 is disabled.

I have a few more observations:

after the Pi boots up, the dhcp server is not running, the same error message is reported as in the OP:

Code: Select all

root@raspberrypi:/home/pi# systemctl status isc-dhcp-server.service
* isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
   Active: failed (Result: exit-code) since Fri 2020-03-27 18:05:03 PDT; 56s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 413 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

Mar 27 18:05:01 raspberrypi dhcpd[639]: bugs on either our web page at www.isc.org or in the README file
Mar 27 18:05:01 raspberrypi dhcpd[639]: before submitting a bug.  These pages explain the proper
Mar 27 18:05:01 raspberrypi dhcpd[639]: process and the information we find helpful for debugging.
Mar 27 18:05:01 raspberrypi dhcpd[639]: 
Mar 27 18:05:01 raspberrypi dhcpd[639]: exiting.
Mar 27 18:05:03 raspberrypi isc-dhcp-server[413]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed!
Mar 27 18:05:03 raspberrypi isc-dhcp-server[413]:  failed!
Mar 27 18:05:03 raspberrypi systemd[1]: isc-dhcp-server.service: Control process exited, code=exited, status=1/FAILURE
Mar 27 18:05:03 raspberrypi systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Mar 27 18:05:03 raspberrypi systemd[1]: Failed to start LSB: DHCP server.
this is what's added into /var/log/daemon.log:

Code: Select all

root@raspberrypi:/home/pi# grep dhcp /var/log/daemon.log 
Mar 27 18:05:00 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
Mar 27 18:05:00 raspberrypi dhcpcd[309]: dev: loaded udev
Mar 27 18:05:00 raspberrypi dhcpcd[309]: forked to background, child pid 378
Mar 27 18:05:00 raspberrypi systemd[1]: Started dhcpcd on all interfaces.
Mar 27 18:05:00 raspberrypi dhcpcd-run-hooks[403]: wlan0: starting wpa_supplicant
Mar 27 18:05:00 raspberrypi isc-dhcp-server[413]: Launching IPv4 server only.
Mar 27 18:05:01 raspberrypi dhcpcd[378]: wlan0: connected to Access Point `'
Mar 27 18:05:01 raspberrypi dhcpcd[378]: eth0: waiting for carrier
Mar 27 18:05:01 raspberrypi dhcpcd[378]: dhcpcd_prestartinterface: wlan0: Operation not possible due to RF-kill
Mar 27 18:05:01 raspberrypi dhcpcd[378]: wlan0: waiting for carrier
Mar 27 18:05:01 raspberrypi dhcpcd[378]: eth0: carrier acquired
Mar 27 18:05:01 raspberrypi dhcpcd[378]: DUID 00:01:00:01:25:d8:34:dd:b8:27:eb:f6:84:e1
Mar 27 18:05:01 raspberrypi dhcpcd[378]: eth0: IAID eb:a3:d1:b4
Mar 27 18:05:01 raspberrypi dhcpcd[378]: eth0: adding address fe80::ca18:4eda:141d:d963
Mar 27 18:05:01 raspberrypi dhcpcd[378]: ipv6_addaddr1: Permission denied
Mar 27 18:05:01 raspberrypi dhcpcd[378]: eth0: probing address 192.168.1.19/24
Mar 27 18:05:01 raspberrypi dhcpd[639]: Wrote 0 leases to leases file.
Mar 27 18:05:01 raspberrypi dhcpd[639]: 
Mar 27 18:05:01 raspberrypi dhcpd[639]: No subnet declaration for eth0 (no IPv4 addresses).
Mar 27 18:05:01 raspberrypi dhcpd[639]: ** Ignoring requests on eth0.  If this is not what
Mar 27 18:05:01 raspberrypi dhcpd[639]:    you want, please write a subnet declaration
Mar 27 18:05:01 raspberrypi dhcpd[639]:    in your dhcpd.conf file for the network segment
Mar 27 18:05:01 raspberrypi dhcpd[639]:    to which interface eth0 is attached. **
Mar 27 18:05:01 raspberrypi dhcpd[639]: 
Mar 27 18:05:01 raspberrypi dhcpd[639]: 
Mar 27 18:05:01 raspberrypi dhcpd[639]: Not configured to listen on any interfaces!
Mar 27 18:05:01 raspberrypi dhcpd[639]: 
Mar 27 18:05:01 raspberrypi dhcpd[639]: If you think you have received this message due to a bug rather
Mar 27 18:05:01 raspberrypi dhcpd[639]: than a configuration issue please read the section on submitting
Mar 27 18:05:01 raspberrypi dhcpd[639]: bugs on either our web page at www.isc.org or in the README file
Mar 27 18:05:01 raspberrypi dhcpd[639]: before submitting a bug.  These pages explain the proper
Mar 27 18:05:01 raspberrypi dhcpd[639]: process and the information we find helpful for debugging.
Mar 27 18:05:01 raspberrypi dhcpd[639]: 
Mar 27 18:05:01 raspberrypi dhcpd[639]: exiting.
Mar 27 18:05:01 raspberrypi dhcpcd[378]: eth0: soliciting an IPv6 router
Mar 27 18:05:03 raspberrypi isc-dhcp-server[413]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed!
Mar 27 18:05:03 raspberrypi isc-dhcp-server[413]:  failed!
Mar 27 18:05:03 raspberrypi systemd[1]: isc-dhcp-server.service: Control process exited, code=exited, status=1/FAILURE
Mar 27 18:05:03 raspberrypi systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Mar 27 18:05:06 raspberrypi dhcpcd[378]: eth0: using static address 192.168.1.19/24
Mar 27 18:05:06 raspberrypi dhcpcd[378]: eth0: adding route to 192.168.1.0/24
Mar 27 18:05:06 raspberrypi dhcpcd[378]: eth0: adding default route via 192.168.1.1
interestingly enough, if I run the systemctl start manually, the service starts successfully:

Code: Select all

root@raspberrypi:/home/pi# systemctl start isc-dhcp-server.service
root@raspberrypi:/home/pi# 
and this is what's added to /var/log/daemon.log

Code: Select all

Mar 27 18:08:03 raspberrypi isc-dhcp-server[964]: Launching IPv4 server only.
Mar 27 18:08:03 raspberrypi dhcpd[977]: Wrote 0 leases to leases file.
Mar 27 18:08:03 raspberrypi dhcpd[977]: Server starting service.
Mar 27 18:08:05 raspberrypi isc-dhcp-server[964]: Starting ISC DHCPv4 server: dhcpd.
I thought maybe the problem was with interactions between dhcp client and server, so I added a 30 second delay to the [Service] section in /etc/systemd/system/dhcpcd5.service

it did not help, the only difference is that it looks like the Pi does not become available on the network until this service starts.

Also, I am completely puzzled: it is not clear to me what is starting isc-dhcp-server when the Pi boots up, I don't see this service mentioned neither in in /etc/... nor in /lib/systemd/system/...

In general this looks like a genuine problem with Pi startup in

Code: Select all

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
I sure hope some folks in the know read this thread :D

Return to “Networking and servers”