
DHCP: Dynamic host configuration protocol or Dynamic Heart configuration protocol.
Recently I was going through some Networking topics which I had studied in my college like TCP/IP, HTTP, DNS and some more. When I reached to DHCP server, I found it quite interesting. The server works in same manner as Boys' heart does.
Working of heart as a DHCP server:
Whenever a guy see a beautiful girl (IP address), he always thinks, this is the one I was searching for. His mind (the client) immediately sends a DISCOVER message to the heart (DHCP server) saying.. Is this the one? Please, tell me!
Heart being a server sends an OFFER message in reply- yes you are at right place. Go for it.
His mind which is not quite confident to approach, sends a REQUEST message again, you are right, I think, I am in love (Falling in love is very dynamic now a days). But I can't approach her (nervousness). Let it be.
His heart replies again with the final ACK (acknowledgement) - BE A MAN!!!
I think she is also interested. Go for it!!! And the heart gives him the feelings and confidence for a temporary period on lease.
As soon as the guy prepares his mind and reaches half the way, he finds the girl with a different guy having 2 cornettos in his hands.
His feelings and confidence get expires at the very moment. What left with him is the only thought, MOVE ON dude.
While moving on, if he finds a beautiful girl again, the client and server exchanges REQUEST-ACK messages again for renew of lease.
This is how the Dynamic Heart Configuration Protocol works. :P
The actual DHCP server working:
What is DHCP?
DHCP stands for Dynamic Host Configuration Protocol.
As the name suggests, DHCP is used to control the network configuration of a host through a remote server. DHCP is an excellent alternative to the time-consuming manual configuration of network settings on a host or a network device.
How DHCP Works?
Here are the steps :
Step 1: When the client computer (or device) boots up or is connected to a network, a DHCPDISCOVER message is sent from the client to the server. The client enters the initializing stage during this step.
Step 2: When the DHCP server receives the DHCPDISCOVER request message then it replies with a DHCPOFFER message. The client enters selecting stage during this step.
Step 3: The client forms a DHCPREQUEST message in reply to DHCPOFFER message and sends it to the server indicating it wants to accept the network configuration sent in the DHCPOFFER message. The client enters requesting stage during this step.
Step 4: Once the server receives DHCPREQUEST from the client, it sends the DHCPACK message indicating that now the client is allowed to use the IP address assigned to it. The client enters the bound state during this step.
The Concept of Lease
With all the necessary information on how DHCP works, one should also know that the IP address assigned by DHCP server to DHCP client is on a lease. After the lease expires, the DHCP server is free to assign the same IP address to any other host or device requesting for the same. The DHCP client tries to renew the lease after half of the lease time has expired. This is done by the exchange of DHCPREQUEST and DHCPACK messages. While doing all this, the client enters the renewing stage.
NOTE: The DHCP server is better than the heart, it actually provides IP address and bind it to the client for a particular time but the heart only provide feelings. :P :-)