Dynamic Host Configuration Protocol

When connected to the network, and periodically thereafter, a client requests a set of parameters from the server using DHCP.

[3] Acting in the data link layer, it made implementation difficult on many server platforms.

[5][6] It is based on BOOTP, but can dynamically allocate IP addresses from a pool and reclaim them when they are no longer in use.

[9] After updates by many subsequent RFCs, its definition was replaced in 2018,[10] where prefix delegation and stateless address autoconfiguration were now merged.

On receiving a DHCP request, the DHCP server may respond with specific information for each client, as previously configured by an administrator, or with a specific address and any other information valid for the entire network and for the time period for which the allocation (lease) is valid.

IPv6 hosts may also use link-local addressing to achieve operations restricted to the local network link.

The DHCP employs a connectionless service model, using the User Datagram Protocol (UDP).

It is implemented with two UDP port numbers for its operations which are the same as for the bootstrap protocol (BOOTP).

For those hosts which cannot accept unicast packets before IP addresses are configured, this flag can be used to work around this issue.

The DHCP server may also take notice of the hardware-level MAC address (as specified in the CHADDR field).

When the DHCP server receives the DHCPREQUEST message from the client, the configuration process enters its final phase.

The protocol expects the DHCP client to configure its network interface with the negotiated parameters.

When the server is reusing an IP address from its pool, it may first check (using ping) to see if it is not taken already.[8]: sec.

2.2  This may happen if a host is configured manually with an IP address that lies within the DHCP scope.

If this probe finds another computer using that address, the client should broadcast a DHCPDECLINE to the DHCP server(s).

As client devices usually do not know when users may unplug them from the network, the protocol does not mandate the sending of DHCP Release.

In Unix-like systems this client-level refinement typically takes place according to the values in the configuration file /etc/dhclient.conf.

The information is a variable-length string of characters or octets which has a meaning specified by the vendor of the DHCP client.

An Aruba campus wireless access point, for example, supplies value 'ArubaAP' as option 60 in its DHCPDISCOVER message.

[19] The DHCP server can then augment its DHCPOFFER with an IP address of an Aruba wireless controller in option 43, so the access point knows where to register itself.

The relay agent stores its own IP address, from the interface on which it has received the client's broadcast, in the GIADDR field of the DHCP packet.

The communication between the relay agent and the DHCP server typically uses both a source and destination UDP port of 67.

[8]: §4.4.5 Paragraph 3  They do this by sending a unicast DHCPREQUEST message to the DHCP server that granted the original lease.

A proposal for implementing fault-tolerant DHCP servers was submitted to the Internet Engineering Task Force, but never formalized.

[8]: §4.4.5 Paragraph 9  At that time it will restart the DHCP process from the beginning by broadcasting a DHCPDISCOVER message.

The basic methodology of DHCP was developed for networks based on Internet Protocol version 4 (IPv4).

Because the client has no access to the network upstream of the relay agent, the lack of authentication does not prevent the DHCP server operator from relying on the authorization token.[31]: sec.

As of 2002, this extension had not seen widespread adoption because of the problems of managing keys for large numbers of DHCP clients.

The challenges of key management and processing delays due to hash computation have been deemed too heavy a price to pay for the perceived benefits.

[41]Architectural proposals from 2008 involve authenticating DHCP requests using 802.1X or PANA (both of which transport EAP).

An illustration of a typical non-renewing DHCP session; each message may be either a broadcast or a unicast , depending on the DHCP client capabilities. [ 8 ]
A simplified DHCP client state-transition diagram based on figure 5 of RFC 2131