To set up an ISC DHCP server on Ubuntu/Debian Linux, follow these steps:
- Install the ISC DHCP server package:
sudo apt-get update
sudo apt-get install isc-dhcp-server
- Configure the DHCP server:
sudo nano /etc/dhcp/dhcpd.conf
- Add the following configuration options to the file:
subnet <subnet_network> netmask <subnet_mask> {
range <start_ip> <end_ip>;
option routers <router_ip>;
option broadcast-address <broadcast_ip>;
option domain-name-servers <dns_server_ip>;
}
- Replace the placeholders
<subnet_network>
,<subnet_mask>
,<start_ip>
,<end_ip>
,<router_ip>
,<broadcast_ip>
, and<dns_server_ip>
with your own network configuration. - Restart the DHCP server:
sudo systemctl restart isc-dhcp-server
- Verify that the DHCP server is functioning properly by checking the system logs:
sudo tail /var/log/syslog
That’s it! Your ISC DHCP server is now set up and ready to serve IP addresses to clients on your network.