What is DHCP (Dynamic Host Configuration Protocol) Server?


DHCP-Dynamic Host Configuration Protocol is a networking protocol and work on a client-server model. For example, suppose we have some computers in our environment and are connected with the help of a switch, but for the purpose of communication we need to configure the IP addresses on them. 

Now at this point, IP addressing configuration can be performed either manually (Need to go on every PC and enter the IP address in TCP/IP properties ) or Automatically(DHCP). But when you have a number of computers in hundreds then manual configuration is very hard and risks of mistakes as well. 
When we configure the DHCP server in our environment then it will provide the IP address to all hosts of the network automatically, which means the purpose of DHCP is to allocate the IP address to network hosts so that they can communicate on an IP network and make administration easy. Always DHCP is not in the form of a computer, its simplest example is the ADSL router from which we get access to the Internet in our offices or homes. 

ADSL router receives the static public IP address from service provider means Service provider's router provides an IP address to this ADSL router so that it can communicate to the other hosts of the internet (external and internal). NAT/PAT is also configured on this ADSL router. In a big environment this responsibility can be allocated to any computer and also Routers can also perform the DHCP role.


Working Of DHCP and DORA Process


As we know that DHCP is work on a client-server model in which there is one server and others are hosts. DHCP uses port no 67&68 of UDP and on the p-67 DHCP server provides its services and clients listen on P-68. For working, DHCP uses the DORA process, which is composed of 4 characters such as D= Discover, O=Offer, R=Request, A=Acknowledgment, by using these four characters DHCP completes its IP address allocation process. 

For a proper understanding of the DORA process suppose we have an environment in which we have a DHCP server that is providing IP addresses to the clients and clients who are communicating on behalf of these IP addresses. When a new computer is installed in the network and in its TCP/IP properties we have selected the Automatic configuration of IP then this computer sends a message in the network, this message is called Discover message.

This message broadcast in whole network and in this message source port number is UDP port no 68 and destination is UDP port no 67 and this message reached to the all devices in the network but in this message destination is port number 67 then only the DHCP servers present in the network respond to this message. 

The DHCP server of the network sends a new message in response to this message which is called Offer message and this message is also broadcast and reach to the all devices but all other devices already have IP addresses and it is only accepted by the client who does not have an IP address and additionally in the message the Mac address of the IP requesting client is also included in this message and only this client accepts this message. 

In this message, the DHCP server offers an IP address to the client  and tells that this particular IP address can be allocated to you and in response, if there is no any problem meanwhile the this client again generate a new message, which is called Request message and in this message the new client requests to the server that allocates me the same IP address that you offered me, this message is also a broadcast message but due to the port number it is received only by the DHCP server and in response DHCP server generates a new broadcast message which is called Acknowledgement message but due to the Mac address included in this message is only received by the new client. 

After this an IP address is assigned to the new client and DHCP enter in its database that this IP is assigned to this particular client. All the messages are broadcast because the new PC yet do not have any IP so that unicast is not possible so to communicate this new PC broadcast procedure is followed and secondly at the end suppose if there are more than one DHCP servers in a network, then with this broadcast message the know that this particular IP has been assigned to this particular device  so that our network work in a smooth way. 

DHCP Scope in Windows Server 2012


Suppose we have installed the DHCP server in our network, now if we wish that it can provide the IP addresses to the devices then we need to perform configuration on it so for that purpose, the first thing that we need to do is its DHCP scope means we need to configure such a settings that it can provide the IP addresses to the clients.

DHCP scope is composed of some settings such as first we need to configure the range of IP addresses means the range from which this server will provide the IP address to the clients, so we need to configure the start IP address and End IP address and secondly we need to configure the network or subnet mask with these two configurations the network clients start communicating with each other.

Third configuring is the configuration of the Default Gateway/Router address, the fourth configuration is the configuration of the DNS IP address. Another important setting is the Domain name setting, if you want that to all your client's domain name is configured automatically then we can also configure domain name in our scope. One more option is lease duration which is the time duration for which the DHCP server provides the IP to the clients by default it is for 8 days.

-     Exclusion range is such a range of IP addresses from which the IP addresses are not allocated to the clients even it is the part of the IP addresses range that is specified in the DHCP scope. suppose in our network with clients there are some other servers are present such as web server, file server for which you do not want to allocate the IP addresses to the other clients that have been allocated to these servers so for this purpose we can configure the exclusion range in our scope and can reduce the chance of conflict.

Post a Comment

0 Comments