From Wikipedia:

The Dynamic Host Configuration Protocol (DHCP) is an auto configuration protocol used on IP networks. Computers that are connected to IP networks must be configured before they can communicate with other computers on the network. DHCP allows a computer to be configured automatically, eliminating the need for intervention by a network administrator. It also provides a central database for keeping track of computers that have been connected to the network. This prevents two computers from accidentally being configured with the same IP address.

It is really easy to install and configure a DHCP server:

We will cover here the installation and configuration for Slackware, Arch Linux and Debian / Ubuntu

Install the software

You should be able to install it using your package manager:

For Debian

apt-get install dhcp3-server

For CentOS

yum install dhcp

For Slackware

slackpkg install dhcp

For Arch Linux

pacman -Sy dhcp

Configure DHCP server

Now that you have DHCP installed, you need to be sure it is going to run every time you boot up your server.

Debian / Ubuntu

sysv-rc-conf dhcp3-server on

CentOS / Fedora

chkconfig dhcpd on

Slackware Linux

chmod +x /etc/rc.d/rc.dhcpd

If that file does not exists in your Slackware server, you will have to create one:

Just use your favorite text editor, to create the file /etc/rc.d/rc.dhcpd with this contents.

# /etc/rc.d/rc.dhcpd
#      This shell script takes care of starting and stopping
#      the ISC DHCPD service

# Put the command line options here that you want to pass to dhcpd:

[ -x /usr/sbin/dhcpd ] || exit 0

[ -f /etc/dhcpd.conf ] || exit 0

start() {
      # Start daemons.
      echo -n "Starting dhcpd:  /usr/sbin/dhcpd $DHCPD_OPTIONS "
      /usr/sbin/dhcpd $DHCPD_OPTIONS
stop() {
      # Stop daemons.
      echo -n "Shutting down dhcpd: "
      killall -TERM dhcpd
status() {
  PIDS=$(pidof dhcpd)
  if [ "$PIDS" == "" ]; then
    echo "dhcpd is not running!"
    echo "dhcpd is running at pid(s) ${PIDS}."
restart() {

# See how we were called.
case "$1" in
        echo "Usage: $0 {start|stop|status|restart}"
exit 0

Then apply appropriate permissions

chmod 755 /etc/rc.d/rc.dhcpd

For Arch Linux

Here you just need to add it to the Daemons list in the /etc/rc.conf file.

Configure DHCP server

The configuration file is dhcpd.conf

Here is an example of the file I use in my office.

ddns-update-style none;
ignore client-updates;
option  local-wpad      code    252     =       text;

subnet netmask {

# --- default gateway
      option routers        ;
# --- Netmask
      option subnet-mask    ;
# --- Broadcast Address
      option broadcast-address;
# --- Domain Name, set the domain name for DHCP clients
      option domain-name              "";
# --- Domain name servers, tells the clients which DNS servers to use.
      option domain-name-servers,,,;
      option time-offset              0;      # Eastern Standard Time
# --- Proxy auto configuration file, tells client browsers which Proxy to use -- See proxy.pac examble below
      option  local-wpad      "\n";
# --- Sets the ntp server
      option ntp-servers    
# --- If you need netbios name server, set it here
#     option netbios-name-servers;
# --- Set the range of IPs available for the DHCP to give to clients
# --- Set the default lease time, how much time the client is permited to use the given IP. After that the client tries to renew the use of the IP it is already using. Actually before that time has passed.
      default-lease-time 1209600;
# --- Set the maximum lease time, after that time has passed, the client will have to ask for a new IP.
      max-lease-time 1814400;
# If you need any PC to have a fixed IP, let's say the printer server.
       host printer {
           hardware ethernet 00:08:a1:82:00:11;

proxy.pac example

   function FindProxyForURL(url, host) {
      // our local URLs from the domains below don't need a proxy:
      if (shExpMatch(url,"**"))                  {return "DIRECT";}
      if (shExpMatch(url, "**/*"))               {return "DIRECT";}

      // URLs within this network are accessed through
      // port 8080 on
      if (isInNet(host, "",  ""))    {
         return "PROXY";

      // All other requests go through port 8080 of
      // should that fail to respond, go directly to the WWW:
      return "PROXY; DIRECT";


DHCP is almost a must in any network configuration, usually your DSL or cable modem has a DHCP server running inside, or your WiFi router may also have one, if you prefer to have your Linux server in charge of this, disable any other DHCP server before starting the Linux one, or you may have IP address conflicts.

There are a lot of other options you can configure, you can haver a backup DHCP server, and you can have your DHCP server working together with a DNS server, so you can assign a name in your domain to any computer connected.

Check, dhcp-options man page and dhcpd.conf man page