Learn how to set up a DHCP server on an Ubuntu VM and test it inside your EVE-NG lab in this step-by-step, beginner-friendly tutorial.
In this video, you’ll learn how to:
✅ Update Ubuntu packages before installing services
✅ Install the ISC DHCP server on Ubuntu
✅ Configure a static IP for your DHCP server
✅ Set up a DHCP scope with range, gateway, and DNS
✅ Assign the correct network interface for the DHCP service
✅ Restart and verify the DHCP server status
✅ Test DHCP assignment on Cisco routers, switches, or another Ubuntu VM
✅ Perform ping tests and check DHCP logs
Perfect for networking enthusiasts, students, and lab practice inside EVE-NG.
💡 All commands used in this video:
1. Update Ubuntu Packages
sudo apt update && sudo apt upgrade -y
2. Install ISC DHCP Server
sudo apt install isc-dhcp-server -y
3. Configure Static IP (Example for ens3)
sudo nano /etc/netplan/00-installer-config.yaml
Sample content:
network:
ethernets:
ens3:
dhcp4: false
addresses: [192.168.10.1/24]
version: 2
sudo netplan apply
4. Configure DHCP Server
sudo nano /etc/dhcp/dhcpd.conf
Sample subnet configuration:
subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.50 192.168.10.150;
option routers 192.168.10.1;
option broadcast-address 192.168.10.255;
option domain-name-servers 8.8.8.8, 8.8.4.4;
}
5. Set Interface for DHCP Service
sudo nano /etc/default/isc-dhcp-server
Set:
INTERFACESv4="ens3"
6. Restart and Check Status
sudo systemctl restart isc-dhcp-server
sudo systemctl status isc-dhcp-server
7. Test DHCP on Another Ubuntu VM
sudo dhclient -v
8. Optional: Check DHCP Logs
sudo tail -f /var/log/syslog
📌 All comments and additional resources are in the Description.
Don’t forget to like, comment, and subscribe for more networking labs!