Rpi Raspbianwheezy DHCP Server
Rpi Raspbianwheezy DHCP Server
Rpi Raspbianwheezy DHCP Server
( Kenneth A Spencer)
1. Introduction
The Dynamic Host Configuration Protocol (DHCP) enables any of the computers on your local area
network (LAN) to be given a network configuration automatically as soon as the boot process on the
machine gets underway. Most routers are capable of this function.
This function can also be carried out by a server computer, although almost any of your computers can
fulfil the rle. The other computers which are configured to take advantage of this service are called
DHCP Clients, and need to have their networking setup configured to use DHCP.
These instructions apply to the Raspbian Wheezy distribution for the Raspberry Pi - other distributions
differ in their detailed implementations.
The information which can be passed from your DHCP Server to its clients includes:
- a suitable IP Address, either permanently or leased for a defined period;
- the address of your router (aka gateway);
- an address of one or more Domain Name Servers (DNS) within or outwith your LAN or both.
Note that there are two versions of IP addresses in current use. In this document we refer exclusively to
version 4 addresses which comprise four octets separated by a full stop e.g. 10.20.30.40.
2. Installation
To install the Debian DHCP Server login as root and type the following command:
apt-get install isc-dhcp-server
The DHCP Server software will be obtained and installed. You may receive an error when the DHCP
Server first attempts to run, but this will be resolved after configuration is completed.
3. Configuration
The configuration file for the Debian DHCP server is /etc/dhcp/dhcpd.conf. This file will
require editing so as to reflect your LAN setup. Start the editing process with nano as follows:
nano /etc/dhcp/dhcpd.conf
You must insert into the file settings appropriate to your network. We have divided the settings into
sections. Locate the lines given, and comment out the existing settings by placing a hash symbol ("#") at
the start of the line. Then retype the lines using the text given.
Your local Domain Name:
option domain-name "your_domain.your_lan"
An example would be my_domain.local.
Domain Name Server(s):
option domain-name-servers 10.0.0.1, 10.0.0.2, 8.8.8.8
Enter the IP Addresses of one or more DNS servers. Do not use the addresses given above, rather use
the correct options for your own LAN! If you have a DNS service for machines on your LAN, enter the
server IP address. Your remote DNS Server will be supplied by your ISP, or you can use public DNS
Services such as Google's, which are at 8.8.8.8. and 8.8.4.4.
Note that if you do not have a local DNS service, you will need to enter the names of all computers and
their IP addresses into each of your computer's /etc/hosts file instead.