Homepage > Blog > B2B-SMB > What Is DHCP and How Does It Work?

What Is DHCP and How Does It Work?

By Omada Editorial Group

DHCP is the protocol that automatically assigns a device an IP address and other network settings when it joins a network, so no one has to configure them by hand. It stands for Dynamic Host Configuration Protocol, and it is how most laptops, phones, printers, and IP cameras get online.

It eliminates the need for a manual address list, helps prevent outages caused by duplicate IP addresses, and gives a device the correct settings when it moves to a different network.

 

What Does DHCP Stand For?

DHCP stands for Dynamic Host Configuration Protocol, the standard that automates IP address assignment and device configuration. Each part of the name explains the DHCP meaning:

  • Dynamic: Addresses are leased and can be reused when released or when their leases expire, rather than being assigned permanently.
  • Host: A network-connected device receiving its settings as a DHCP client, such as a workstation, printer, or IP camera.
  • Configuration: DHCP delivers more than an address, including the subnet mask, default gateway, and DNS servers.

 

What Does DHCP Do?

DHCP assigns each device an IP address from a defined pool and delivers the subnet mask, default gateway, and DNS servers it needs to communicate. It also manages address leases and helps prevent duplicate IP addresses, giving administrators centralized control over IP configuration.

Assigns IP Addresses from a Defined Pool

Every DHCP server works from a scope, sometimes called a pool: the range of addresses it can hand out on a specific subnet. An administrator might set 192.168.10.100 through 192.168.10.250 as the scope for an office network, leaving lower addresses available for infrastructure. When a device requests an address, the server selects an available one and records which device holds it. Every later decision in this guide builds on the scope.

Delivers the Rest of the Network Settings

An IP address alone is not enough for a device to reach destinations outside its local subnet. The device also needs a subnet mask, a default gateway, and DNS server addresses, which DHCP can deliver in the same exchange through DHCP options. That is why a DHCP client usually works without manual setup, while a hand-typed address with a missing gateway can reach only its local subnet. Options can also carry specialized settings, such as options 66 and 150, which some IP phones use to locate their configuration server.

Reclaims Addresses Through Leases

With dynamic allocation, each assignment comes with a lease that sets how long the device can use the address. A device that stays connected renews its lease, while a released or expired lease makes the address available for reuse. A laptop that leaves the network and stops renewing eventually frees its address automatically. Without leases, networks with frequent device turnover would force administrators to reclaim addresses by hand.

Helps Prevent Duplicate IP Address Conflicts

When two devices use the same IP address, other devices' ARP caches, which map IP addresses to hardware (MAC) addresses, can point to either one. Traffic meant for one device can reach the other, so connections to one or both devices drop intermittently. If the duplicate is the default gateway's address, clients that resolve it to the wrong device can lose access to resources beyond the local subnet. DHCP reduces this risk by tracking its assignments centrally, and the DHCP standard recommends that servers check an address before offering it and that clients check it again before using it.

Conflicts can also happen when a network manager manually assigns a static IP address that falls within the DHCP pool, or the range of addresses the server can assign. For example, if a printer has a manually configured address, the DHCP server could assign that same address to a laptop. To prevent this, keep manually assigned static addresses outside the DHCP pool but within the correct subnet, or configure exclusions so the server won't assign them to other devices.

 

How Does DHCP Work? The DORA Process

DHCP works through a four-message exchange between the client and the server, known by the acronym DORA: Discover, Offer, Request, and Acknowledge. The client announces it needs an address, a server offers one, the client formally requests it, and the server acknowledges the request and commits the lease along with the device's network settings.

Discover

A device joining the network has no IP address and does not know where the DHCP server is, so it cannot address a message to anyone directly. Instead, it sends a DHCPDISCOVER message as a broadcast, which devices and DHCP servers on the local subnet can receive. The client sends from UDP port 68 to UDP port 67, the port used by DHCP servers.

Offer

Each DHCP server that receives the broadcast checks its pool for an available address and replies with a DHCPOFFER containing a candidate address and proposed lease terms. The server typically avoids reusing that address while the client decides whether to accept the offer. On a network with more than one DHCP server, the client can receive several offers and chooses one, such as the first to arrive, though the selection method depends on the client.

Request

The client responds with a DHCPREQUEST that identifies the server whose offer it is accepting. This message is also a broadcast, which does two jobs at once. It tells the chosen server to proceed, and it tells every other server that made an offer that its offer was declined, so those servers can make their offered addresses available again.

Acknowledge

