System that allows automatically allocation of IP Address on Hosts without any configuration.

It can be configured to give a host the same IP address each time it connects to the network or a temporary IP address that is different every time.

DHCP also allows a host to learn additional information like:

  • Its Subnet mask
  • Address of its first-hop router (default gateway)
  • Address of its local DNS server

DHCP works as a Client-Server protocol where a client is a newly arrived host that wants to obtain network configuration information including an IP Address for itself. If there is no DHCP server on the network that the host has arrived on, a DHCP relay agent (usually a Router) is needed.

DHCP Process (DORA)

  1. DHCP server discovery: First a newly arriving Host must find a DHCP Server to interact with. This is done by the client sending a DHCP discover message with a UDP Packet to Port 67. This is encapsulated in a Datagram with the broadcast IP address of 255.255.255.255 and a “this host” source IP Address of 0.0.0.0. This host now being a DHCP Client thus sends this datagram to The Link Layer, which broadcasts this Frame to all nodes in the Subnet.
  2. DHCP server offer(s): A DHCP server receiving the DHCP discover message responds to the client with a DHCP offer message that is broadcast to all nodes on the subnet (using IP broadcast address of 255.255.255.255). As several DHCP servers might be on the subnet the client can be able to chose among several offers. Each offer contains:
    • Transaction ID of the received discover message
    • The proposed IP Address for the client
    • The network mask
    • IP Address lease time, which is the time the IP address is valid.
  3. DHCP request: The arriving client will choose from among one of more offers and responds to its selected offer with a DHCP request message that echoes back the configuration parameters.
  4. DHCP ACK: The server responds to the DHCP request message with a DHCP ACK message, which confirm the requested parameters.

Examples

Architecture

DHCP Process