Updated August 19, 2023
Understanding DHCP (Dynamic Host Configuration Protocol)
DHCP stands for Dynamic Host Configuration Protocol. It is a network management protocol present in the application layer. With its help, an Internet Protocol IP address can be assigned to any device or node on a network dynamically so that they can communicate using this IP. Network administrators’ task is to a lot of IP addresses manually to all the devices in the network. However, in this, the task is automated and managed centrally rather than manually. Both the small local networks and the large enterprise networks implement it. The basic goal of it is to assign a unique IP address to hosts.
It also provides other network addresses such as –
- Subnet Mask
- Router Address
- DNS Address
- Vendor Class Identifier
It comes in two different ways, i.e. it comes as a client and as a server.
History of DHCP
It is an extended version of BOOTP, more popularly known as Bootstrap Protocol, a network IP management protocol from 1985. The DHCP servers are capable enough to handle requests from the BOOTP clients if these clients are present in a network. Not only this, the DHCP is more advanced when compared to BOOTP.
How does it work?
When acting as a server, the DHCP server automatically assigns unique IP addresses alongside configuring other information of the network. In small businesses or homes, the DHCP server is none other than the router. However, in large networks, the DHCP server can be a single computer.
A very brief summary of what happens in the process is –
- The client sends a request for an IP address from the host. The client can be any device sending the request, and the host can be a router.
- The host will look for an available IP address and assign it to the client.
- Using this IP address, the client will be able to communicate on the network.
Let us now look at this process in more detail. The steps mentioned below gives an in-depth view of it –
- The request sent by a device that is connected to a network with a DHCP server is called a DHCPDISCOVER request.
- This request is sent to the DHCP server in the form of a packet named DISCOVER. As soon as the DHCP server receives this packet, the server looks for an IP address for the device’s use. Once found, the server responds by sending a packet to the client called DHCPOFFER.
- The device or the client now has to respond to the server with a packet named DHCPREQUEST packet in acceptance of the chosen IP address. To this packet, the server sends an acknowledgment (ACK) to confirm back that the device can now use that specific IP address. It also states the validity of the particular IP address so that the device knows exactly when it has to get a new IP address.
- In cases where the server does not want the device to have the given IP address, it will not acknowledge the device’s request by sending a NAC.
Although the steps mentioned seem to be very time-consuming, these happen so quickly practically then one would not even realize. There is, of course, no need to have technical details of the process, and you can still get an IP address from the DHCP server just by reading.
How does it make Working so Easy?
A DHCP server has a pool of addresses for a device to get a valid network connection. It basically gives the scope, or range, of IP addresses within which the devices receive their address.
The second reason for the usefulness of DHCP is that many devices can connect to a network for a specified period of time, even without the need for any pool of available addresses. For example, consider 20 addresses defined by the DHCP server; 40, 80, 100 (or even more) devices can connect to the network as long as not more than 20 are using one of the available IP addresses simultaneously.
The commands like ipconfig will return the different IP addresses of your computer over time while using it as these addresses are provided to your computer network for a specified duration, also called a lease period. It is not necessary that the device with a manually assigned IP address cannot co-exist on the same network with the devices receiving their IP address dynamically. The manually assigned IP addresses are also called static IP addresses.
Advantages and Disadvantages of DHCP
Given below are some of the advantages and disadvantages:
Advantages:
It has many benefits because of which it is very popular.
- One can add new clients very easily to a network.
- The IP addresses are managed centrally by the DHCP.
- The IP addresses can be reused, thus minimizing the requirement of the total number of IP addresses.
- The ease at which the IP address space present on the DHCP server can be reconfigured without the need for individually reconfiguring clients.
- The network administrator can configure a network from a centralized area using a DHCP protocol method.
Disadvantage:
- While assigning the IP addresses to different hosts, sometimes, conflicts in the IP addresses might occur.
Conclusion
The Dynamic Host Configuration Protocol is a crucial and critical network service that is a must-have as using It will help you as a System Administrator or a Network Administrator to deal with the clients by assigning tracking and re-assigning IP. Leaving the management besides, in case of any problems, you just need to stay connected to your server and verify the settings rather than running between your clients.
Recommended Articles
This has been a guide to What is DHCP?. Here we have discussed the understanding of DHCP, how it works, along with the advantages and disadvantage. You may also have a look at the following articles to learn more –