VMware ESXi and vSphere Cluster Management

Dynamic Host Configuration Protocol (DHCP)

Learn how DHCP automatically supplies IPv4 hosts with addresses, subnet masks, gateways, DNS settings, and leases through the DORA exchange.

Dynamic Host Configuration Protocol (DHCP) is an application-layer protocol that automatically supplies network hosts with TCP/IP configuration parameters. Instead of requiring an administrator to enter every setting on every device, DHCP lets a client request configuration from a DHCP server.

This lesson explains DHCP's client-server architecture, the settings it provides, the four-step DORA exchange, UDP ports 67 and 68, multiple server offers, and common troubleshooting checks.

Why DHCP Is Used

A host needs more than an IPv4 address to communicate effectively. It also needs information such as the subnet mask, default gateway, and DNS server. Manually entering these values on every workstation can require significant administrative effort and can cause typing or duplication errors.

With DHCP, an administrator defines address ranges and common options in one place. Clients request configuration automatically when they join the network. This provides more consistent settings and centralizes address allocation.

Configuration methodHow it worksTypical consideration
Static or manualAn administrator enters the IP address and other settings separately on each host.Useful when a device needs a deliberately fixed address, but manual changes require more effort and careful tracking.
Dynamic with DHCPA DHCP server supplies an available address and network options automatically.Reduces repetitive work and basic entry errors, but the DHCP scope must have available, correctly designed addresses.

DHCP Client and Server Architecture

DHCP client

The DHCP client is the host requesting network configuration. A workstation, laptop, printer, phone, or other network device can act as a DHCP client. A newly connected client may not yet have a usable IPv4 address, subnet mask, or default gateway.

DHCP server

The DHCP server is a service or device that maintains available address assignments and responds to client requests. It is configured with a DHCP pool, also called a scope: a collection of IPv4 addresses available for assignment. The server also stores options such as the subnet mask, gateway, and DNS server address.

Leases

A lease is a time-limited assignment of an IPv4 address and related settings to a client. The lease duration tells the client how long the assignment is valid. Because the assignment is temporary, the address can later be reused when the client no longer needs it, subject to the server's allocation rules.

Information DHCP Can Supply

DHCP can deliver multiple network parameters, not just an IPv4 address.

SettingFunction
IP addressIdentifies the host on the IPv4 network.
Subnet maskDefines the network and host portions of the address and helps the host determine whether a destination is local.
Default gatewayIdentifies the router the host uses to reach remote networks.
DNS serverIdentifies a server that resolves domain names to IP addresses.
Domain nameSupplies a DNS naming suffix that may be used when resolving names.
Lease durationDefines how long the address assignment and associated settings are valid.

The DHCP DORA Exchange

DORA is a mnemonic for Discover, Offer, Request, and Acknowledgment. These are the four core stages of the introductory DHCP IPv4 exchange.

StepMessageSenderTypical delivery methodPurpose
1DHCPDISCOVERClientBroadcastLocate available DHCP servers.
2DHCPOFFERServerResponse to the clientPropose an address lease and configuration options.
3DHCPREQUESTClientBroadcastSelect and request an offered lease.
4DHCPACKSelected serverResponse to the clientApprove the lease and provide final configuration values.

1. DHCPDISCOVER: finding servers

The client begins with a DHCPDISCOVER message. It sends this message as a broadcast because it may not know the address of a DHCP server and may not yet have a usable IP configuration. A broadcast is intended for all hosts on the local broadcast domain.

2. DHCPOFFER: proposed configuration

A DHCP server that receives the discovery can respond with a DHCPOFFER. The offer proposes an available IPv4 address and can include the subnet mask, default gateway, DNS server, domain name, and lease duration.

3. DHCPREQUEST: selecting an offer

The client sends a DHCPREQUEST to indicate which offered configuration it wants. In the introductory workflow, the client is conventionally described as accepting the first suitable offer it receives. The request is broadcast so that all responding DHCP servers learn which server's offer was selected.

