DHCP stands for Dynamic Host Configuration Protocol. It automatically assigns network settings to devices so they can communicate on a network and access the internet — without you having to manually type an IP address, subnet mask, gateway, or DNS server.

On most home networks, your router is the DHCP server.


What Does DHCP Assign?

When a device connects, DHCP hands it everything it needs to communicate:

🖥️
IP Address
192.168.1.50
🔲
Subnet Mask
255.255.255.0
🚪
Default Gateway
192.168.1.1
🌐
DNS Servers
8.8.8.8

How Does DHCP Work? (The DORA Process)

DHCP uses a 4-step handshake called DORA — good to recognize for the A+ exam:

D
Discover
Device broadcasts: "Is there a DHCP server out there?"
O
Offer
DHCP server responds: "I have an IP for you!"
R
Request
Device replies: "Yes, I'll take that IP address."
A
Acknowledge
Server confirms: "Done — the lease is yours."

You don't need to memorize every packet detail for A+, but understanding the overall idea — DHCP is an automated "handshake" that assigns network settings — is exactly what the exam tests.


What Is a DHCP Lease?

🏠 A DHCP lease is a temporary rental of an IP address

The server assigns an IP address for a set time period (hours or days). Before it expires, the device tries to renew it automatically. This prevents two devices from accidentally sharing the same IP.

Memory trick: Lease = "you don't own the IP forever."


How to Check DHCP on Windows

Open Command Prompt and run ipconfig /all to see full DHCP details. Look for these key lines:

DHCP Enabled. . . . . . Yes confirms auto IP
DHCP Server . . . . . . 192.168.1.1 usually your router
Lease Obtained. . . . . Wednesday, Feb 18, 2026 when lease started
Lease Expires . . . . . Friday, Feb 20, 2026 when it will renew
IPv4 Address. . . . . . 192.168.1.55 your assigned IP

Common DHCP Problems (A+ Exam Clues)

If DHCP fails, watch for these symptoms — these appear regularly in A+ scenario questions:

APIPA address (169.254.x.x)
No internet access
"Limited connectivity" warning
IP conflict error

Common causes:

!
Bad or unplugged Ethernet cable
Physical connection issues prevent DHCP Discover from reaching the server
!
Router is offline / DHCP service disabled
No server = no Offer response = APIPA assigned as fallback
!
DHCP scope exhausted
All available IP addresses in the pool are already leased — no more IPs to give
!
Wi-Fi authentication issues / Network adapter driver
Can't join the network at all, so DHCP request never reaches the server

How to Troubleshoot DHCP Issues

1
Confirm physical connection
Check Ethernet cable is seated or Wi-Fi is connected
2
Restart the device and router
Power-cycling often clears stale DHCP state on both ends
3
Disable and re-enable the network adapter
Forces a fresh DHCP Discover broadcast from Device Manager
4
Release and renew the IP address
Run: ipconfig /release then ipconfig /renew
⚡ CompTIA A+ Exam Tip

If you still get a 169.254 address after running /release and /renew, focus troubleshooting on the path to the DHCP server: router → switch → cable → Wi-Fi authentication.

The device is trying — the network path is blocked.


DHCP vs Static IP

DHCP
Dynamic — Auto-assigned

Best for: Laptops, phones, classroom PCs — anything that moves or doesn't need a fixed address.

Automatic and scalable. No manual configuration needed.

Static IP
Fixed — Manually set

Best for: Servers, printers, network gear — devices that must always be reachable at the same address.

Or use a DHCP reservation to give a dynamic device a permanent address.


DHCP Scopes, Exclusions & Reservations

These three concepts define how a DHCP server controls address assignment. They are frequently tested together on Network+ in scenario-based questions.

📦
Address pool
DHCP Scope
The range of IP addresses a DHCP server can assign — for example 192.168.1.10 to 192.168.1.250. You configure one scope per subnet. The scope also defines the lease duration, default gateway, and DNS servers to hand out.
🚫
Carve-out from scope
Exclusion Range
A block of addresses within the scope that the DHCP server will never assign. Used to protect addresses you've manually assigned to routers, servers, or printers — so DHCP never hands them out to another device.
📌
Fixed assignment
DHCP Reservation
Maps a specific MAC address to a specific IP address. The device still uses DHCP but always receives the same IP. Best of both worlds — centralised management with a predictable address for printers, APs, and servers.
⏱️
Temporary assignment
Lease Duration
How long a device can use an assigned IP before it must renew. Short leases (hours) suit guest networks where devices come and go. Long leases (days) suit stable office environments to reduce DORA traffic overhead.
⚡ Reservation vs exclusion — a common trap

