Wednesday, 22 June 2016

What is DHCP and How Does It Work?

DHCP is the most important protocol for everyone who wishes to use the Internet.

Those who need to know more about IP addresses need to know a bit about DHCP. This is because it has a direct connection with millions of IP addresses that includes the one you use.
Let us learn more about what is DHCP and how does it work.

 What is DHCP?

DHCP stands for Dynamic Host Configuration Protocol. It helps control the network configuration of a host with a remote server. This functionality of DHCP is installed by default in most operating systems. It helps one overcome the tedious manual configuration of a network on any network device or host.

 Different Messages Used by DHCP?

Have you ever given it a thought, when you connect your computer to the Internet, all the information related to IP address, subnet mask, etc. are assigned automatically? Don’t you wondered how this happens? Well, this is all due to the in-built DHCP in your operating system.

DHCP functions on the client-server model. As it is a protocol itself, it works on its related messages that are exchanged between the client and the server.

These messages include:


It is a broadcast message that begins the interaction between a client and server. It uses as its destination IP address. The source IP is


This is the message sent by the DHCP server to the DHCP client as a response to DHCPDISCOVER.


This message indicates that the client has accepted the network configuration in response to the DHCPOFFER message from the server.


The DHCP Server sends this message when it receives the DHCPREQUEST message from the client. It is the end of the process and it just about acknowledgement of the DHCP server to authorize the DHCP client to use the network configuration.


This is the message the is the opposite of DHCPACK. The DHCP server sends it when it cannot complete the DHCPREQUEST by the client.



This is the message of the DHCP client to the server in case it gets an IP address assigned is already in use.


This is the message that is sent when IP Address is statically configured on a client. With this message, only other network settings are requested to be filled dynamically by the DHCP servers.


It is a message for termination of the lease of network address provided by the DHCP server sent by the DHCP client.

How does DHCP Work?

  • A computer is connected it sends DHCPDISCOVER message from client to server.
  • The DHCP server receives the DHCPDISCOVER and it replies with DHCPOFFER message.
  • The client will now reply a DHCPREQUEST message to the DHCPOFFER sent by the DHCP server. This means the client wants to accept the configuration sent by the DHCP server.
  • After the server gets the DHCPREQUEST message from the client, it will send a DHCPPACK message to the client that indicates it can now use the IP address assigned to it.

DHCP Lease

It is important to know about the concept of lease by DHCP. When a server assigns an IP address to a client, it is given on lease. Once the lease expires, the same IP address can be assigned to another client. Suppose a PC works for 10 hours a day, it will be assigned an IP address. When the PC is shut down for the day, the IP address will be assigned to another client. Suppose the lease is about to expire, the DHCP client will try to renew the lease after half time. This process is done with the help of the DHCPREQUEST and DHCPACK messages.

This was in short about what is DHCP and how does it work. Without the DHCP protocol one will not be able to assign IP addresses to their networks automatically.

No comments:

Post a Comment