4. DHCPACK: confirming the lease

The selected server sends a DHCPACK, or DHCP acknowledgment. This confirms the lease and delivers or confirms the final configuration values. The client can then configure its IPv4 interface and use the network.

When Multiple DHCP Servers Respond

More than one DHCP server can respond to a DHCPDISCOVER on the same broadcast segment. Each server may send a separate DHCPOFFER with its own proposed address and options.

The client chooses one offer, conventionally the first suitable offer received in this basic workflow, and broadcasts DHCPREQUEST. That request identifies the selected server and the requested offer. The selected server confirms the assignment with DHCPACK. The other servers learn that their offers were not selected and do not allocate those offered addresses to that client.

DHCP Transport and UDP Ports

DHCP uses UDP, the User Datagram Protocol. During initial discovery, the client may lack both an IP address and the address of a DHCP server, so broadcasts are important.

RoleProtocolPort
DHCP serverUDP67
DHCP clientUDP68

Remember the direction: UDP port 67 is the DHCP server port, and UDP port 68 is the DHCP client port.

Practical Example: A New Workstation Joins a LAN

  1. The workstation has no manually configured IPv4 settings and is configured to obtain its settings automatically.
  2. It broadcasts DHCPDISCOVER to locate DHCP servers.
  3. A server sends DHCPOFFER with an unused address, subnet mask, default gateway, DNS server, and lease duration.
  4. The workstation selects an offer and broadcasts DHCPREQUEST.
  5. The selected server sends DHCPACK, confirming the lease and final values.
  6. The workstation configures its interface and can communicate with local and remote resources, subject to routing and other network controls.

Benefits and Operational Significance

  • Reduced administrative effort: Administrators do not need to enter the same settings separately on every endpoint.
  • Consistent configuration: Common subnet masks, gateways, DNS servers, and domain names can be delivered from a central configuration.
  • Centralized address management: The server tracks its pool and leases, helping coordinate address allocation.
  • Fewer basic entry errors: Automatic delivery reduces mistyped addresses, masks, and gateway values.
  • Efficient reuse: Time-limited leases allow addresses to be reassigned when appropriate.

DHCP does not eliminate planning. The address pool must contain enough addresses, must match the intended subnet, and must not conflict with manually assigned addresses or another DHCP scope.

Troubleshooting DHCP

Client receives no IP configuration

  • Verify that a DHCP server is reachable on the client's local broadcast domain.
  • Check that the server's configured pool has available addresses.
  • Confirm that the client is configured to request its settings automatically.
  • Check whether DHCP messages are blocked or failing to reach the server.

Client receives an address but cannot reach remote networks

  • Check the default gateway supplied through DHCP.
  • Verify that the subnet mask matches the intended local network.
  • Confirm that the gateway is reachable from the client's subnet.

Client reaches IP addresses but not names

  • Check the DNS server address supplied by DHCP.
  • Check whether the domain-name setting is appropriate for the environment.

Clients receive inconsistent offers

  • Determine whether multiple DHCP servers are responding on the broadcast segment.
  • Identify the DHCPOFFER selected by examining the client's DHCPREQUEST.
  • Ensure each DHCP server has an intentional, nonconflicting allocation scope.

Exam-Ready Summary

  • DHCP is an application-layer protocol for automatically distributing TCP/IP configuration parameters.
  • The client requests configuration; the server maintains a pool or scope and offers leases.
  • A lease is a temporary assignment of an address and related settings.
  • The DORA sequence is DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, DHCPACK.
  • DHCP uses UDP port 67 on the server and UDP port 68 on the client.
  • The initial discovery is broadcast because the client may not yet have usable IP configuration or know a server's address.
  • A DHCP offer can include an IPv4 address, subnet mask, default gateway, DNS server, domain name, and lease duration.
  • When multiple servers respond, the client selects one offer and broadcasts DHCPREQUEST so all responding servers know the result.

For related study, see Dynamic Host Configuration Protocol (DHCP).