0

I've set up a standard ISC DHCP server on my Pi4 running 5.10.52-v7l+ of Pi OS. I'd initially had my static IP set in my /etc/network/interfaces file and that worked ok but I couldn't get WiFi working and while researching the problem I read in multiple places that I should not be editing /etc/network/interfaces and should instead use /etc/dhcpcd.conf - which I did as follows:

interface eth0
static ip_address=192.168.1.39/24
static routers=192.168.1.254
static domain_name_servers=192.168.1.254 8.8.8.8

interface wlan0
static ip_address=192.168.1.251/24
static routers=192.168.1.254
static domain_name_servers=192.168.1.254 8.8.8.8

However when I reboot isc-dhcp-server.service fails to antomatically start giving the following error:

pi@Pi4:~ $ sudo 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 Sun 2021-11-28 18:20:53 GMT; 4min 12s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 524 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

Nov 28 18:20:51 Pi4 dhcpd[769]: bugs on either our web page at www.isc.org or in the README file
Nov 28 18:20:51 Pi4 dhcpd[769]: before submitting a bug.  These pages explain the proper
Nov 28 18:20:51 Pi4 dhcpd[769]: process and the information we find helpful for debugging.
Nov 28 18:20:51 Pi4 dhcpd[769]:
Nov 28 18:20:51 Pi4 dhcpd[769]: exiting.
Nov 28 18:20:53 Pi4 isc-dhcp-server[524]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed!
Nov 28 18:20:53 Pi4 isc-dhcp-server[524]:  failed!
Nov 28 18:20:53 Pi4 systemd[1]: isc-dhcp-server.service: Control process exited, code=exited, status=1/FAILURE
Nov 28 18:20:53 Pi4 systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Nov 28 18:20:53 Pi4 systemd[1]: Failed to start LSB: DHCP server.

A quick sudo systemctl restart isc-dhcp-server.service sorts it out.

My /etc/default/isc-dhcp-server file looks like this:

INTERFACESv6=""
INTERFACESv4="eth0"

So only listening on the ethernet port

My question - If I'm running ISC dhcp server, where/how should I be setting my static IP? Thanks I

0
0

You appear to want a DHCP server (although it is unclear why) but appear to have configured dhcpcd to use an external server.

You can only have ONE server on a network segment.

If you are attempting to create an access point you can use interfaces but disable dhcpcd, or tell dhcpcd not to configure an interface.

3
  • I'm setting up the Pi to act as the definitive and only DHCP server for my network. The Server supplied on my router has limited capabilities. The Pi will not be an AP. So you re saying I should use /etc/network/interfaces file to set static addresses when setting up a DHCP server?
    – Ian C
    Nov 29 '21 at 11:47
  • @IanC I did not say "I should use /etc/network/interfaces" I said "you CAN use interfaces but disable dhcpcd". You haven't provided enough information about what you are trying to do for any recommendation.
    – Milliways
    Nov 30 '21 at 2:02
  • The only question I'm asking is - I'm running ISC dhcp server on a RPi then what is the right or best method for setting a static address in that RPi? Thanks
    – Ian C
    Nov 30 '21 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.