Following are the important messages exchanged between a Dynamic Host Configuration Protocol (DHCP) client and a DHCP Server.
DHCP client sends a DHCP Discover broadcast on the network for finding a DHCP server. If there is no respond from a DHCP server, the client assigns itself an automatic private IP address (APIPA).
DHCP servers on a network that receive a DHCP Discover message respond with a DHCP Offer message, which offers the client an IP address lease.
Clients accept the first offer received by broadcasting a DHCP Request message for the offered IP address.
The server accepts the request by sending the client a DHCP Acknowledgment message.
If the IP address requested by the DHCP client cannot be used (another device may be using this IP address), the DHCP server responds with a DHCPNak (Negative Acknowledgment) packet. After this, the client must begin the DHCP lease process again.
If the DHCP client determines the offered TCP/IP configuration parameters are invalid, it sends a DHCPDecline packet to the server. After this, the client must begin the DHCP lease process again.
A DHCP client sends a DHCPRelease packet to the server to release the IP address and cancel any remaining lease.
DHCPInform is a new DHCP message type, defined in RFC 2131. DHCPInform is used by DHCP clients to obtain DHCP options.
• Dynamic Host Configuration Protocol (DHCP) - How DHCP Works?
• Dynamic Host Configuration Protocol (DHCP) - Message Format
• Dynamic Host Configuration Protocol (DHCP) Message Options