Understanding DHCP or Dynamic Host Configuration Protocol
DHCP stands for Dynamic Host Configuration Protocol. It is a network management protocol present in the application layer. With the help of it, an Internet Protocol IP address can be assigned to any device, or node, on a network dynamically such that they can communicate using this IP. The task of network administrators 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 which is also a network IP management protocol from 1985. The DHCP servers are capable enough to handle requests from the BOOTP clients in case 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 is used to assign unique IP addresses alongside configuring other information of the network automatically. 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 now. The steps mentioned below gives an in-depth view of it –
4.6 (3,144 ratings)
View Course
- 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 this packet is received by the DHCP server, 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 back 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 request of the device by sending a NAC
Although the steps mentioned seems to be very time taking but 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 there address.
The second reason for the usefulness of DHCP is because of the fact that many devices can connect to a network for a specified period of time even without the need of any pool of addresses that are available. For example, consider 20 addresses are defined by the DHCP server, 40, 80, 100 (or even more) devices is capable of connecting to the network as long as not more than 20 are using one of the available IP address 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 a static IP address.
Advantages and Disadvantages of DHCP
The Advantages and disadvantages of DHCP are as follows.
Advantages
It has many benefits because of which it is very popular. Few of the advantages of using it are mentioned below:
- 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 method provided by the DHCP protocol.
Disadvantages
Just like every coin has its pros and cons there are disadvantages of using DHCP which are mentioned below:
- While assigning the IP addresses to different hosts sometimes, conflicts in the IP addresses might occur.
Conclusion
The Dynamic Host Configuration Protocol is a very crucial and critical network service that is a must have as using It will help you as a System Administrator or a Network Administrator in order 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 to 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 Disadvantages. You may also have a look at the following articles to learn more –