Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Dynamic Host Configuration Protocol (DHCP)
Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway. In DHCP, port number 67 is used for the server and 68 is used for the client.
DHCP allows a network administrator to supervise and distribute IP addresses from a central point and automatically sends a new Internet Protocol (IP) address when a computer is plugged into a different place in the network.
DHCP is an application layer protocol that provides:
IP Address − Unique identifier for the device on the network
Subnet Mask − Defines the network portion of the IP address
Default Gateway − Router address for accessing other networks
DNS Servers − Domain name resolution services
DHCP Four-Way Handshake Process
DHCP uses a four-step process called DORA (Discover, Offer, Request, Acknowledge) for IP address assignment:
Step 1: DHCP Discover
Client broadcasts a
DHCP DISCOVERmessage to find available DHCP serversSource address:
0.0.0.0, Destination address:255.255.255.255Message contains client's MAC address and may include specific requests
Step 2: DHCP Offer
DHCP server responds with a
DHCP OFFERmessage containing an available IP addressIncludes configuration parameters like subnet mask, default gateway, and lease duration
If multiple servers exist, client accepts the first offer received
Step 3: DHCP Request
Client sends
DHCP REQUESTmessage to accept the offered configurationMessage is broadcast to inform all DHCP servers which offer was selected
Contains the server identifier of the chosen DHCP server
Step 4: DHCP Acknowledge
Selected server sends
DHCP ACKmessage confirming the IP address leaseClient can now use the assigned IP address and configuration
Other servers return their offered addresses to the available pool
DHCP Lease Management
| Process | Description | When It Occurs |
|---|---|---|
| Lease Renewal | Client requests to extend current lease | At 50% of lease time |
| Lease Rebinding | Client contacts any DHCP server for renewal | At 87.5% of lease time |
| Lease Release | Client voluntarily releases IP address | When shutting down gracefully |
Advantages of DHCP
Automatic configuration − Eliminates manual IP address assignment
Centralized management − Network administrators control IP allocation from one location
Conflict prevention − Prevents duplicate IP address assignments
Efficient IP utilization − Addresses are recycled when devices disconnect
Conclusion
DHCP automates IP address assignment through a four-step DORA process, enabling centralized network management and preventing IP conflicts. It provides essential network configuration parameters and efficiently manages IP address leases, making it indispensable for modern networks.
