Linux Ubuntu Server DHCP
Table of Contents
2. Install
-
Update package index and Install
sudo apt update -y && sudo apt install isc-dhcp-server -y
3. Configure
-
Assign the network interface that DHCP should run on
-
Edit file
sudo vi /etc/default/isc-dhcp-server -
Update contents for the
INTERFACESv4itemExample where the network interface iseno1INTERFACESv4="eno1"
-
-
Edit config file
dhcp.conf-
Edit file
sudo vi /etc/dhcp/dhcpd.conf -
Update contents
Sample contents# https://help.ubuntu.com/community/isc-dhcp-server # default-lease-time 600; max-lease-time 7200; subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.3 192.168.1.250; option routers 192.168.1.1; option domain-name-servers 192.168.1.2,8.8.8.8; option domain-name "xackleystudio.local"; } host p-ubuntu-norco { hardware ethernet 0c:c4:7a:7d:4d:74; # Device eno3 fixed-address 192.168.1.3; # The desired static IP address } host p-ubuntu-nas { hardware ethernet 00:25:22:f8:3e:af; # Replace with the device's MAC address fixed-address 192.168.1.10; # The desired static IP address } -
Check file for errors
/usr/sbin/dhcpd -t
-