Žilinská univerzita > Fakulta riadenia a informatiky > Katedra informačných sietí

A VERY BASIC DHCP server configuration under Debian OS

This article describes a very basic configuration of DHCP server (isc-dhcp-server) under Debian OS.


Installing DHCP server:

#apt-get install isc-dhcp-server

*note: package isc-dhcp-server replaced the old dhcp3 package


We need to specify the port to bind to. To do this we need to edit the file "/etc/default/isc-dhcp-server":


Next and the last thing to do to configure our DHCP server is to specify subnetworks in its configuration file "/etc/dhcp/dhcpd.conf". Here is the example of the file:

#define that the dhcp server is configured correctly and is
#the authoritative served if multiple dhcp servers exist
#define the default (if not specified differently for subnet)
domain for all users
option domain-name "ps1.sk";

#define the default (if not specified differently for subnet) dns servers for all users
option domain-name-servers;

#specify the default lease and max lease time 
default-lease-time 86400;
max-lease-time 86400;

#for logging file (set for rsyslog)
log-facility local7;


subnet netmask {
  #lease addresses from this range:
  #if DHCP request comes from routers with there addresses (separated by commas): 
  option routers;             
  #define subnet specific parameters which will override global parameters, for example:
  #max-lease-time 7200;

  #you can specify statically mapped IP addresses to MAC addresses like this:  
  #  host print_server {
  #    hardware ethernet 00:01:23:e2:d1:22;
  #    fixed-address;         

  #if you need to specify groups of addresses which you must treat differently (for example different lease time or domain name), you can
  #specify address pools and define their specific values:
  #pool {
  #  range;
  #  max-lease-time 7200;

subnet netmask {
  option routers;             

#we need to specify default range for interfaces we are listening on.. 
#since we configured our server to listen only on eth0 (with IP,
#we need to scecify:
subnet netmask {

When the configuration is done, restart the dhcp server:

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

Done :)

If the server is complaining about something, see the "/var/log/syslog" for more details.