How to install a DHCP Server in Ubuntu:

How to install a DHCP Server in Ubuntu:

Use these commands and steps in sequence:

# Make sure you have an IP address.

# If not, please assign an IP address (you can use netplan)

# see the next section how to assign an IP address.

sudo apt update && sudo apt upgrade -y

sudo apt install isc-dhcp-server -y

# go to this file and mention which network interface will be used by the DHCP server

sudo nano /etc/default/isc-dhcp-server

# Configure your DHCP Server

sudo nano /etc/dhcp/dhcpd.conf

#Step 5: Restart and enable service

sudo systemctl restart isc-dhcp-server

sudo systemctl enable isc-dhcp-server

# Check status of the DHCP Server:

systemctl status isc-dhcp-server

How to assign a Static IP address to an Ubuntu Box

sudo nano /etc/netplan/02-network-manager.yaml

The file name can be different

#Run:

sudo netplan apply

Leave a Reply