Activating the DHCP Services

All the DHCP services are defined in the server's /etc/dhcp/dhcpd.conf or /etc/dhcp/dhcpd6.conf file. To configure and then activate the configured services, follow these steps:

  • For IPv4 networks:
    1. Open the /etc/dhcp/dhcpd.conf file.
    2. Add parameters and declarations to the file.

      For guidance, see Understanding DHCP Declarations or to the comments and notes in the /usr/share/doc/dhcp-server/dhcpd.conf.example template.

    3. Optionally, set the dhcpd service to start automatically in a server reboot.
      sudo systemctl enable dhcpd
    4. Start or restart the dhcpd service.
      sudo systemctl start dhcpd
  • For IPv6 networks:
    1. Open the /etc/dhcp/dhcpd6.conf file.
    2. Add parameters and declarations to the file.

      For guidance, see Understanding DHCP Declarations or to the comments and notes in the /usr/share/doc/dhcp-server/dhcpd6.conf.example template.

    3. Optionally, set the dhcpd6 service to start automatically in case of a server reboot.
      sudo systemctl enable dhcpd6
    4. Start or restart the dhcpd service.
      sudo systemctl start dhcpd6