DHCP static IP assignation

Global configuration

Access configuration file

The main configuration file is /etc/dhcp/dhcpd.conf

vim /etc/dhcp/dhcpd.conf

Static IP @

This new configuration will ONLY accept known clients and give them a static IP @.

# Sample /etc/dhcpd.conf
# (add your comments here) 
default-lease-time 600;
max-lease-time 7200;
option subnet-mask;
option broadcast-address;
option routers;
# Google
# OpenDNS (https://www.opendns.com/home-internet-security/opendns-ip-addresses/)
option domain-name-servers,,;
option domain-name "mydomain.lan";
option ntp-servers;

deny unknown-clients;

subnet netmask {
    host client1 {
        hardware ethernet AA:00:DF:E5:F7:D7;
    host client2 {
        hardware ethernet 00:CD:BC:38:AC:45;


The deny unknown-clients; command is why only known clients are accepted.

For each client you have to adjust:

  • MAC @
  • Set a specific static IP @

Add new host

Configuration file

Edit the configuration file:

vim /etc/dhcp/dhcpd.conf

Declare new host

Add new host at the end of the file :

host myNewHost {
  hardware ethernet 00:0e:af:31:d1:cc;
  option host-name "myNewHost";

==> Don't forget to the given IP @ must match the DNS server declaration !

Take on changes

Restart the DHCP server :

/etc/init.d/isc-dhcp-server restart