Exclusion: The DHCP server skips those addresses entirely — they're available for manual static assignment but DHCP will never touch them.

Reservation: The DHCP server still manages the address — but always assigns that specific IP to that specific MAC address. The device uses DHCP; it just always gets the same answer.


DHCP Relay Agents

DHCP uses broadcast packets for the Discover and Request steps. By definition, routers do not forward broadcasts — so a device on one subnet normally can't reach a DHCP server on a different subnet.

A DHCP relay agent (also called an IP helper) solves this. It's configured on a router interface and listens for DHCP broadcasts from clients. When it hears one, it converts it to a unicast packet and forwards it to the DHCP server's IP address. The server responds to the relay, which forwards the reply back to the client.

How a DHCP relay agent works
Without relay agent:
Client (VLAN 10) ──broadcast──► Router ✗ drops it  DHCP Server (VLAN 20)

With relay agent (ip helper-address configured on router interface):
Client (VLAN 10) ──broadcast──► Router ──unicast──► DHCP Server (VLAN 20)
                                        ◄──unicast──
Client          ◄──unicast── Router
📌 ip helper-address — the Cisco command

On Cisco routers, the relay agent is configured per interface with ip helper-address [DHCP server IP]. This is the most commonly tested implementation detail for Network+.

The relay agent forwards not just DHCP traffic but also several other broadcast-based protocols by default — DNS, TFTP, NTP, and others on their standard ports.

⚡ Classic relay agent scenario

"Devices on VLAN 20 are getting APIPA addresses even though a DHCP server exists on VLAN 10. What is the most likely cause?"

Answer: No DHCP relay agent configured on the router interface for VLAN 20. The DHCP broadcasts from VLAN 20 clients are being dropped at the router and never reaching the server.


APIPA — When DHCP Fails

If a device sends DHCP Discover messages and receives no response, it doesn't give up entirely. Windows automatically assigns itself an address in the 169.254.0.0/16 range — this is called APIPA (Automatic Private IP Addressing).

APIPA at a glance
Range:      169.254.0.0 – 169.254.255.255 (/16)
Assigned:  Automatically by the OS when DHCP fails
Scope:     Link-local only — same subnet communication only
No gateway: Cannot route to the internet or other subnets
Symptom:   Device has a 169.254.x.x address → DHCP failed
Fix:       Restore DHCP server or run ipconfig /release then ipconfig /renew

An APIPA address on a Windows device is almost always a symptom of a DHCP problem — the DHCP server is down, unreachable, or the scope is exhausted. Two devices with APIPA addresses in the same subnet can still talk to each other, but neither can reach the internet or any other subnet.


Rogue DHCP Servers

A rogue DHCP server is an unauthorised device on the network that responds to DHCP Discover messages. Because DHCP is first-come-first-served, if the rogue server responds faster than the legitimate one, it wins — and can hand out false IP addresses, a wrong default gateway (routing traffic through an attacker's machine), or a malicious DNS server (redirecting web traffic).

⚠️ Rogue DHCP — a common attack vector

What the attacker controls: Default gateway (enabling man-in-the-middle), DNS server (enabling phishing via DNS hijacking), or simply an incorrect subnet — causing a denial of service.

Defence — DHCP snooping: A managed switch feature that designates only certain ports as "trusted" DHCP sources. Any DHCP Offer or Acknowledge arriving on an untrusted port is dropped. This is the primary mitigation and is tested on Network+.

Also tested: On Windows Server networks, the DHCP server must be authorised in Active Directory before it can respond to clients — a built-in rogue server prevention mechanism.


Final Summary

DHCP automatically assigns IP address, subnet mask, gateway, and DNS to devices
On most home networks, the router is the DHCP server
DHCP uses the 4-step DORA process: Discover → Offer → Request → Acknowledge
A DHCP lease is temporary — the device renews it automatically before expiry
If DHCP fails, the device falls back to APIPA (169.254.x.x) with no internet
Scope = address pool · Exclusion = addresses DHCP skips · Reservation = fixed IP per MAC address
A DHCP relay agent (ip helper-address) forwards DHCP broadcasts across routers to a centralised server
A rogue DHCP server can hijack clients — mitigate with DHCP snooping on managed switches

📚 Recommended Study Tools

Lock In DHCP Quickly

Take the practice exams, then come back and review the troubleshooting section.

Related Networking Articles

Preparing for the A+ Exam?

See the books, practice exams, and free resources that actually work.

See Best Study Resources →