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.
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.
There can be more than one DHCP server on a network. Why? Is it for HA?
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,
The client machine is not sure about the location of DHCP server, it broadcast the “Broadcast ID” with MAC address of the system.
This gets communicated to the DHCP in the network.
Offer: The DHCP server listens to 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.
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.
Whiles getting renewed with IP address if original DHCP server fails, then it will contact another DHCP server in the network. This operation is called as re-binding.
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.