Computer Networking & Internet

What Is DHCP?

DHCP, the Dynamic Host Configuration Protocol, is a network protocol that automatically assigns an IP address and related settings to a device when it joins a network. A DHCP server holds a pool of addresses and leases one to each device that asks, along with the subnet mask, default gateway, and DNS server addresses, so no setting has to be entered by hand. The device and the server agree on the address through a four-step exchange called DORA, and the address is given as a time-limited lease that the device renews. The Internet Engineering Task Force defines DHCP for IPv4 in RFC 2131.

DORAthe four steps: Discover, Offer, Request, Acknowledge
4core settings handed out: IP, mask, gateway, DNS
50%of the lease, when a device first tries to renew
RFC 2131the IETF standard that defines DHCP for IPv4

What Is DHCP?

DHCP is a network protocol that automatically assigns IP addresses and related network settings to devices when they connect to a network. Without it, every laptop, phone, and printer would need an address entered by hand, and two devices given the same address would conflict. DHCP removes that work by running a server that holds a pool of addresses and leases one to each device on request. Its defining traits are:

  • Automatic assignment: each device gets an address with no manual setup on the device.
  • A central server: one DHCP server holds the pool and answers every request on the network.
  • A full configuration: the device receives the IP address, subnet mask, default gateway, and DNS servers together.
  • A time-limited lease: each address is given for a set period, after which the device renews or releases it.

DHCP assigns the logical address explained in the overview of a computer network, along with the subnet mask that splits the network portion of the address from the host portion. A device can instead use a fixed address set by hand, which is the difference covered later in this guide.

How Does the DHCP DORA Process Work?

The DHCP process is a four-step exchange called DORA: Discover, Offer, Request, and Acknowledge. A device joining the network has no address yet, so it cannot simply contact a known server. It broadcasts a request that any DHCP server can hear, and the two complete the handshake in milliseconds. The four steps run in order:

  • Discover. The new device broadcasts a DHCPDISCOVER message to the whole local network, asking any DHCP server to answer, because it does not yet know one exists or where it is.
  • Offer. Each DHCP server that hears the broadcast replies with a DHCPOFFER, proposing an available address plus the subnet mask, default gateway, and DNS servers.
  • Request. The device picks one offer and broadcasts a DHCPREQUEST naming that server. Broadcasting it lets the servers whose offers were not taken release the addresses they had set aside.
  • Acknowledge. The chosen server sends a DHCPACK confirming the lease and its full set of settings, and the device starts using the address.

The whole exchange finishes in well under a second, so a device has a working address within moments of joining. The initial DHCPDISCOVER travels as a broadcast because the device has no address of its own and no way to know which server to contact, as defined in RFC 2131.

What Settings Does DHCP Assign?

DHCP assigns the IP address, the subnet mask, the default gateway, and the DNS server addresses, plus optional settings such as the lease time and domain name. An address alone is not enough for a device to communicate, so the server delivers a complete set of parameters in the DHCPACK message. The core settings are:

  • The IP address: identifies the device on the network so other devices can reach it.
  • The subnet mask: defines which part of the address is the network and which is the host.
  • The default gateway: the router address the device uses to reach other networks.
  • The DNS server addresses: let the device turn domain names into IP addresses.

The default gateway DHCP hands out is the router that forwards traffic to other networks, usually performing the address translation described in the overview of NAT. The router that does this routing is the same device covered in the explanation of a router.

What Is a DHCP Lease and How Does Renewal Work?

A DHCP lease is the fixed period for which a server assigns an address to a device before the device must renew or release it. A server does not give an address out permanently, because a lease lets it reclaim addresses from devices that have left the network. The lease has a clear lifecycle:

What Is a DHCP Lease? - What Is DHCP?
  • A lease duration sets how long the device may keep the address, often 24 hours on home routers and shorter on busy guest networks.
  • Renewal at 50 percent (T1) prompts the device to contact the original server directly and extend the same address.
  • Rebinding at 87.5 percent (T2) lets the device broadcast a renewal to any DHCP server if the original one has not answered.
  • A lease release returns the address to the pool when the device disconnects or the lease expires without renewal.
