info_i_25x25.png See important information about Ubiquiti Devices and KRACK Vulnerability in this article. We will update this document as more information becomes available.

Intro to Networking - Dynamic Host Configuration Protocol (DHCP)

 Overview


 This article gives a basic explanation of what DHCP is and how it works.

Table of Contents


  1. What is DHCP?
  2. Related Articles

What is DHCP?


Back to Top

The Dynamic Host Configuration Protocol (DHCP) runs on UDP ports 66 & 67 and allows for automatic IP configuration of many different parameters (called "Options") in addition to the requested IP address, including:

  1. Subnet Mask (Option 1 - e.g., 255.255.255.0)
  2. Router Address (Option 3 - e.g., 192.168.1.1)
  3. DNS Address (Option 6 - e.g., 8.8.8.8)
  4. Vendor Class Identifier (Option 43 - e.g., 'unifi' = 192.168.1.9 ##where unifi = controller)

DHCP is based on a client-server model. A Host running a DHCP client (e.g., laptop) forwards Layer-2 Broadcast frames with its Source MAC address in order for the DHCP server to reserve the offered IP address for the respective DHCP client.

  1. Discovery - DHCP host broadcasts to find local DHCP server
  2. Offer - DHCP server advertises address lease via unicast
  3. Request - DHCP host broadcasts requesting the address
  4. ACK - DHCP server reserves the address, sending acknowledgment

DHCP pools typically "lease" IP addresses, that is, temporarily reserve IP addresses, after which, the IP address may be re-used. A common DHCP lease time is 86400 seconds (or, 1 day).

dhcp-offer-overview.png
Not unlike a network handshake, the DHCP Offer is summarized in four steps where Client broadcasts and Server unicasts.

 


Related Articles


Back to Top

Read our other introductory networking articles in the Intro to Networking section.