
DHCP or Dynamic Host Configuration Protocol is one of the most important protocols in any network. In March 1997 it was redefined in RFC 2131 obsoleting the RFC 1541 at Bucknell University. There are a number of recent updates to RFC 2131 in RFCs 3396, 4361 and 5494.
It is not correct to say that a DHCP is a protocol used to provide IP Addresses automatically to clients but the correct definition according to RFC 2131 is that DHCP or Dynamic Host Configuration Protocol is a framework for passing configuration information from a DHCP Server to hosts on a TCP/IP Network. In short a DHCP Server not only passes IP Addresses to hosts but Configuration Information as well.
...
Passing Configuration Information means passing IP Address, Subnet Mask, Default Gateway, Primary and Secondary DNS Servers, WINS Server, Proxy Server Information, TFTP Server Information and many more.
Let's now focus on how a DHCP works on a TCP/IP Network. There are actually four steps taken by hosts and the DHCP Server to communicate the IP configuration information. The four steps are as follows:
- DHCP Discover
- DHCP Offer
- DHCP Request
- DHCP ACK
Note! When I was writing this White Paper, I thought to capture my own laptop's communication with my home DHCP Server. So I opened a network sniffer and captured the DHCP communication between my laptop and the DHCP Server. The output is the below figure with colorful rows and I will be explaining each step from the figure in accordance to RFC 2131 inshaAllah.

DHCP Discover
According to the figure above, you see my dell laptop doesn't have any IP Address and sends a broadcast request on the network with Source IP address as 0.0.0.0,and Destination IP Address as 255.255.255.255.
You can see the 3rd row, saying “who has 192.168.3.100?” “Tell 192.168.3.1”. The DHCP Server is actually planning to offer me 192.168.3.100 but wants to check that nobody has 192.168.3.100 assigned, therefore it says if anybody has already got 192.168.3.100, please tell 192.168.3.1 (DHCP Server).
DHCP Offer
Coming to the fourth row, the DHCP Server on the network which is my IPCOP Linux firewall as 192.168.3.1 reserves and offers an IP Address and configuration information to the host by sending it to the host's MAC Address (not shown in the figure). Well the rows show the communication at layer 3 only, therefore the offered IP address is mentioned as the destination IP address. If we click each row and see the details, we can see the MAC address inside it.
DHCP Request
My dell laptop requests the offered IP address and Configuration Information from the Server with a broadcast message again as in row 5.
DHCP ACK
The Server in response sends an Acknowledgement message to the host for saying that it has reserved and leased the address for the host in its binding database.
Visit: Configuring Cisco Router as DHCP Server
Hope it helps:)