Linux DHCP Server: Installation and Configuration (Complete Guide 2026)
🌐 SUMMARY: The DHCP (Dynamic Host Configuration Protocol) is essential for automating IP address assignment on a Linux network. Discover how to install and configure a robust DHCP server on Debian, Ubuntu, or CentOS.
Installing a DHCP server simplifies the management of your IT infrastructure by avoiding IP address conflicts and tedious manual configurations.
1. DHCP Server Installation
On Debian/Ubuntu-based distributions, we use the isc-dhcp-server package.
sudo apt update && sudo apt install isc-dhcp-server
Fluke 323 True RMS Clamp Meter (400A AC)
🛠️ The essential tool for this project.
2. Network Interface Configuration
Edit the /etc/default/isc-dhcp-server file to specify the interface the server should listen on (e.g., eth0 or enp0s3).
INTERFACESv4="eth0"
3. Configuring the dhcpd.conf File
This is where you define your address range (pool). Edit /etc/dhcp/dhcpd.conf:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.150;
option routers 192.168.1.1;
option domain-name-servers 8.8.8.8, 8.8.4.4;
default-lease-time 600;
max-lease-time 7200;
}
💡 TIP: To set a static IP address for a specific machine (reservation), use its MAC address in a
host section.
Once configured, don’t forget to secure your infrastructure, for example by following our guide on global IT security.
