How to set up a DHCP server with Ubuntu server 18.04


Buy Organic Traffic | Cheap Organic Traffic | Increase Organic Traffic | Organic Traffic

Picture: Jack Wallen

Each community admin is aware of what DHCP is. Merely put, it is a technique of handing out dynamically-assigned IP addresses to consumer machines. Most directors are likely to defer the dolling out of these dynamic addresses to a Home windows server machine or a provider-deployed router or different items of . However what if you wish to make Linux your one-stop-shop for IP addresses in your community? Imagine it or not, it is truly fairly straightforward.

I’ll stroll by way of the method of establishing DHCP on Ubuntu Server 18.04. The method is sort of easy, so it should not take a lot time in any respect (about 5 minutes).

SEE: Server deployment/migration guidelines (Tech Professional Analysis)

What you want

The one belongings you want for this are a working occasion of Ubuntu Server 18.04 and a person account with sudo privileges. That is it. Let’s work.

Putting in the DHCP server

The very first thing to do is instal the dhcpd Server. Log into your Ubuntu Server and problem the next command:

sudo apt-get set up isc-dhcp-server -y

The above command will decide up the entire needed dependencies and full the set up with out error.

Configuring the DHCP server

Subsequent, the DHCP server have to be configured. Challenge the command:

sudo nano /and so on/dhcp/dhcpd.conf

In that file, that you must modify (to suit your networking wants) just a few strains.

Specify the area identify with the next line:

choice domain-name "";

Specify the nameserver’s hostname or IP handle with the next line:

choice domain-name-servers,;

Specify the default lease instances with the next two strains:

default-lease-time 3600;
max-lease-time 7200;

Uncomment out (take away the # character) the next line:


Subsequent, scroll to the top of the file and add the next (ensuring to switch it to suit your networking wants):

# Specify the community handle and subnet-mask
  subnet netmask 

Save and shut that file.

Restart the DHCP server with the command:

sudo systemctl restart isc-dhcp-server.service

At this level, any shoppers in your community will decide up a DHCP handle from this newly configured server. For those who had DHCP addresses distributed by one other supply, you may need to shut down that supply, in any other case you would wind up with a battle in your community.

Lease addresses

If you wish to discover out what IP addresses have been given out by the server, problem the command:


The above command will listing out all addresses which have been handed out (Determine A).

Figure AFigure A

Determine A: Just one handle has been handed out upon restarting the DHCP server.

Congratulations, you now have a DHCP server up and working. It is a nice technique to management what addresses are handed out to your community.

Additionally see

Buy Website Traffic | Cheap Website Traffic | Increase Website Traffic | Website Traffic

Source link