What is DHCP
Network equipment is really important nowadays. For having a strong network, the network products update and the big companies try to produce their products in new ability and features.
We’ve talked about some features and protocols such as PoE, VLAN, QoS, SNMP and more but in this article, we are going to explain about DHCP protocol. If you have business and need to manage the network of your organization, this post will be for you. Follow us for knowing about DHCP protocol.
What is DHCP:
DHCP is short form of Dynamic Host Configuration Protocol. It is a network management protocol used to dynamically assign an IP address to any device or node on a network that can communicate using IP. DHCP protocol manages these configurations rather than requiring network administrators to manually assign IP addresses to all network devices. DHCP can be implemented on small local network as well as large enterprise network.
When devices are moved from place to place, DHCP assigns new IP addresses in every location. That means network administrators do not have to manually configure every device with a valid IP address or reconfigure the device with a new IP address if it moves to a new location on the network.

How does DHCP work:
DHCP runs at the application layer of the TCP/IP stack. It dynamically assigns IP addresses to DHCP clients and allocates TCP/IP configuration information to DHCP clients. This information includes subnet mask information, default gateway IP addresses and domain name system (DNS) addresses.
DHCP is a client-server protocol in which servers manage a pool of unique IP addresses, as well as information about client configuration parameters. The servers then assign addresses out of those address pools. DHCP-enabled clients send a request to the DHCP server whenever they connect to a network.
Clients configured with DHCP broadcast a request to the DHCP server and request network configuration information for the local network to which they’re attached. A client typically broadcasts a query for this information immediately after booting up.
The DHCP server responds to the client request by providing IP configuration information previously specified by a network administrator. This includes a specific IP address as well as a time period for which the allocation is valid.
DHCP protocol manages a record of all IP addresses. This protocol allocates to network nodes. If a node is relocated in the network, the server identifies it using its media access control that called it MAC address.
MAC address prevents the accidental configuration of multiple devices with the same IP address. Configuration of DHCP server needs the creation of configuration file that which stores network information for clients. DHCP is not a routable protocol, nor is it a secure one.
DHCP is limited to a specific local area network, which means a single DHCP server per LAN is adequate or two servers for use in case of a failover. Larger network might have a wide area network that contains multiple individual locations. Depending on the connections between these points and the number of clients in each location, multiple DHCP servers can be set up to handle the distribution of addresses.
If network administrators want a DHCP server to provide addressing to multiple subnets on a given network, they must configure DHCP relay services located on interconnecting routers that DHCP requests have to cross. These agents relay messages between DHCP clients and servers located on different subnets.
DHCP lacks any built-in mechanism that enables clients and servers to authenticate each other. Both are vulnerable to deception — one computer pretending to be another — and to attack, where rogue clients can exhaust a DHCP server’s IP address pool.
When managing many DHCP servers or DHCP servers in a WAN, users can work with a command line. Users should also be aware that starting, stopping and restarting affects the running of the daemon.

Why do we use DHCP:
You might not know the DHCP protocol, but we guarantee that if you use computers, it has already made your life a whole lot easier. For computers to work over any network, each one will need its own unique IP address. Without an IP address, data and communications can’t be routed accurately and the wrong traffic could end up in the wrong place.
That’s why a prerequisite for connecting to the network is a machine having a unique IP. Of course, we could assign IP addresses manually to each machine, which would be fine for a home network, but in a business environment with hundreds or even thousands of endpoints, this could get confusing fast.
Instead of this huge manual effort, DHCP works behind the scenes as a protocol that automatically assigns IP addresses. This is done using a DHCP server, found either on a router, or on a server in enterprise environments. As soon as you turn on your computer, four steps kick into action.
Read more: What is IP Address and its uses
Four Steps of DHCP:
There are four discrete steps in the DHCP process, all of which happen behind the scenes without you or your user even noticing. The process uses a traditional client-server architecture, where the DHCP server can be both the client and the server. It uses UDP ports for this, with the client using port 68 and the server using port 67.
Here are the four steps in more detail:
- Step 1- DHCP discover: Your computer turns on, and it needs an IP address to connect to the network. It immediately begins looking for a DHCP server.
- Step 2- DHCP offer: It’s found the server, and the server makes an offer of an IP address to the computer or host.
- Step 3- DHCP request: The host will now accept the offer from the DHCP server. If it is offered more than one, it’s a case of first come, first accepted.
- Step 4- DHCP acknowledgement: Transaction complete. The DHCP server sends the IP address, alongside the other parameters, such as the subnet mask and DNS server to the host.

