Differences between revisions 12 and 13
Revision 12 as of 2007-09-07 22:24:55
Size: 2813
Editor: ?LaurenzWiskott
Comment:
Revision 13 as of 2007-09-08 06:26:43
Size: 2813
Editor: ?LaurenzWiskott
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
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"]. 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"].

?TableOfContents

Introduction

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"].

Installation

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

root# apt-get install dhcp3-server

or

root# aptitude install dhcp3-server

Configuration

The configuration file for a dhcp-server is /etc/dhcp3/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 213.191.92.86, 213.191.74.18;

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 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.1 192.168.1.10;
  option routers pepper.spices.org;
}

This entry defines the LAN and the router of the LAN. The IP-addresses 192.168.1.1 to 192.168.1.255 are typical for an intranet. Here only the range 192.168.1.1 to 192.168.1.10 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/dhcp3-server restart

Advanced configuration

Consult the man pages for advanced options.

user> man dhcpd.conf 

DHCP Server Configuration in Debian [http://www.debianhelp.co.uk/dhcp.htm]

DHCP Server Web interface or GUI Tools [http://www.debianhelp.co.uk/dhcpweb.htm]