# DHCP Overview

* The Dynamic Host Control Protocol is used to allocate IPv4 addresses to end devices in your network dynamically.
* DHCP can also be used for a variety of different reasons within the enterprise including PXE, TFTP services, SCCM, DNS allocation, and lease times.
* DHCP can be configured within the Cisco iOS or as a service on a Windows Server.

<figure><img src="https://2373667134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8zF1bBBRr6t1PCyfuXHu%2Fuploads%2F2ntlXptGo8yiro7Cbmg3%2Fdhcp_image_01.png?alt=media&#x26;token=d191d555-59c6-4bff-a59c-b87ea61ea72e" alt=""><figcaption><p>Custom Trepa Tech DHCP image</p></figcaption></figure>

*

```
<figure><img src="https://2373667134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8zF1bBBRr6t1PCyfuXHu%2Fuploads%2FcB2r6q7tNA0UAVU9tzZ9%2Fdhcp_image_server.png?alt=media&#x26;token=b7434cfd-572b-4667-9972-2a2aa3de3635" alt=""><figcaption><p>Custom trepa tech dhcp image</p></figcaption></figure>
```

* DHCP uses a process called **"DORA"** to communicate with endpoints to delegate IP addressing or other **"DHCP Options"**

  * D - Discover (broadcast | UDP)
  * O - Offer (Unicast | UDP)
  * R - Request (Broadcast | UDP)
  * A - Acknowledgement (Unicast | UDP)

  <figure><img src="https://2373667134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8zF1bBBRr6t1PCyfuXHu%2Fuploads%2FgQwX7SnRjsL9hnMooarv%2FDHCP_DORA.png?alt=media&#x26;token=45b7a3a0-b228-4ea4-b287-ea438419aaf5" alt=""><figcaption><p>Custom Trepa Tech DORA image</p></figcaption></figure>
* DHCPv4 messages are encapsulated within the UDP transport protocol.
* DHCPv4 messages sent from the client use UDP source port 68 and destination port 67.
* DHCPv4 messages sent from the server to the client use UDP source port 67 and destination port 68.

## DHCP Relay

* In networking, sometimes the best design for your campus/enterprise network is to have the DHCP server be a single service running on a VM or a cluster of VMs.
* For endpoints logically segmented by VLANs and in their broadcast domains, the default-gateway interface will need to be configured with an **"IP Helper-address"** in order for endpoints to reach the DHCP server, **IF** the DHCP server is not within the same subnet/broadcast domain.
* The IP helper-address will redirect **"broadcast"** messages into **"unicast"** messages to be sent to the IP Helper-addresses destination IP address.

## VRF Support

* DHCP Pools can also be configured on Cisco iOS to support users in a Virtual Routing Forwarding Instance.
* VRFs create a separate logical routing table that is not a part of the global routing table. (much like a VM and the host OS)

## DHCP Exclusions

* In the enterprise, some endpoints you do not want to assign IP addresses dynamically.
* Any endpoint device that has a URL/DNS record associated with it should be static.
* Printers, share drives, and VTCs should also be considered for static IP addresses.
* In Cisco iOS and Windows DHCP Service, you can set **"DHCP Exclusions"** that will not allow an IP address in the subnet to be dynamically allocated.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://trepa-technologies.gitbook.io/networking-technologies-by-johnny-bandin/dhcp-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
