Configure an ISC DHCP server

Step 1 Installation of the required package.

sudo apt update
sudo apt install isc-dhcp-server 

Step 2

According to this example, you should create bridge0 interfaces

and add lan ports to it. You can do that with Network Manager or ifupdown.

Edit the file, add the lan port on which you want the dhcp server to work...

sudo nano /etc/default/isc-dhcp-server for example eth0, enp4s0, eno1, bridge0, br0 ...


Step 2

The next file you need to modify is related to the dhcp server setup... 

sudo nano /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
# A slightly different configuration for an internal subnet.
subnet netmask {
   interface bridge0;
   option routers;
   option subnet-mask;
   option domain-name-servers;

Step 3

Starting the dhcp server and running permanently...

sudo systemctl start isc-dhcp-server
sudo systemctl enable isc-dhcp-server
sudo systemctl status isc-dhcp-server
sudo systemctl restart isc-dhcp-server

Step 4

Adding static dhcp clients:

   host pc1 {
     hardware ethernet 04:5e:f6:47:c9:29;
   host pc2 {
     hardware ethernet 04:6f:1e:57:c8:29;

Step 4

Show active dhcp clients:


You can restart your server to make everything work properly ...

sudo systemctl restart isc-dhcp-server
sudo systemctl status isc-dhcp-server