Dynamic Host Configuration Protocol (DHCP) (original) (raw)

Last Updated : 29 Apr, 2026

Seamless network connectivity is achieved by automatically assigning IP addresses and configuration settings to devices using the Dynamic Host Configuration Protocol (DHCP).

Components

DHCP works using a client–server model where the client requests network setting, the server allocates them from an address pool, and the settings are delivered as options for a fixed lease time.

dhcp

DHCP Renewal: Lease renewal process

Packet Format

dhcp_packet_format

DHCP Packet Format

Working

DHCP operates at the Application Layer and uses UDP ports 67 (server) and 68 (client) to automatically assign network configuration through a client-server communication process called DORA (Discover, Offer, Request, Acknowledge). The process involves the following steps:

1. DHCP Discover Message

DHCP Discover is the first message sent by a DHCP client to check whether any DHCP server is available on the network and to start getting an IP address.

dhcp_3

Client broadcasts to discover available DHCP servers on the network.

2. DHCP Offer Message

A DHCP server replies with an offer that includes an available IP address and configuration options (like subnet mask, gateway, DNS, and lease time).

dhcp_1

DHCP Offer: Server offers an IP address to the client.

3. DHCP Request Message

DHCP Request is the message where the client confirms one chosen offer and asks the selected DHCP server to allocate that IP officially. It also tells other DHCP servers not to keep their offered IP reserved.

dhcp_4

Client requests a specific IP address from the DHCP server.

4. DHCP Acknowledgment Message

DHCP ACK is the final confirmation sent by the selected DHCP server after it receives the client’s DHCP Request. This message officially assigns the IP address to the client and provides the full set of network configuration parameters.

dhcp_2

DHCP ACK: Server confirms and assigns the IP address.

5. DHCP Negative Acknowledgment Message

6. DHCP Decline

7. DHCP Release

DHCP Release allows a client to return its assigned IP address to the server before the lease expires.

8. DHCP Inform

Security Concerns with DHCP

DHCP has no built-in authentication, so attackers on the same LAN can misuse it to disrupt service or redirect traffic.

Protection Against DHCP Attacks