Renewal happens long before the lease runs out. A device first tries to renew at 50 percent of the lease, sending a DHCPREQUEST straight to the server that issued the address. If that server is unreachable, the device waits until 87.5 percent and broadcasts the request so any server can respond. Renewing early this way means a device almost never loses its address mid-session, and the lease still lets a network serve more devices over time than its pool holds at once, because departed devices return their addresses for reuse.

Which Device Acts as the DHCP Server?

On a home or small office network the router is almost always the DHCP server, while larger networks run DHCP on a dedicated server or appliance. A DHCP server is really software that holds the address pool and answers requests, and that software can run on different hardware depending on the size of the network. The common locations are:

Which Device Acts as the DHCP Server? - What Is DHCP?
  • A home router runs a built-in DHCP server that addresses every device on the local network.
  • A business server runs DHCP as a network service, such as Windows Server or a Linux daemon.
  • A dedicated appliance handles DHCP alongside routing and firewall duties in larger networks.
  • A DHCP relay agent forwards requests across subnets when the server sits on a different segment from the device.

On a home network the router combines the DHCP server with the default gateway, so the single device that assigns addresses is also the one that forwards traffic to the internet. That dual role is why the router is the first place to look when a device cannot get an address.

Dynamic, Static, and Reserved Addresses Compared

A device can get its address three ways: dynamically from DHCP, as a fixed static IP set on the device, or as a DHCP reservation that always returns the same address. All three end with the device holding an address, but they differ in where the address is decided and whether it can change.

Dynamic (DHCP)
The server picks any free address from the pool and leases it. The address can change when the lease expires or the device rejoins, and nothing is configured on the device. Best for: laptops, phones, and guests that come and go.
Static IP
An administrator types a fixed address into the device’s own network settings, so it never changes and does not depend on a server. It must be tracked by hand to avoid conflicts. Best for: a router, or a device on a network with no DHCP server.
DHCP reservation
The router ties one address to a device’s MAC address, so the device still uses DHCP but always receives the same address. The mapping is managed centrally on the server. Best for: printers, cameras, and home servers that need a steady address.

A reservation is the usual middle ground: it gives a device a predictable address like a static IP, but keeps the assignment under the server’s control so there is one place to manage it. A true static IP, set in the device’s own settings, is covered next.

How Does DHCP Differ From a Static IP?

DHCP assigns addresses automatically and temporarily, while a static IP is a fixed address configured by hand on the device that never changes on its own. A DHCP address comes from a server and can change at renewal, whereas a static IP stays constant until an administrator edits it. The practical differences are:

  • Assignment: DHCP is automatic with no setup on the device; a static IP is entered manually in the device’s network settings.
  • Stability: a DHCP address can change when the lease expires or the device rejoins; a static IP stays the same.
  • Management: DHCP is managed centrally on the server; a static IP is managed on each device and must be tracked to avoid conflicts.
  • Best fit: DHCP suits laptops and phones that join and leave; a static IP suits a router or a port-forwarding target that needs a constant address.
AttributeDHCPStatic IP
AssignmentAutomatic from a serverManual on the device
Address stabilityCan change at renewalStays constant
Configuration effortNone on the deviceSet on each device
Best useLaptops, phones, general clientsRouters, servers, printers
ManagementCentral, on the DHCP serverPer device
RiskAddress may change unexpectedlyManual errors and conflicts

How Does DHCP Work for IPv6?

IPv6 can use DHCPv6, but many networks instead use SLAAC, where a device builds its own address from a prefix the router advertises. The original DHCP in RFC 2131 covers IPv4 only; IPv6 adds a second way to get an address, so the two methods coexist. The three common models are:

  • SLAAC (stateless): the router advertises a network prefix, and each device generates its own address from that prefix. No server tracks who has what, which suits small networks and connected devices.
  • Stateful DHCPv6: a DHCPv6 server assigns each address and records it, much like IPv4 DHCP. This gives an administrator central control and an audit trail, which suits larger networks.
  • SLAAC plus stateless DHCPv6: a hybrid where the device builds its address with SLAAC, and a stateless DHCPv6 server supplies extra settings such as DNS servers that SLAAC alone does not provide.

