Networking & Homelab
How DHCP Works in a Small Network
June 24, 2026
A practical beginner explanation of DHCP leases, scopes, gateways, DNS settings, and small network troubleshooting.
DHCP is the service that automatically gives devices their network settings. In a small network, it is often handled by a router, firewall, or server.
What DHCP provides
DHCP usually gives a device:
- IP address.
- Subnet mask.
- Default gateway.
- DNS servers.
- Lease time.
Without DHCP, users may get no address or a 169.254 APIPA address.
DHCP scope
A DHCP scope is the pool of addresses available for clients. For example, a small network might hand out addresses from 192.168.1.100 to 192.168.1.200.
If the scope is full, new devices may fail to get an IP address.
DHCP lease
A lease is the temporary assignment of an IP address to a device. Devices renew leases automatically.
Beginner-friendly version: DHCP is like borrowing an address for a period of time.
DHCP in a homelab
In a homelab, you might practice DHCP using:
- A home router.
- pfSense or OPNsense.
- Windows Server DHCP.
- A Linux DHCP service.
Only run one DHCP server per network unless you know exactly what you are doing.
DHCP and VLANs
Each VLAN or subnet needs a way to get DHCP. That may mean:
- DHCP server directly on that network.
- DHCP relay or helper address.
- Router or firewall providing DHCP for each interface.
If DHCP is missing on a VLAN, devices may connect but not receive valid IP settings.
Beginner Note
When a device gets 169.254, do not start with DNS. First ask why DHCP did not give it a normal IP address. Cantonese-friendly: “未攞到正常 IP,就未到 DNS 嗰步.”
Common Mistake
A common mistake is accidentally running two DHCP servers on the same network, which can give users inconsistent settings.
Practical support example
A small office adds a new switch and several PCs cannot get IP addresses. DHCP may be fine, but the switch uplink, VLAN, or port configuration may not be passing DHCP traffic.
FAQ
Is DHCP required?
No, static IPs can be used, but DHCP is easier and safer for most client devices.
What happens when DHCP fails?
The device may get APIPA, no gateway, or no usable network connection.
Can DHCP give DNS settings?
Yes. DHCP commonly provides DNS server addresses to clients.