DHCP Server

Dynamic Host Control protocol also known as DHCP, is a service which assigns the IP address to clients automatically.Almost every IP address that is allocated to any computer in a network is by DHCP.

DHCP is being used from 1993, before this, there were other protocols but they are obsolete now.

DHCP protocol is not only implemented in a particular organization, it is implemented everywhere on the internet as well.

DHCP handles the IP address allocating and other protocol information sharing automatically.

Also, this is a continuous process because IP addresses assigned to computers will have an expiry. Yes, this is true and this expiry for each IP address is controlled by DHCP server. This explained in detail in DORA process of DHCP server further below.

 

Why a device IP address need to be expired? Why can’t be it static?

 

DHCP-Server-1

 

Benefits of DHCP server:

• It minimizes the administrator workload.

o Like, most of the TCP/IP protocol configuration can be controlled centrally from DHCP server.

• IP address assigning and re-assigning is automated.

o For Example,

Administrator doesn't need to go to each computer and assign IP address manually

• IP Conflicts can be avoided i.e, no IP address is assigned to more than one system at a time

 

Understanding DHCP port numbers:

DHCP Port number 67and 68 are used for its operations which are UDP-based network protocol.

Port number 67 is used by DHCP server for communicating to DHCP clients and DHCP client will communicate over port number 68.

So, make sure no other services are running on these ports.

 

Notes:

There can be more than one DHCP server on a network. Why? Is it for HA?

 

DHCP IP address assigning process:

We call it as DORA process. DORA stands for Discover Offer Request Acknowledgment.

We will try to understand this process with an example.

Assume that we have a network and we are adding a new system to that network. This new system is considered as DHCP Client machine.

As the client turned on, it goes through 4 step process to get assigned with an IP address. They are,

 

DHCP-Server-2

 

Discover:

The client machine is not sure about the location of DHCP server, it broadcast the “Broadcast ID” with MAC address of the system.

 

What is broadcasting?

This gets communicated to the DHCP in the network.



Offer:The DHCP server listens broadcast request made by the client and offers a pool of IP Addresses to the Client.

 

Request:On Receiving the Pool Of IP Addresses, Client Machine Selects an IP Address and requests the DHCP Server to offer that IP.

 

Acknowledgment:server sends a confirmation about the allotment of the IP assigned to a client as an acknowledgment.

This assigned IP address also called as “lease of IP address”, will have an expiry period to it.

 

DHCP IP address renewal or reallocation process:

Now let's take a system-A which is acting as DHCP client and its IP address is getting expired and it wants to renew it.

It will contact the DHCP server about the IP address lease confirmation parameters during the reboots or at every startup.

It might get the same IP address or may be allocated with a new one. This process is same as new allocation.

Sometimes, it's also called as reallocation process.

 

DHCP server failure during IP assigning process:

Whiles getting renewed with IP address if original DHCP server fails, then it will contact other DHCP server in the network. This operation is called as re-binding.

 

Releasing IP address permanently:

When system-A is being moved to another network, IP address lease is released permanently by DHCP server.

Server updates this IP address details in its database for further usage. This process is termed as Release.