components of DHCP:
this protocol includes three main parts: DHCP server, Client and relay. We explain about every part of them in continue:
- DHCP Server: DHCP server usually a server or router that run on the DHCP service. The DHCP server holds IP addresses, as well as related information pertaining to configuration.
- Client: this is a device such as a computer or phone that connects to a network and communicates with a DHCP server.
- Relay: this part manages requests between DHCP client and servers. Typically, relays are used when an organization has to handle large or complex networks.
Other components include IP address pool, subnet, lease and DHCP communications protocol.
Read more: What is SNMP
Pros and cons of DHCP:
DHCP protocol makes it easier for network administrators to add or move devices within a network, whether it be a LAN or WAN. But DHCP is not inherently secure and if malicious actors access the DHCP server, they can wreak havoc. Also, if the DHCP server does not have a backup and the server fails, so do the devices served by it.
- DHCP security:
One of the key vulnerabilities of DHCP has been the use of so-called man in the middle (MitM) attacks, in which an attacker secretly intercepts and relays messages between two parties who believe they are communicating directly with each other.
DHCP servers have also been the subject of multiple memory corruption vulnerabilities. In these, attackers have targeted the Windows DHCP Server service. When successful, the attacks can lead to a full compromise of Microsoft Active Directory (AD). One such vulnerability, patched by Microsoft, was the Common Vulnerabilities and Exposures (CVE)-2019-0725 Windows DHCP Server Remote Code Execution (RCE) Vulnerability.
- History of DHCP:
DHCP is an extension of a 1985 network IP management protocol, Bootstrap Protocol (BOOTP). DHCP is more advanced, and DHCP servers can handle BOOTP client requests if any BOOTP clients exist on a network segment.
Using one central BOOTP server to serve hosts on many IP subnets, BOOTP introduced the concept of a relay agent that enabled BOOTP packets to be forwarded across networks. BOOTP required a manual process to add configuration information for each client, however, and did not provide a mechanism for reclaiming IP addresses no longer in use.
If we want to focus on DHCP benefits, let’s think about all the great aspect of DHCP and why this protocol could be helpful for IT professionals.
- Reliable IP address configuration: DHCP minimizes configuration errors caused by manual IP address configuration, such as typographical errors, or address conflicts caused by the assignment of an IP address to more than one computer at the same time.
- Reduced network administration: DHCP includes the following features to reduce network administration:
-Centralized and automated TCP/IP configuration.
-The ability to define TCP/IP configurations from a central location.
-The ability to assign a full range of additional TCP/IP configuration values by means of DHCP options.
-The efficient handling of IP address changes for clients that must be updated frequently, such as those for portable devices that move to different locations on a wireless network.
-The forwarding of initial DHCP messages by using a DHCP relay agent, which eliminates the need for a DHCP server on every subnet.
Read more: What is OSI Model
Secure of DHCP:
Because of the lack of authentication involved in DHCP protocol usage, it’s therefore really important to implement strong physical and wireless security protocols around the use of DHCP for network security. You can do this with:
User access policies: Enforce tight IAM rules around who can access the network and block anyone who doesn’t fit these policies.
Audit logging: Ensure that you are logging all activity on the network, allowing you to spot early signs of misuse.
Admin access: Restrict access to Netsh commands or the DHCP console to only a few people who really need this clearance.
Physical security: Create tight physical security processes to stop anyone unauthorized accessing the routers or servers themselves.
Conclusion:
We hope this article about DHCP and its uses has been useful and given you a quick beginners overview to what the protocol is, how it works, and how you can use it to your best advantage as an IT professional!
If you want to know about other protocols that using in devices such as network switch, server, router and more click on Atech blog and read other posts. Please share your idea about our blogs in comment box.