Setting up a DHCP server
DHCP is a network service that is used to assign IP addresses to hosts on a network. The settings are enabled by the server, without any control from the host. Most commonly, the DHCP server provides the IP addresses and netmasks for clients, the default gateway IP, and the DNS server’s IP address.
To install the DHCP service on Ubuntu, use the following command:
sudo apt install isc-dhcp-server
As a test system, we will use the same system on which we installed the DNS services in the previous section. After installation, we will configure two specific files. On an Ubuntu system, like ours, the default configuration will be set inside the /etc/dhcp/dhcpd.conf
file, while the interfaces will be configured inside the /
etc/default/isc-dhcp-server
file:
- We will first show you how to set up a basic local DHCP server. In this respect, we will alter the
/etc/dhcp/dhcpd.conf
file by adding the IP address pool. You can either uncomment one of...