Migration Tips For Upgrading From DHCP 3 to DHCP 4
  • 20 Nov 2020
  • 2 Minutes To Read
  • Contributors
  • Print
  • Share
  • Dark

Migration Tips For Upgrading From DHCP 3 to DHCP 4

  • Print
  • Share
  • Dark

ISC has ended support for DHCP 3.1-ESV, the last supported version of the DHCP 3 family of software releases.

Customers who wish to use a supported version of the software are advised to consult the DHCP downloads page and select a "Current" or "Extended Support Version" of DHCP 4. DHCP 4 offers several advantages over version 3, including:

  • IPv6 support
  • performance improvements for busy servers
  • improved failover protocol
  • support for more host operating systems
  • code updated for compliance with modern compilers
  • many security fixes, bug fixes, and feature improvements

Perhaps most critically, ISC will provide fixes for future security issues that are discovered in DHCP 4, while DHCP 3 will not receive any further development.

To aid with your migration, ISC has some tips on planning and managing your transition to a current version.

  • Begin by selecting the version to which you will upgrade.
  • Make sure you know where the current version of dhcpd expects to find its configuration file (dhcpd.conf) and leases database (dhcpd.leases). Prior to building the new version we recommend that you back up all DHCP binaries, configuration files, and run-time data storage (e.g. the leases database).
  • Download the version you have chosen as your upgrade target from ISC's DHCP repository. Unpack the compressed tar file in a build directory, then configure and compile the software but do not yet run make install to install it. Optional arguments to the ./configure script in the package root allow you to customize the location used for the configuration file and leases database if those are not stored in default locations on your system. ./configure --help provides a usage message with a list of available options.
  • Although ISC DHCP 4 has been designed to be as compatible as possible with the configuration syntax used by ISC DHCP 3, and although DHCP 4 is able to read the leases file format used by DHCP3, it is still a good idea to ensure that the dhcpd.conf file and dhcpd.leases files are syntactically correct by checking them with the new dhcpd binary. Invoke the new dhcpd from its location in the build directory with the -t option (for the config file) and -T (for leases); for example:
# Execute from the top level of the unpacked source tar or change path to dhcpd executable

# tests compatibility of dhcpd.conf file syntax
./server/dhcpd -t -cf /path/to/dhcpd.conf -lf /path/to/dhcpd.leases

# tests compatibility of dhcpd.leases file syntax
./server/dhcpd -T -cf /path/to/dhcpd.conf -lf /path/to/dhcpd.leases
  • Address any issues flagged by the previous step.
  • Stop your server, or both servers if you are running a failover pair.
  • Start the new binaries, taking care to run under the appropriate uid for your system so the server will have the right privileges to bind to ports, read the config file, and read and write the leases database.
  • Confirm (by checking the log files) that the new server binaries are running properly, logging messages, and that the server is handing out leases to clients.
  • Use make install to install the new binaries and supporting files in their permanent locations once you are convinced that the upgraded service is running properly.
I am running with failover. Can I upgrade one server and restart on the new version before upgrading the second server?

While this is potentially possible, there have been changes in the failover protocol and this approach is not recommended without carefully checking the compatibility of the old and new versions.

In general ISC does not recommend running differing versions on a production failover pair.