DHCP daemon on Raspberry Pi

DHCP stands for “Dynamic Host Configuration Protocol”.    The DHCP daemon is the process which assigns IP addresses to computers when they join a network, and gives them other important information about the network.

Here is how to set up and configure dhcpd on Raspbian Stretch:

  1. Install: Install the package:
    sudo apt-get install isc-dhcp-server
    When you install this package it is configured to run automatically at boot time.
  2. Configure: There are two files to edit:
    1. Move the existing file /etc/dhcp/dhcpd.conf out of the way so you can replace it with your own:
      sudo mv /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.ORIG
      (You should keep it because it contains good documentation and examples).
      Then create and edit a new file /etc/dhcp/dhcpd.conf containing:1

      # Configuration file for DHCP server on Rasberry Pi                             
      ddns-update-style none;
      option domain-name "wifipi.local";
      option domain-name-servers;
      default-lease-time 3600;
      max-lease-time 86400;
      log-facility local7;
      # Configure service for local network (the wireless AP)                    
      subnet  netmask {
          option routers;
    2. Also edit the file /etc/default/isc-dhcp-server to add the line:
  3. Restart: The service should already be enabled, and is probably already running. Restart it with
    sudo systemctl restart isc-dhcp-server


  1. “How to: Make a Raspberry Pi Powered Wifi Repeater” by Dryfire117, https://pastebin.com/A4jUp2Nq
Print Friendly, PDF & Email