IT in Education

Configuring dhcp services on a FOG server

fogDHCP (Dynamic Host Configuration Protocol) services provide client machines with dynamic IP address details.  This article shows you how to configure this service on a FOG server.

Configure dhcp

  • You need to edit the dhcpd.conf file to configure the DHCP service.  It's good practice to backup the configuration file before you make any changes.
sudo cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcp.conf.bak
sudo vi /etc/dhcp/dhcpd.conf

Here is an example dhcp.conf file that is automatically created by FOG.

# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcp.conf.sample
# This file was created by FOG
use-host-decl-names on;
ddns-update-style interim;
ignore client-updates;

subnet netmask {
option subnet-mask;
range dynamic-bootp;
default-lease-time 21600;
max-lease-time 43200;
option domain-name-servers;
option routers;
filename "undionly.kpxe";

To change DHCP scope, edit the following line:

range dynamic-bootp;

 To add multiple DNS servers change the following:


To add a reservation add the following lines...

host hostname{
hardware ethernet A1:B2:C3:D4:E5:F6;

Save your changes.

Restart dhcp-server

Finally you need to restart the dhcp daemon for your changes to be active.

sudo /etc/init.d/isc-dhcp-server restart

Configure the NIC

Note that on early versions of FOG, by default the dhcpd would listen on eth0.  This is not an issue for FOG 1.2.0.

Edit /etc/default/dhcp3-server to change the NIC

sudo vi /etc/default/dhcp3-server
Change the following line if you need to...

Thanks for visiting,