IT Toolbox
Menu
HomeIT DictionaryDHCP
IT dictionary

DHCP

Dynamic Host Configuration Protocol
Ports / IP protocol UDP 67 — server UDP 68 — client

DHCP automatically assigns IP addresses and other network settings to client devices, usually for a defined lease period.

TopicIT knowledge → About 4 min read

What does the DHCP server provide?

IP

IP address

MASK

Subnet mask

GW

Default gateway

DNS

DNS resolvers

T1/T2

Lease renewal timing

RES

Address reservation

Simple definition

DHCP (Dynamic Host Configuration Protocol) automatically assigns IP configuration to network devices, avoiding manual setup on every computer, phone or printer.

Technical definition

When a client joins an IPv4 network, it can broadcast DHCPDISCOVER to locate a server. The server replies with DHCPOFFER, the client requests the selected offer using DHCPREQUEST, and the server confirms with DHCPACK. This four-step exchange is called DORA (Discover, Offer, Request, Acknowledge). The resulting lease generally includes an IP address, subnet mask, default gateway, DNS servers and lease duration.

Concept diagram The four steps of a DHCP lease DORA message sequence when a device joins a network.
  1. Discover Client looks for a server
  2. Offer Server proposes an IP
  3. Request Client requests that IP
  4. ACK Server confirms the lease

This illustrates the DHCPv4 message order. A DHCP relay may forward the messages across subnets.

What is it used for?

Automatically configure network clients, manage address pools centrally and reserve predictable addresses for selected devices.

Practical example

When a laptop connects to an office Wi-Fi network, DHCP can provide its IP address, network mask, default gateway and DNS configuration without manual intervention.

Common issues

  • Range of addresses exhausted….
  • Two DHCP servers not provided on the same network…
  • DHCP relays not between VLAN…
  • APIPA address when no response is received…

Key takeaway: DHCPv4 commonly uses UDP ports 67 (server) and 68 (client). For clients in another VLAN, a correctly configured DHCP relay is usually necessary.

DORA: acquiring an IPv4 address

A client without configuration generally broadcasts DHCPDISCOVER to find available servers. A server replies with DHCPOFFER, the client chooses an offer using DHCPREQUEST, and the server confirms it with DHCPACK. DORA describes initial allocation; renewals and lease reuse may follow different exchanges. DHCPv4 uses UDP port 67 on servers and 68 on clients. Broadcast traffic cannot cross routed VLAN boundaries without an appropriate relay.

Leases, renewal and reservations

A DHCP lease grants network configuration for a limited period. The server determines the lease duration; T1 and T2 timers normally control renewal and rebinding. A reservation links an address to a client identifier, often MAC-related in IPv4, so a device receives a predictable address without manual static configuration. Exclusion ranges prevent automatic allocation of specific addresses. Reservations do not prevent address conflicts caused by manually configured duplicates.

DHCP options and DNS integration

Besides IP addresses and subnet masks, servers can provide a default gateway (option 3), DNS resolvers (option 6), domain search information and device-specific settings. Options 66 and 67 are sometimes used for network boot, but modern PXE configurations depend on firmware and architecture. In Active Directory networks, distributing only public DNS resolvers can break domain-controller discovery because clients must resolve internal AD zones. Dynamic DNS updates may be performed by clients or DHCP servers according to policy.

DHCP relay and VLAN segmentation

DHCPDISCOVER is usually a local broadcast. When clients and DHCP servers are on different VLANs, a router or layer-3 switch can act as a DHCP relay, sometimes called an IP helper. In DHCPv4, the relay forwards requests and typically includes giaddr information so the server can select the appropriate scope. Configure scopes for each served subnet, permit required traffic and verify relay interfaces. Missing or incorrect relay settings commonly lead Windows clients to self-assign 169.254.x.x addresses.

High availability and outage prevention

Windows Server DHCP Failover can coordinate lease availability between two servers using load-balance or hot-standby modes, subject to platform constraints. Independently configuring overlapping scopes on unrelated DHCP servers is not a safe high-availability design and can lead to conflicts. Monitor free-address capacity, back up DHCP configuration and test failover. A DHCP server in an Active Directory domain may also need authorization in AD.

Security: rogue servers and DHCP Snooping

An unauthorized DHCP server can distribute malicious gateways or DNS resolvers. On supported switches, DHCP Snooping distinguishes trusted uplinks from untrusted client ports and can reject unauthorized server replies. Correctly classifying uplinks, trunks and relays is essential to avoid blocking legitimate leases. Server logs, network monitoring and segmentation provide complementary protection. DHCP is not device authentication and does not replace 802.1X or other network access controls.

Troubleshooting a client without an address

On Windows, start with ipconfig /all to inspect the address, DHCP state, gateway, DNS and DHCP server. An address in 169.254.x.x commonly means the expected IPv4 configuration was not obtained. Check physical or wireless connectivity, VLAN assignment, scope capacity, exclusions, relay configuration and firewall policy. ipconfig /release followed by ipconfig /renew can trigger a new exchange, but capture the initial state and review logs first. Packet captures reveal which DORA step is missing. On Linux, inspect NetworkManager, systemd-networkd or the active DHCP client.

DHCPv4 versus DHCPv6

DHCPv6 differs from DHCPv4: clients use UDP 546 and servers UDP 547, with messages such as Solicit, Advertise, Request and Reply in common exchanges. IPv6 routers are discovered through Router Advertisements, not the DHCPv4 default-gateway option. Depending on network flags and policy, clients may use SLAAC, stateful DHCPv6 addressing or DHCPv6 for additional information. Operating-system support and behavior vary, so diagnose IPv4 and IPv6 separately.

Support the development of BAOI Hosting, domains and new IT resources.
❤️ Support BAOI

My favorites