Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to automatically assign IP addresses and other network settings (subnet mask, gateway, DNS) to devices on a network.
It removes the need for manual IP configuration and helps avoid configuration errors.
A DHCP server manages a pool of IPs and provides them to clients using a process called DORA.
The DHCP IP allocation process consists of four main messages:
- Discover msg
- Offer msg
- Request msg
- Acknowlegement msg
- The first message sent by the DHCP client.
- Purpose: To locate available DHCP servers.
- Type: Broadcast (255.255.255.255).
- Contains:
- Client MAC address
- Request for network configuration
- Indication that the client has no IP
When a device joins a network, it does not know the DHCP server’s address.
So, it broadcasts a DHCPDISCOVER message to reach all DHCP servers.
- Sent by the DHCP server in response to the discovery message.
- Purpose: To offer an IP address lease to the client.
- Type: Broadcast or unicast.
- Contains:
- Offered IP address
- Subnet mask
- Default gateway
- DNS servers
- Lease duration
Any DHCP server receiving the discovery may send a DHCPOFFER.
It informs the client:
“Here is an IP address you can use.”
(Sometimes mistakenly called “recovery message,” but the correct term is DHCP Request)
- Sent by the client.
- Purpose: To accept one DHCP offer and reject others.
- Type: Broadcast.
- Contains:
- Selected DHCP server ID
- Requested IP address
- Client MAC address
If multiple offers are received, the client chooses one and broadcasts a DHCPREQUEST, telling all servers:
“I accept the offer from this specific server.”
- Sent by the selected DHCP server.
- Purpose: To confirm the IP lease and finalize configuration.
- Contains:
- Confirmed IP address
- Subnet mask
- Gateway
- DNS information
- Lease start time and duration
The DHCPACK message completes the DORA process.
The client configures its IP address and officially joins the network.
| Step | Message | Sender | Purpose |
|---|---|---|---|
| 1 | Discover | Client | Locate DHCP servers |
| 2 | Offer | Server | Offer IP address |
| 3 | Request | Client | Request chosen IP offer |
| 4 | Acknowledge | Server | Confirm IP assignment |
DORA = Discover → Offer → Request → Acknowledge