The chosen server confirms with a DHCPACK and commits the lease in its records. The acknowledgment carries the committed IP address and lease duration together with the configuration parameters the server provides, such as the subnet mask, default gateway, and DNS servers. Once the client applies those settings, it can communicate on the network. If the server cannot satisfy the request, it typically responds with a DHCPNAK, and the client starts over with a new DHCPDISCOVER.

 

What Is a DHCP Server?

A DHCP server is any device running the DHCP service: it maintains address pools, answers client requests, and tracks DHCP lease information. It is a role rather than a specific type of hardware, and where that role runs determines how addressing can be organized, monitored, and scaled across a network.

A Router or Gateway

In many small-business and single-site networks, the gateway, which connects the local network to the internet, also runs the DHCP service. Because it already routes traffic for each subnet, it can maintain a separate address pool for each network it serves, such as VLANs (virtual local area networks) for staff, guests, and cameras.

A Layer 3 Switch or Dedicated Server

Larger networks often move DHCP closer to the network core. A Layer 3 switch that routes between VLANs can provide DHCP for those subnets if the switch supports DHCP server functionality. Organizations with directory services, internal DNS, or an IP address management (IPAM) platform may run DHCP on a dedicated server so addressing integrates with those systems. The right location depends on where routing happens and who needs administrative control over address records.

Managing DHCP Across Sites

For managed service providers (MSPs) and multi-site IT teams, the challenge is managing DHCP consistently. A centralized controller gives administrators one interface for configuring and monitoring gateways and switches across sites. The DHCP service itself still runs on the gateway, a supported Layer 3 switch, or an external DHCP server, depending on the network design.

The Omada controller manages gateways, switches, and access points across multiple sites, with VLAN configuration available on Omada cloud-based, hardware, and software controllers. Select Omada gateways also support DHCP reservation when acting as the DHCP server, so infrastructure devices keep the same IP address each time they renew or reconnect.

 

What Is a DHCP Lease?

A DHCP lease is the period a device is allowed to use its assigned IP address before it must renew it. If the device is still on the network, it renews automatically and usually keeps the same address. If it has left, the lease eventually expires, and the address becomes available for reuse.

Renewal follows two timers. By default, at 50% of the lease, known as T1, the client asks the server that issued the address to renew it. If that server has not responded by 87.5% of the lease, known as T2, the client broadcasts its request to any available DHCP server. On a 24-hour lease, T1 falls at 12 hours and T2 at 21 hours.

Releasing a lease tells the DHCP server the client no longer needs the address, making it available for reuse. Renewing starts a new request. That is why ipconfig /release and ipconfig /renew on Windows, or the equivalent elsewhere, are common troubleshooting steps for a device with the wrong address or no address at all.

Choosing a DHCP lease time is a tradeoff between stability and turnover. Longer leases reduce DHCP traffic and keep addressing stable for devices that return every day. Shorter leases return addresses to the pool faster where devices come and go constantly, as on guest Wi-Fi, covered below.

 

DHCP vs. Static IP: When to Use Each

DHCP assigns addresses automatically from a central pool, while a static IP address is configured manually on the device and remains fixed until someone changes it. The difference is who maintains the record and what breaks as the network grows.

Factor DHCP Static IP
How the address is assigned Automatically, from the server's pool Manually, on each device
Who maintains the record The DHCP server, centrally The administrator, through IPAM or other records
Device moves to another subnet Gets an address appropriate for the new subnet automatically Must be reconfigured by hand
Risk of duplicate addresses Lower, because the server tracks assignments Higher, if manually assigned addresses are not coordinated
Effort at scale Lower, because address assignment is automated Increases with every device added
Typical use Laptops, phones, and guest devices Gateways, DHCP servers, and core infrastructure

Static addressing earns its place when:

  • A device must be reachable at a known address and cannot rely on name resolution, such as the default gateway or a DNS server.
  • A device must work before DHCP is available, such as the DHCP server itself.

DHCP is the right default when:

  • The device is a client that users carry between rooms, floors, or sites.
  • No other system needs to reach the device at a fixed IP address, which covers most client devices.

A DHCP reservation is the middle ground: the device gets the same IP address every time it connects, while the record stays centrally managed on the DHCP server.

 

How DHCP Works in a Business Network

Business networks add VLANs, multiple subnets, and infrastructure devices that need predictable addresses. Each of those changes how DHCP has to be planned, from how scopes are divided and requests are relayed to how guest addresses are reclaimed and rogue servers are blocked.

One DHCP Scope per VLAN

Each VLAN is a separate broadcast domain, and in a typical business design, each VLAN has its own IP subnet and DHCP scope. Staff might use 10.1.1.0/24, guest Wi-Fi 10.1.2.0/24, and IP cameras 10.1.3.0/24, each with a pool and default gateway that match its subnet.