The split exists because IPv6 has so many addresses that devices can safely self-assign, so SLAAC removes the need for a server in simple cases. The wider difference between the two address families is covered in the comparison of IPv4 and IPv6.

DNS Record Types ExplainedPick a DNS record type to see what it does in plain words, an example value, and a common use
DHCP Pool CalculatorPick a subnet size and how many addresses you reserve to see how many devices your DHCP pool can serve
IP Conflict TroubleshooterPick the symptom you are seeing to get the likely cause and the fixes to try in order

Last Thoughts on DHCP

DHCP is the protocol that automatically assigns IP addresses and the settings that go with them, removing the need to configure every device by hand. The DORA exchange, Discover, Offer, Request, and Acknowledge, leases an address within moments of a device joining, and the lease puts a time limit on that address so the device renews it at 50 percent and the network can reuse addresses that devices give back. A home router usually fills the role of both DHCP server and default gateway, which is why it is the first thing to check when a device cannot get online.

The choice between dynamic, reserved, and static addressing comes down to whether an address may change and where it is managed, with reservations giving a fixed address while keeping central control. To see where DHCP sits among addressing, routing, and name resolution, continue with the overview of a computer network.

Key Takeaways:

  • DHCP automatically assigns an IP address, subnet mask, default gateway, and DNS servers to each device that joins a network.
  • The DORA process is the four-step handshake: Discover, Offer, Request, and Acknowledge.
  • An address is given as a lease; the device renews at 50 percent and rebinds by broadcast at 87.5 percent before it expires.
  • On home networks the router is both the DHCP server and the default gateway.
  • A DHCP reservation fixes an address on the server by MAC address, while a static IP is set on the device itself.
  • IPv6 can use DHCPv6, but SLAAC lets a device build its own address from a router-advertised prefix.

Frequently Asked Questions (FAQs)

What is DHCP in simple terms?

DHCP is a network protocol that automatically gives a device an IP address and the other settings it needs to use the network. A DHCP server hands out the address, subnet mask, default gateway, and DNS servers, so nothing has to be typed in by hand.

What does DORA stand for in DHCP?

DORA stands for Discover, Offer, Request, and Acknowledge, the four messages a device and a DHCP server exchange to assign an address. The device discovers a server, the server offers an address, the device requests it, and the server acknowledges the lease.

What is a DHCP lease and when does it renew?

A DHCP lease is the set time a device may keep an assigned address. The device tries to renew at 50 percent of the lease by contacting the original server, and if that fails it broadcasts a renewal at 87.5 percent to any server before the lease expires.

What is the difference between a DHCP reservation and a static IP?

A DHCP reservation is set on the router and ties an address to a device’s MAC address, so the device still uses DHCP but always gets the same address. A static IP is typed directly into the device’s own settings and is managed there, not by the server.

Which device is the DHCP server on a home network?

On almost every home network the router is the DHCP server. The same router also acts as the default gateway, so the device that hands out addresses is also the one that forwards traffic to the internet.

Does DHCP work for IPv6?

IPv6 can use DHCPv6, but many networks use SLAAC instead, where the device builds its own address from a prefix the router advertises. A common hybrid uses SLAAC for the address and stateless DHCPv6 only to supply DNS servers.

Nizam Ud Deen

Muhammad Nizam Ud Deen Usman is the founder of theCoreiTech and the author of The Local SEO Cosmos. Nizam works as an SEO consultant and content strategy expert with more than a decade of experience in digital marketing and IT, and he also founded ORM Digital Solutions, a digital agency serving medium and large businesses. He holds a degree from the University of Education, Lahore (Multan Campus), and was listed among the top 20 SEO experts in Pakistan in 2024. Nizam started theCoreiTech in 2012 to make computers easier to understand and use for everyone. Connect with Nizam on LinkedIn (seoobserver), X (@SEO_Observer), or at nizamuddeen.com.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button