Linux: Ubuntu 18.04 DHCP Server

Linux: Ubuntu 18.04 DHCP Server

- 2 mins

INTRODUCTION

Ever wonder how to setup a DHCP server on a Linux? It’s quite easy. Most people tend to do this on a Windows. However, if you want to make Linux your one-stop-shop for IP address management, continue reading.

In this example, I go through the process of setting up DHCP on Ubuntu Server 18.04 in my VMWare Fusion home lab.

WHAT IS DHCP?

Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to automate the process of configuring devices on IP networks, thus allowing them to use network services such as DNS, NTP, and any communication protocol based on UDP or TCP. A DHCP server dynamically assigns an IP address and other network configuration parameters to each device on a network so they can communicate with other IP networks.

REQUIREMENTS

  1. Lab environronment & a running instance of Ubuntu 18.04.

DEPLOYMENT PROCESS OVERVIEW

  1. Install DHCP Server
  2. Configure DHCP Server
  3. Restart the DHCP server.
  4. Verify configurations

TIME TO IMPLEMENT: 10 minutes

INSTALL THE DHCP SERVER

  1. First, run the following command to make sure everything is up to date.
  2. sudo apt-get update
  3. Now, run the following command to install the DHCP server
  4. sudo apt-get install isc-dhcp-server -y

CONFIGURE THE DHCP SERVER

  1. Now, configuring the DHCP server by issuing the following command:
  2. sudo nano /etc/dhcp/dhcpd.conf
  3. In dhcpd configuration file, you need to specify a couple of things to get up and running. See screenshot below
  4. createVNET

  5. Uncomment out (remove the # character) the following line:
  6. #authoritative;

    credentials

  7. Scroll to the end of the dhcpd configuration file and be sure to adjust accordingly to fit your networking needs:
  8. credentials

  9. Save and close dhcpd.conf file.

RESTART THE DHCP SERVER

  1. Restart the DHCP server with the following command:
  2. sudo systemctl restart isc-dhcp-server.service

VERIFY CONFIGURATIONS

  1. To list out any address that have been handed out by you Linux DHCP server, issue the following command:
  2. dhcp-lease-list

SUMMARY

  1. The setup is straight forward and isn't a time drain.
  2. The linux CLI is swift and can be a lot easier to manage than navigating the Windows gui.
  3. Linux is extremely leightweight when compared to Windows (for instance, Linux doesn't require a lot of RAM) so having this option is very convenient.
comments powered by Disqus
rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora