Differences between revisions 28 and 30 (spanning 2 versions)
Revision 28 as of 2013-01-12 22:51:52
Size: 3937
Comment: Add link to french translation
Revision 30 as of 2013-07-03 13:30:31
Size: 3973
Editor: DarkErr
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: [[de/DHCP_Server|Deutsch]] - English - [[fr/DHCP_Server|Français]] - [[it/DHCP_Server|Italiano]] - [[zh_CN/DHCP_Server|简体中文]]-~||<style="text-align: right;border: 0px hidden"> (!) [[/Discussion|Discussion]]|| ||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: [[de/DHCP_Server|Deutsch]] - English - [[fr/DHCP_Server|Français]] - [[it/DHCP_Server|Italiano]] - [[zh_CN/DHCP_Server|简体中文]] - [[ru/DHCP_Server|Русский]]-~||<style="text-align: right;border: 0px hidden"> (!) [[/Discussion|Discussion]]||

Translation(s): Deutsch - English - Français - Italiano - 简体中文 - Русский

(!) ?Discussion


When you set up a Local Area Network (LAN), a client needs to have certain information, such as the IP-address of its interface, the IP-address of at least one domain name server, and the IP-address of a server in the LAN that serves as a router to the internet. In the manual setup you have to type in this information for each client anew. With the Dynamic Host Configuration Protocol (DHCP) the computers can do that automatically for you. This is particularly convenient for connecting laptops to the network.

For a simple configuration of your network you can set up one computer (e.g. the one connected to the internet) as a DHCP server and each of the other computers as a DHCP_Client.


As usual, installation is very simple with apt. As root simply run

root# apt-get install isc-dhcp-server


root# aptitude install isc-dhcp-server


The configuration file for a dhcp-server is /etc/dhcp/dhcpd.conf. Remember to make a backup copy of it before you edit the file.

Basic configuration

For a basic configuration, you have to add/edit the following lines. I would leave all other lines as they are.

option domain-name "spices.org";

This entry provides the name of the domain, spices.org in this case (I am not sure whether and for what this is necessary. I guess it is needed if you want to refer to computers in the LAN by name without domain name, i.e. if you want to refer to computer pepper.spices.org just with pepper.).

option domain-name-servers,;

This entry provides the IP-addresses of two domain name servers (DNS), but one would be sufficient, too. You have to list here the DNS that work for your internet provider, the addresses given here will most likely not work for you.

subnet netmask {
  option routers pepper.spices.org;

This entry defines the LAN and the router of the LAN. The IP-addresses to are typical for an intranet. Here only the range to are permitted. pepper.spices.org is in this case the server connected to the internet that serves as a router.

To make your changes effective you have to restart the dhcp-demon. Run as root

root# /etc/init.d/isc-dhcp-server restart # new version
root# /etc/init.d/dhcp3-server restart # old version

Advanced configuration

Assign fixed addresses

To assign a fixed address, e.g., to a particular machine, e.g. cinnamon, add a statement like the following to the configuration file.

host cinnamon {
  hardware ethernet 00:0D:87:B3:AE:A6;

The cryptic number 00:0D:87:B3:AE:A6 is the hardware address of the interface of cinnamon. It identifies the client to the server. You can get it by running the ifconfig command on the client if the interface is up.

The name (cinnamon) given here is pretty arbitrary at this point and not used for anything yet, as far as I can tell.

More information

Consult the man pages for advanced options.

user> man dhcpd.conf