Skip to content

ISC DHCP server

Dnsmasq is the recommended default for LTSP, as it's the only one that supports the proxyDHCP protocol. In some cases though, sysadmins might need isc-dhcp-server. The following template dhcpd.conf works out of the box for dual NIC LTSP setups:

# This file is part of LTSP,
# Copyright 2019 the LTSP team, see AUTHORS
# SPDX-License-Identifier: GPL-3.0-or-later

# Configure isc-dhcp-server for LTSP
# Documentation=man:ltsp(8)

# option domain-name "";
option domain-name-servers,,;
option space ipxe;
option ipxe-encap-opts code 175 = encapsulate ipxe;
option code 39 = unsigned integer 8;
option code 176 = unsigned integer 8;
option arch code 93 = unsigned integer 16;

# This is the LTSP subnet declaration
subnet netmask {
  option 1;
  option routers;
  # On single-NIC setups, usually routers != next-server (=TFTP server)
  # option next-server
  if exists {
    filename "ltsp/ltsp.ipxe";
  } elsif option arch = 00:00 {
    filename "ltsp/undionly.kpxe";
  } elsif option arch = 00:07 {
    filename "ltsp/snponly.efi";
  } elsif option arch = 00:09 {
    filename "ltsp/snponly.efi";
  } else {
    filename "ltsp/unmatched-client";

# Example for a host with static IP address and default iPXE menu entry
# host pc01 {
#   hardware ethernet 3c:07:71:a2:02:e3;
#   fixed-address;
#   option host-name "pc01";
#   option root-path "ipxe-menu-item";
# }

Put it in /etc/dhcpd/dhcpd.conf. If you have Ubuntu and LTSP5, delete /etc/ltsp/dhcpd.conf as it interferes. Then if you also have dnsmasq installed, disable its DHCP service. Finally, restart isc-dhcp-server:

ltsp dnsmasq --proxy-dhcp=0 --real-dhcp=0
systemctl restart isc-dhcp-server

If isc-dhcp-server runs somewhere else and not on the LTSP server, you'll probably need to modify the subnet range, the routers, and uncomment next-server and set it to the LTSP server IP. Note that in this case, it's easier to configure your external DHCP server not to offer a boot filename, and just run ltsp dnsmasq to use its default proxyDHCP mode.