How to Setup DHCP Server on Ubuntu VPS (with Pictures)
Edit Article

  • 1 Editor

Dynamic Host Configuration Protocol or DHCP is a protocol that facility the allocation of IP address clicking on a network. DHCP Server is a server that works to provide the IP address dynamically on a client. So that in a network, the administrators do not need to configure the IP address to each client manually. Admin only needs to configure the DHCP server, the client will automatically get the IP address if dynamic configuration on the client. It eases admin in allocating IP address per client.

Well, to configure the DHCP server we need to install it first as in this tutorial I will discuss How to Setup a DHCP server in ubuntu 14.04. But before that follow to install the following.

Step One: Install the required package, namely ISC-dhcp-server on VM 1 (Proxy), with this command

  1. Apt-get update
  2. Apt-get install ISC-dhcp-server

Step Two: We entered in the configuration, now select the interface that is used as a DHCP server by changing the "/ etc / default / ISC-DHCP-server" on the VM 1 (Proxy).


Step Three: Search INTERFACE = "" enter into INTERFACE = "eth0" adjust to the interface you want to use as a DHCP server. Then Save.

Step Four: Change the setting dhcpd.conf on VM1 (Proxy) with the following command.


Step Five: Looking like this.

remove the pound sign (#) in front of the authoritative word.


Step Six: Add a new line at the bottom with the following script.


Step Seven: Fill in the IP on eth0 is the interface used as a DHCP server and eth1 as a router and a gateway to a host that can connect to the internet. Fill IP based subnet in dhcpd.conf earlier. with the following command.


Fill in the following script and then restart the service:


Step Eight: Configuring DHCP Client 1. Open the "/ etc / network / interfaces" on each client.


Enter the following code.


Step Nine: Restart the service. DHCP Server Configuration Done, Done! To check ip can enter ifconfig. Test the connection to the internet.

In the process DHCP (Client and Server) recognizes 4 Process, namely:

  1. Request Least IP / DHCP DISCOVER: DHCP client will spread the requested broadcast / complete to find the DHCP server enabled. Request here is the IP requests and information other TCP / IP.
  2. Least Offer IP / DHCP OFFER: After the DHCP Server active receives a request from a DHCP Client, DHCP server then offers IP and information other TCP / IP to the DHCP Client requesting.
  3. IP Lease Selection / DHCP REQUEST: DHCP Client receives at once agreed bid by the DHCP server to send messages to the DHCP server and the IP lease information other TCP / IP is available in the DHCP Pool.
  4. Lease IP Acknowledge / DHCPACK: The DHCP server will respond to requests from DHCP Client by sending an acknowledgment packet. Then, after the DHCP server assign IP configuration and other TCP / IP to Client, Server update his database basis. The client then initializes the binding configuration has been received previously and the client can work on any network client can initiate communication network.

The above steps (4 stages) only applies to the new client into the network, or the first time asked for an IP to the DHCP Server. If the client had previously been requested IP to the same DHCP server, a process that occurs only process 3 and 4.

DHCP is a stand-alone, so if in a network there is more than one DHCP server, database IP address of a DHCP server DHCP will not be replicated to other servers. In this case, the second client will not get the same IP as the IP protocol does not allow two hosts have the same address. * NOTE: The address of the DHCP server must be Static (Fixed)

Well, here are the advantages of a DHCP server:

  • Facilitate the transfer of data to another client PC or server PC.
  • DHCP server optimizes network services to large and requires a TCP / IP configuration is complex.
  • Because it features the DHCP Lease, IP is not used / has been used before, can be used by another client
  • Because the process is automatic, administrators who need to configure the beginning. This of course saves time.

DHCP Server is a device in the service provision of IP and Information TCP / IP Other automatically to the client who requested it. DHCP Client is a device that is running the DHCP Client software so that they can connect to the DHCP server in order to ask for information of IP and TCP / IP Other.

This is some of the terms related to the DHCP server for us to know that we also know what the advantage we can get.

  • DHCP Scope: It is IP range that can be leased by the DHCP server to the client. IP range can be set by the administrator through the configuration of the DHCP server. Information on the Scope DHCP and IP address that has been leased is then stored in the database DHCP in the DHCP server. IP address which will be leased will be taken from the DHCP Pool has been allocated previously. The most common error in the configuration of the DHCP Server is an error in the configuration of the DHCP Scope.
  • DHCP Lease: It is IP address lease deadline given to DHCP clients by the DHCP server. Generally, it can be configured by the administrator by using some of the equipment and must be adjusted to the needs of the network.
  • DHCP Options: It is additional setting the IP address assigned by the DHCP Server to Client. Generally, the DHCP server sends an IP and subnet network to the client. However, the DHCP Options, DHCP Server can provide additional configuration previously set by the administrator. DHCP Options can be applied to all clients, certain DHCP Scope, or to a host in the network.

Now if you start thinking of using a DHCP server and get the ease? DHCP is installed on ubuntu and provide automatic IP course is the choice of anyone. I will continue to share this exciting things to you, but if anyone wants questionable, stay connected with our website. We will help get the the best solution for you in trying tutorial above.

Article Tools

Did this article help you?


an Author!

Write an Article