From HackerNet
Jump to: navigation, search

"ISC's DHCP software is the most widely used open source DHCP implementation on the Internet. The same software can be used for LAN too. It is a carrier and enterprise grade solution to your host configuration needs." - nixCraft

Se även Kea DHCP.


sudo apt-get -y install isc-dhcp-server
sudo sed -i -r 's/INTERFACES=""/INTERFACES="eth0"/g' /etc/default/isc-dhcp-server


sudo dd of=/etc/dhcp/dhcpd.conf << EOF
# Uppsatt av:

# You must prevent the DHCP server from receiving DNS information 
# from clients, set the following global option (this is a security feature):
ddns-update-style none;

# You need to set your domain name and name server:
option domain-name "";
option domain-name-servers,;

# Increase the lease time. The time is set in seconds:
default-lease-time 7200;
max-lease-time 14400;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
# The authoritative directive indicate that the DHCP server 
# should send DHCPNAK messages to misconfigured clients. 
# If this is not done, clients will be unable to get a correct 
# IP address after changing subnets until their old lease has 
# expired, which could take quite a long time.

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.
subnet netmask {

subnet netmask {
       option subnet-mask;
       option broadcast-address;
       option routers;

subnet netmask {
       option subnet-mask;
       option broadcast-address;
       option routers;

## Slut


sudo dhcpd -t /etc/dhcp/dhcpd.conf