If a DHCP-enabled VLAN has no matching scope or relay configuration, its clients cannot obtain addresses from the intended DHCP server. If scopes overlap or hand out the wrong gateway, devices get addresses that cannot route correctly, causing outages that look random until someone checks the scopes. For a walkthrough, see how to configure VLANs with Omada Network v6.

DHCP Relay for Clients on Other Subnets

Routers do not forward broadcasts between subnets by default. When one central DHCP server handles several VLANs, a DHCPDISCOVER from a client on another subnet cannot reach it directly.

A DHCP relay agent solves this. It runs on the router, gateway, or Layer 3 switch that serves as the client's default gateway. When it receives the broadcast, it writes the IP address of the interface that received the request into the giaddr field and forwards the request to the DHCP server. The server uses that address to select the appropriate scope, so one server can address many subnets.

The relay agent can also add Option 82, or Relay Agent Information, to identify where a request came from. It can include a Circuit ID identifying the client's connection, such as a switch port or VLAN, and a Remote ID identifying the connected device or subscriber. A DHCP server configured to use these details can apply specific address assignment rules or network settings based on where the client connects. This gives administrators more control when one server serves several locations or groups of users.

Reservations for Access Points, Cameras, and Printers

Access points, IP cameras, printers, and VoIP phones need predictable addresses so monitoring tools and users can find them. Static addresses, however, scatter the records across dozens of devices.

A DHCP reservation associates a specific DHCP client with a particular IP address on the server, so the device consistently receives the same address while the record stays central. Replacing a failed camera means updating one reservation, not reconfiguring hardware on a ladder. Reservations suit fixed infrastructure with a stable MAC address, while devices that frequently change theirs are poor candidates for MAC-based reservations.

Shorter Leases for Guest Wi-Fi

Cafes, hotel lobbies, and retail stores cycle through devices that connect once and never return. With a multi-day lease, each one holds its address long after leaving, and a busy guest subnet can exhaust its pool. A /24 subnet has 254 usable host addresses.

New guests can then connect to the network name but fail to obtain a usable IP address, which can appear as "connected, no internet." A lease measured in hours rather than days returns unused addresses to the pool sooner, so the pool keeps pace with turnover. Omada controllers can set the DHCP range and lease time on the gateway or supported switch acting as the DHCP server, keeping guest configuration consistent across locations.

Rogue DHCP Servers and How to Spot Them

A rogue DHCP server is an unauthorized device answering DHCP requests. Typically, someone plugs a consumer router into a wall port, its DHCP service starts answering, and devices that accept its offer receive an address on the wrong subnet with the wrong gateway. A common sign is that some clients on a VLAN lose network access while others keep working. Affected devices often show an unexpected address range, such as a consumer default like 192.168.0.x, and their network details list a DHCP server address that does not match the legitimate server.

DHCP snooping is a switch-level control that can block this when properly configured. It trusts ports connected to legitimate DHCP servers and drops DHCP server responses arriving on untrusted ports. Select Omada managed switches support DHCP Snooping.

 

Frequently Asked Questions

What port does DHCP use?

DHCP uses UDP port 67 on the server side and UDP port 68 on the client side. Clients send DHCP messages to server port 67, and servers send DHCP messages to client port 68. When a relay agent forwards requests between subnets, the server sends its replies to the relay agent on port 67.

Does DHCP use TCP or UDP?

DHCP uses UDP, not TCP. A device requesting an address has no IP address yet, so it cannot set up the connection TCP requires, and TCP cannot send broadcasts at all. UDP lets the client broadcast its request and receive a reply before any address is configured.

What happens if the DHCP server goes down?

Devices with an existing DHCP lease can continue using their current address until the lease expires, even if renewal attempts fail. New clients, or clients whose leases have expired, cannot obtain addresses. Many operating systems then assign an IPv4 link-local address in the 169.254.0.0/16 range, which works only on the local link and cannot reach the internet.

Can two DHCP servers run on the same network?

Yes, two DHCP servers can deliberately serve the same subnet for redundancy or load balancing. A split-scope design divides the address range between independently configured servers, while DHCP failover lets two servers share scope and lease information. The problem is an unauthorized or improperly configured second server, covered in the rogue DHCP server section above.

 

Planning DHCP for Your Network

DHCP is more than automatic addressing: it is the control point for how addresses are organized across a network. Its scopes follow each subnet, its reservations keep infrastructure predictable, and its lease times determine how quickly guest addresses return to the pool. How much of that control is available depends on where the service runs, which in many deployments is the gateway.

To compare options for the device that anchors addressing at each site, explore Omada wired gateways.

Omada Editorial Group

Recommended Article