DHCP server installation
Dynamic Host Configuration Protocol.
Note:
Since Ubuntu 11.10 the DHCP3-server is available in the "isc-dhcp-server" package.
Contents
Sources
You can find more information about that topic over here:
Requirement
A DHCP server can provided static or dynamic address.
However, the DHCP server's IP @ must always be static!!
If you want to use a DNS, then you can even setup the DNS server first. See DNS server
Installation
DHCP server
apt-get install isc-dhcp-server
You will be asked a few questions:
- On what network interfaces should the DHCP server listen? <-- eth0
- Please configure the DHCP server as soon as the installation finishes. <-- Ok
- The version 3 DHCP server is now non-authoritative by default <-- Ok
At the end of the installation you will see errors like these:
* Generating /etc/default/dhcp3-server...
- Starting DHCP server: dhcpd3 failed to start - check syslog for diagnostics.
- invoke-rc.d: initscript dhcp3-server, action "start" failed.
That's OK because we did not have the chance yet to configure our DHCP server.
Security
See Firewall rules for DHCP server
Configuration
Configuration file
The main configuration file is /etc/dhcp/dhcpd.conf
vim /etc/dhcp/dhcpd.conf
You can adjust the interface the server is listening on in /etc/dhcp/dhcp3-server
INTERFACES="eth0 eth1"
Assign IP
You can assign dynamic and / or static IP, you can also you NetBoot settings.
See: