Install dnsmasq, here using pacman
sudo pacman -S dnsmasq
Add the following lines to /etc/dnsmasq.conf
interface=enp0s31f6
no-hosts
dhcp-range=192.168.0.50,192.168.0.150,12h
dhcp-range=1234::2, 1234::500, 64, 12h
dhcp-host=2c:cf:67:df:88:a5,192.168.0.60
This will enable DHCP on the interface enp0s31f6 and assign ip 192.168.0.60 to a connecting device with MAC address 2c:cf:67:df:88:a5.
Start dnsmasq.service
Add the network on the interface:
sudo ip addr add 192.168.0.1/24 dev enp0s31f6
You should see this output in journalctl when the device is assigned an IP address:
dnsmasq-dhcp[430491]: DHCPDISCOVER(enp0s31f6) 2c:cf:67:df:88:a5
dnsmasq-dhcp[430491]: DHCPOFFER(enp0s31f6) 192.168.0.60 2c:cf:67:df:88:a5
dnsmasq-dhcp[430491]: DHCPREQUEST(enp0s31f6) 192.168.0.60 2c:cf:67:df:88:a5
dnsmasq-dhcp[430491]: DHCPACK(enp0s31f6) 192.168.0.60 2c:cf:67:df:88:a5 <hostname>