In our last episode we talked about setting up a DHCP server on Debian. It was harder than we thought it would be. This episode is round 2. This was a totally different experience. We were done in a matter of minutes. Dorothy and I talk about the differences between round 1 and 2. We now have a process we can use for installing and configuring future services. This was a great learning experience for both of us.
What follows are our instructions that we created in round 2. The steps may change in the future, but this is a good start.
INSTRUCTIONS
* Official Ubuntu Documentation – We followed these instructions.
* How to install a DHCP Server in Ubuntu and Debian – For some reason we didn’t use this
* Install DHCP: apt install isc-dhcp-server
* Edit isc-dhcp-server file & add the appropriate interface: INTERFACESv4=“enp0s3”
* Make back up copy of dhcpd.conf file
* Edit dhcpd.conf to match the following configuration:
# minimal sample /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
subnet 10.500.5.0 netmask 255.255.255.0 {
range 10.500.5.100 10.500.5.200;
option routers 10.500.5.1;
option domain-name-servers 10.500.1.2;
option domain-name "example.lan";
}
Testing
* Restart the service: systemctl restart isc-dhcp-server.service
* Check /var/log/syslog for failures: tail syslog
* Check DHCP is working by plugging a device into the network and wait for it to ask for IP address: tail -f syslog
This is what it’s suppose to look like when it works:
Jan 30 20:16:15 debian dhcpd[1397]: DHCPDISCOVER from 55:ee:75:50:88:ec via enp0s3
Jan 30 20:16:16 debian dhcpd[1397]: DHCPOFFER on 10.500.5.100 to 55:ee:75:50:88:ec (DESKTOP-O40EC06) via enp0s3
Jan 30 20:16:16 debian dhcpd[1397]: DHCPREQUEST for 10.500.5.100 (10.500.5.6) from 55:ee:75:50:88:ec (DESKTOP-O40EC06) via enp0s3
Jan 30 20:16:16 debian dhcpd[1397]: DHCPACK on 10.500.5.100 to 55:ee:75:50:88:ec (DESKTOP-O40EC06) via enp0s3