DHCP (Dynamic Host Configuration Protocol) is the network service that automatically gives each device an IP address, subnet mask, default gateway and DNS servers when it connects, so nobody has to type those settings into every laptop, phone and printer. In an office it usually runs on the firewall or a Windows server, and on many broadband connections the carrier uses it to give your router its internet address as well.
DHCP lends addresses for a set period, called a lease, from a pool sized to the network. It is defined in RFC 2131 for IPv4, and IPv6 has its own version, DHCPv6. When it works, nobody notices it. When it fails, devices connect to Wi-Fi or plug in and still show "no internet."
What DHCP hands out
An address on its own is not enough to use a network. A DHCP server sends a bundle of settings, called options, and each has a standard number. These are the ones that matter in most offices:
| Setting | DHCP option | What it does |
|---|---|---|
| IP address | Core of the protocol | The device's own address, taken from the pool |
| Subnet mask | 1 | Tells the device which addresses are local |
| Default gateway (router) | 3 | Where to send traffic for anything outside the local network |
| DNS servers | 6 | Which resolvers to use to look up names |
| Domain name | 15 | The internal domain suffix, used by offices with a Windows domain |
| Time servers | 42 | Where to get accurate time, which logs and phones depend on |
| Lease time | 51 | How long the device may keep the address |
| Provisioning server | 66 and 67, or vendor options | Where desk phones and some devices download their configuration |
Getting the DNS option right matters more than it looks. If DHCP hands out a resolver that is down or wrong, every website fails while the circuit is healthy. Our guide to business DNS covers resolvers, filtering and how to tell a DNS fault from an outage.
How DHCP works: Discover, Offer, Request, Acknowledge
A device with no address cannot send to a specific server, so the first step is a broadcast to the whole local network. The exchange has four messages, often remembered as DORA.
- Discover. The device broadcasts "I need an address" to the local network.
- Offer. Any DHCP server that hears it replies with an available address and its settings.
- Request. The device picks one offer and broadcasts that it wants it, which also tells any other server its offer was declined.
- Acknowledge. The chosen server confirms, records the lease and the device starts using the address.
The messages travel over UDP, with servers listening on port 67 and clients on port 68. If no server answers, Windows and macOS give themselves an address starting with 169.254. That address works only for talking to other devices in the same state, so a 169.254 address is a reliable sign the device never reached a DHCP server.
Leases and renewal
Every address comes with a lease time. The device does not wait for the lease to expire. By default it asks the same server to renew at the halfway point, and if that server does not answer, it asks any server at about seven-eighths of the lease. Only if both fail does it give the address up when the lease ends.
Lease length is a design choice. A guest network with a steady stream of visitors needs short leases, often a few hours, so addresses from phones that left at lunch go back into the pool. A staff network with the same laptops every day can use leases of a day or more. Restarting the DHCP server does not usually change anyone's address, because servers keep a record of existing leases and devices ask for their previous address back.
Scopes, pools and exclusions
A scope is the DHCP configuration for one network: the range of addresses it may hand out, the options that go with them and the lease time. Each subnet gets its own scope, and the scope's range has to sit inside that subnet. An office that splits staff, phones and guests onto separate VLANs ends up with one scope per VLAN, each with its own gateway and often its own DNS and lease settings.
The pool does not need to cover the whole subnet. Many offices exclude a block, for example the first twenty addresses, and use it for the firewall, switches, access points and printers set by hand. The one thing to avoid is a hand-set address inside the pool, because DHCP may hand the same address to another device and both will drop off the network intermittently.
A pool that runs out produces a confusing fault: devices that already have leases work, and new arrivals cannot connect. It shows up most on guest Wi-Fi in busy spaces. The fix is a larger subnet, shorter leases or both.
DHCP reservation vs static IP
A reservation tells the DHCP server to always give one device the same address, matched by the device's hardware (MAC) address. It is the usual way to keep a printer, server or camera recorder at a fixed internal address while still managing everything in one place. It is often confused with two other things.
| DHCP reservation | Static address set on the device | Static IP from your carrier | |
|---|---|---|---|
| What kind of address | Usually private, inside the office | Usually private, inside the office | Public, on the internet |
| Who controls it | Whoever runs your DHCP server | Whoever configures the device | The carrier, which assigns it to your circuit |
| Where it is recorded | Centrally, in the DHCP server | Only on the device itself | On your account and in the carrier's routing |
| Survives a device replacement | No, the new hardware needs a new reservation | Yes, if someone re-enters it | Yes, it belongs to the circuit |
| Cost | None | None | Often included on dedicated circuits, often an add-on elsewhere; check the quote |
| Lets outsiders reach you at a fixed address | No | No | Yes |
The last row is the one that trips people up. Reserving an address for your firewall on the inside does nothing for a vendor allow-list or a VPN that needs to find you from the internet. For that you need a public address that does not change, which our page on static IP addresses covers in full.
DHCP on the internet side of your connection
Many broadband services use DHCP on the WAN side too: your router asks the carrier for an address, and the carrier lends it one from a pool. The address may stay the same for months, and nothing promises that it will. Dedicated circuits and static IP plans are usually configured by hand instead, with the address, mask and gateway the carrier provides on the order.
When you put your own firewall behind a carrier gateway, check which device is acting as the DHCP server for the office. If the carrier gateway and your firewall both hand out addresses, you end up with double NAT and devices on two different networks. Our guide to carrier equipment vs your own router explains bridge mode and the other fixes, and our guide to public vs private IP addresses covers the address ranges involved.
On IPv6, many carriers use DHCPv6 prefix delegation to give your router a block of IPv6 addresses to divide among your networks, and devices often set their own addresses from that prefix without a DHCP server at all.
DHCP relay for central servers
DHCP's first message is a broadcast, and broadcasts stop at the edge of each subnet. If one central server, such as a Windows server, hands out addresses for several VLANs, the router or Layer 3 switch on each VLAN has to forward the requests to it. That feature is called DHCP relay, or an IP helper on some equipment. The relay stamps each request with the network it came from, so the server knows which scope to answer from. A new VLAN that "gets no addresses" is very often a VLAN with no relay set up.
Signs of a DHCP problem, and rogue DHCP servers
- Devices show a 169.254 address. They never heard from a server. Check the cable, the VLAN on the port and any relay.
- New devices fail while existing ones work. The pool is probably full.
- Some devices get the wrong gateway or a 192.168.0.x or 192.168.1.x address that matches nothing in your plan. A second DHCP server is answering.
- Two devices keep knocking each other off. An address set by hand sits inside the DHCP pool.
An unwanted second server is called a rogue DHCP server. The usual culprit is innocent: a consumer router or Wi-Fi extender plugged into an office jack, handing out its own addresses to whoever asks first. Managed switches can block this with a feature commonly called DHCP snooping, which only allows DHCP offers from the ports where your real server or firewall connects.
How FiberX helps
FiberX gets quotes from several carriers for your address and checks how each one delivers the connection: by DHCP or with fixed settings, whether static IPs are included, and how the carrier's equipment hands off to your firewall. Most quotes for dedicated internet access include static addresses, and we can also quote managed network services to run DHCP, VLANs and Wi-Fi behind the circuit. The carrier pays us, so there is no markup. Request a quote, or call or text 478-758-8091.