DHCP Lease · 192.168.50.120 DiscoverclientOffer.50.120RequestconfirmAckleased
IP Basics

What Is DHCP? How Devices Automatically Get an IP Address

BYOIP.info Editorial6 November 2026 5 min read

Key takeaways

  • DHCP supplies configuration; it does not carry your ordinary internet traffic.
  • A lease allows an address to be used for an agreed period.
  • Renewing a lease does not necessarily change the address.
  • Reservations can provide consistent assignments while devices still use DHCP.
  • This guide's message sequence describes IPv4; IPv6 configuration differs.

DHCP, the Dynamic Host Configuration Protocol, supplies devices with network configuration automatically, including an IP address where address allocation is enabled. On a typical home IPv4 network, your router runs the DHCP service that configures a laptop when it joins Wi-Fi.

The laptop also needs settings such as a subnet mask, default gateway, and DNS servers. Receiving an address is one step toward connectivity, not proof that the internet connection works.

What does a DHCP server provide?

The server manages a configured address pool and records which addresses it has leased. Administrators also configure the accompanying network settings.

SettingWhy the device needs it
IPv4 addressIdentifies its interface on the network
Subnet maskHelps determine which destinations are on the local subnet
Default gatewaySupplies a next hop for destinations without a more specific route
DNS serversProvide a place to send name lookups
Lease durationDefines the assignment’s lifetime unless renewed

DHCP carries configuration using options, including subnet mask, router, and DNS-server options described in RFC 2132.

For background, see What Is an IP Address? and What Is a Subnet?. A device can receive correct DHCP settings while the gateway’s upstream connection is unavailable.

How does the initial DHCP exchange work?

A common initial IPv4 exchange has four steps, often remembered as DORA:

  1. Discover: the client looks for DHCP servers.
  2. Offer: a server proposes an address and configuration.
  3. Request: the client identifies the offer it wants to use.
  4. Acknowledge: the selected server confirms the assignment.

RFC 2131 defines the DHCPv4 exchange and lease behavior. This is the typical initial sequence; renewing or reusing an existing assignment can follow a shorter exchange.

In a small network, the server may be part of the router. Larger networks can place it elsewhere and use a DHCP relay to pass messages between a client subnet and the server. The relay does not turn all those subnets into one network.

Example: a laptop joins the office Wi-Fi

Imagine a private office LAN using 192.168.50.0/24. Its DHCP pool runs from 192.168.50.100 through 192.168.50.199, providing 100 candidate addresses before any additional exclusions or reservations.

The laptop receives:

Address:         192.168.50.120
Subnet mask:     255.255.255.0
Default gateway: 192.168.50.1
DNS server:      192.168.50.1
Lease:           8 hours

In this fictional setup, the router also provides a DNS forwarding service. Another network might advertise separate DNS servers. These addresses belong to private space defined by RFC 1918; the eight-hour lease is an example, not a universal recommendation.

Once configured, the laptop can send name queries to the indicated DNS service and traffic toward its gateway. The DHCP server does not need to approve each website visit. If the laptop leaves the office, this assignment is not a portable address for unrelated networks.

What happens when a lease is renewed?

A client normally seeks renewal before its lease expires. If renewal succeeds, it can keep using the assignment for the renewed period. A device may therefore retain the same address across many renewals.

If a DHCPv4 lease expires without successful renewal, the client must stop using that leased address. It should obtain valid configuration again rather than assume the address remains its own.

A restart or reconnection is not a reliable way to force a different address. Read static vs dynamic IP addresses for the distinction between assignment methods and long-term address stability.

Reservations vs manually configured addresses

A DHCP reservation tells the server to offer a particular address to a recognized client. The device continues asking DHCP for configuration. Many products associate reservations with a MAC address or client identifier; check the platform’s matching rules.

A manual address is configured on the device itself. Coordinate it with the address plan and keep it outside the dynamically leased set, using appropriate exclusions where needed, to avoid an IP address conflict.

Microsoft’s DHCP scope documentation gives a concrete example of pools, exclusions, and reservations. Those configuration details are product-specific.

If a printer needs a stable address, a reservation can centralize its configuration. Replacing its network interface or changing the identifier used by the device may require updating the reservation. Our reserved IP address guide explains why this differs from reserving a public address in a cloud account.

What should you check when DHCP fails?

Start with the affected connection rather than changing several settings at once:

  1. Verify the link. Confirm the device joined the intended Wi-Fi network or Ethernet connection. Joining a guest network can produce different settings.
  2. Inspect the current configuration. Note the address, subnet mask, gateway, and whether automatic assignment is enabled on the correct interface.
  3. Check the server. Confirm the intended pool is active, has available assignments, and serves that client subnet.
  4. Check the path. On routed networks, verify the relay and relevant filtering. A working server elsewhere does not establish that requests reach it.
  5. Compare records. Inspect leases, reservations, exclusions, and any manually configured devices. An unexpected DHCP server can also distribute unsuitable settings.
  6. Renew after correcting the cause. Reconnect or use the operating system’s renewal function, then verify the resulting settings and application access.

Some devices configure an IPv4 link-local address from 169.254.0.0/16 when suitable configuration is unavailable. RFC 3927 describes this local-link mechanism. Such an address is a clue, not conclusive proof of a broken DHCP server, and does not provide normal routed IPv4 internet access by itself.

FAQ

What Is an IP Address Conflict? Causes and How to Fix It
What Is DNS? How Domain Names Connect to IP Addresses
IP Transit vs Peering: What’s the Difference?
Static vs Dynamic IP Addresses: What’s the Difference?
What Is a Reserved IP Address?
What Is a Subnet? A Beginner’s Guide
RFC 2131 - Dynamic Host Configuration Protocol
RFC 2132 - DHCP Options and BOOTP Vendor Extensions

Ready to see where BYOIP is supported?

Continue the series