What is DHCP (Dynamic Host Configuration Protocol) | How DHCP works

What is DHCP (Dynamic Host Configuration Protocol)

DHCP stands for Dynamic Host Configuration Protocol and its main goal is to provide an IP Address to the available host in the computer network. With IP Address, it also provides other network address such as subnet mask, default gateway, DNS Address, etc. This is the basic feature of DHCP Protocol and every one is aware of it, right. But the question is, How DHCP works step by step, how it provides IP Address to the host in a network. I am going to explain everything in this post.

what is dhcp and how it works step by step

DHCP Port Number

Basically, there is two port number of DHCP 67 and 68. Where, 67 port number is reserved for the DHCP server and 68 port number is reserved for the DHCP host. Now, the question is why DHCP protocol uses two port number instead of one.

Let’s take an example, there are 10 computers connected in a network. Out of 10 computers. one is the server and all the remaining PCs are the host. So how your network will identify, out of this 10 PCs which one is a server and which are hosts. It can be easily identified with the help of port number. Your network is going to check the port number and identify the PC assigned with the port 67 is the server and all the PCs assigned with the port number 68 are the host.

How DHCP works step by step

  1. All the devices connected to the DHCP Server, are going to send a request to the server. Saying that I need an IP Address.
  2. Once the server receives a request, it is going to check the MAC address of requested PC and generate a unique IP Address (e.g. 10.0.0.1) and send.dynamic host configuration protocol
  3. Once the PC received this address, it is going to send a confirmation message to the DHCP server. Saying that I have received the address successfully.
  4. Now, your DHCP Server is going to save the IP Address (10.0.0.1) for this MAC Address for a leased period of time. this is dynamic IP Address and it is not permanent.
  5. Before, the leased time of IP Address expired, the PC will send a renew signal saying that I am still available in a network. So, please renew my address. Like this, your DHCP server understands the requested PC is still available in a network and it will renew the same IP address.
  6. As for example, if a device with the IP Address 10.0.0.2 gets disconnected from the server it cannot send a renew signal, right. Like this, your server understands this PC is currently not available in a network and remove the particular IP Address (10.0.0.2) from its MAC Address Table.how dhcp works step by step
  7. Now, next time if any new device gets connected to the network it can provide the same IP Address (10.0.0.2). Like this, your DHCP server prevents from wastage of IP Address.what is dhcp in networking

What is DHCP and How it works step by step| Video Tutorial

What is DHCP (Dynamic Host Configuration Protocol) in Computer Network | DHCP Features & How it work

DHCP Important Notes:

  • DHCP Scope allows you to create multiple groups of IP Address which you can assign to a particular network.
  • Devices such as the router, network printer, etc need a permanent IP Address which should not be changed or expire. Using DHCP Server, you can also set a permanent IP Address with the help of address reservation feature.
  • DHCP Server is not only a PC. it could be could be router or smartphone or any device which can provide IP Address automatically to the devices. As for example, the time you are sharing a mobile data with the help of hotspot feature. your smartphone is going to provide IP Address to all the connected device and act as a DHCP server.

 

Leave a Reply