Installing and configuring DHCP, debian 6

In this article we will install the dhcp server in debian, and will hand out ip addresses in our local area network.

The DHCP protocol (Dynamic Host Configuration Protocol) is used to configure the TCP/IP hosts within the network. The DHCP server selects appropriate configuration parameters (the IP address of the subnet mask and other auxiliary parameters such as the IP address of the default gateway, DNS server addresses, domain names, etc.) user stations.

The DHCP server assigns the client an IP address within a set range for a certain period (lease time). The IP address can be left to the user, you must complete the request for extension of the period before the date of expiry. If the user has not requested renewal period, the IP address is considered free and can be assigned to another client.

Oh well, let’s begin.

apt-get install dhcp3-server

Edit the configuration file:


# What should interfaces On the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. “eth0 eth1”.

You can now configure the server, open the file/etc/dhcp3/dhcpd.conf and enter there the options you want, similar to the example below. In the default configuration file are some examples that you may need in the future, so let’s leave it on the safe side and create a new configuration file.

cat/dev/null >/etc/dhcp3/dhcpd.conf


You should get the following:

the DDNS-update-style none;
# Here is the domain name of the DNS server and the IP address lease time for clients, by default, a maximum of 10 days of week.
option domain-name “”;
option domain-name-servers,;
default-lease-time 604800;
Max-lease-time 864001;
# The Server Logging
the log-facility local7;
# Here is a subnet of addresses for the clients, DNS server, NETBIOS name server,
# доменное имя, широковещательный адрес, и диапазон выдаваемых адресов.
subnet netmask {
option netbios-name-servers;
option domain-name-servers,;
option domain-name “”;
option broadcast-address;
option routers;

Сохраните файл и запустите DHCP сервер командой:

/etc/init.d/dhcp3-server start

Вот вродебы и все друзья!!!