DHCP failure when rebooting RPI 2

30,477

Solution 1

The fact that you get an IP address obtained via DHCP means that there is another DHCP client active on your Raspberry. You can check how many clients are installed by running the following command:

dpkg -l | grep dhcp

In my case (Raspberry Pi 2 image from 5th May) I got:

ii  dhcpcd5         6.7.1-1+rpi1                 armhf        DHCPv4, IPv6RA and DHCPv6 client with IPv4LL support
ii  isc-dhcp-client 4.2.2.dfsg.1-5+deb70u6       armhf        ISC DHCP client
ii  isc-dhcp-common 4.2.2.dfsg.1-5+deb70u6       armhf        common files used by all the isc-dhcp* packages

So obviously there are two DHCP clients installed (dhcpcd5 and isc-dhcp-client). DHCPCD detects the existence of the another client and does not start, showing the error. To get rid of the error you can remove the dhcpcd client:

apt-get remove dhcpcd5

Solution 2

i had similar issue i was able to fixed running these commands:

sudo systemctl disable dhcpcd.service
sudo systemctl reboot

the issue seems to be that is that dhcpcd.service is being installed in some update and is not compatible with /etc/network/interfaces

Solution 3

The DHCPD daemon allows the Linux your RaspberryPi is running to be a DHCP server for your network.

In most cases, however, you will already have a DHCP server running on your network - usually your ISP-provided modem/router.

Your RaspberryPi is trying to start the DHCPD daemon but because you have pre-configured the OS (by editing /etc/network/interfaces) to tell the network interfaces to be DHCP clients (i.e. to obtain an IP address rather than distribute) the DHCPD daemon is failing to start (by design). This is normal behaviour.

The only thing I should mention is that because you don't want your RaspberryPi to be a DHCP server on your network I would recommend you disable the daemon so that it doesn't start (thus use resources) and doesn't display the error you are experiencing - See this answer: https://raspberrypi.stackexchange.com/questions/22297/disabling-dhcp-server.

Share:
30,477

Related videos on Youtube

Vanch
Author by

Vanch

Updated on September 18, 2022

Comments

  • Vanch
    Vanch over 1 year

    When we start up my Raspberry pi 2, we get the following error:

    enter image description here

    When the RPI is rebooted, we are getting an IP and we are able to surf on the internet, so we don't know what the error exactly means. We are connected with a WPA2-enterprise network.

    This is my interfaces file:

    auto lo
    
    iface lo inet loopback
    iface eth0 inet dhcp
    
    auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    

    And this is my wpa_supplicant.conf file:

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    
    network={
            ssid="Here comes my ssid"
            proto=RSN
            key_mgmt=WPA-EAP
            pairwise=CCMP
            auth_alg=OPEN
            identity="Here comes my identity"
            password="here comes my password"
    }
    

    How to solve this issue?

    • Kinnectus
      Kinnectus almost 9 years
      Your RaspberryPi is configured to start a DHCP server for your network (dhcpd is a DHCP server daemon - en.wikipedia.org/wiki/DHCPD) but it can't run because you've already configured the network interfaces (/etc/network/interfaces) it would be providing services to to be DHCP clients (i.e. to obtain addresses).
    • Admin
      Admin over 8 years
      To solve this problem I used the solution descripted here. superuser.com/questions/924166/…
  • Vanch
    Vanch almost 9 years
    I understand what you are trying to say, I found the next entries, but can't seem to get them disabled.. prntscr.com/7de4p7
  • klokop
    klokop over 8 years
    According to 'man dhcpd', it's a DHCP client, not a server... DHCPCD(8) BSD System Manager's Manual DHCPCD(8) NAME dhcpcd — a DHCP client
  • Luigi Plinge
    Luigi Plinge about 8 years
    -1 (sorry!) since this answer is completely wrong. Question relates to DHCPCD, not DHCPD. Easy mistake to make.