What is DHCP (Dynamic Host Configuration Protocol)?
DHCP (Dynamic Host Configuration Protocol) is a network protocol used to automatically assign IP addresses and other network configuration parameters (such as subnet mask, gateway, and DNS servers) to devices on a network. It eliminates the need for manual IP configuration and ensures efficient IP address management.

How DHCP Works (The DORA Process)
DHCP follows a DORA (Discover, Offer, Request, Acknowledge) process to assign an IP address:
- Discover:
- The client (a device needing an IP) broadcasts a DHCP Discover message to find a DHCP server.
- Offer:
- The DHCP server responds with a DHCP Offer, suggesting an available IP address along with other network settings.
- Request:
- The client sends a DHCP Request, confirming its selection of the offered IP.
- Acknowledge:
- The DHCP server sends a DHCP Acknowledge (ACK), finalizing the assignment and allowing the client to use the IP.
If a client no longer needs an IP, it can send a DHCP Release message to return the IP to the available pool.
DHCP Lease Time
- IP addresses are assigned temporarily with a lease time (e.g., 24 hours).
- The client must renew the lease before it expires; otherwise, the IP is returned to the pool for reuse.
Types of DHCP Allocation
- Dynamic Allocation – DHCP assigns an available IP for a limited lease period.
- Automatic Allocation – DHCP permanently assigns the same IP to a device based on its MAC address.
- Static (Manual) Allocation – The administrator assigns fixed IPs using DHCP reservations (based on MAC addresses).